Interact with the UI
#4
> Maybe, but the UI is already aware of an end() ... ?

Both the UI and the CLI version are aware of end(), since only backtests actually have any end date. If you run a backtest via the CLI you'll get a similar report at the end.

> The strategies would still be dumb and simple, this would just be strat.ui.end = function(){ alert('hello world'); }

What does it mean for a strategy to end? Strategies don't have any end(), just other parts of the code in case a backtest is ran (that have to do a final report log or cleaning up DB handlers or so). But besides that, I'm really not sure what your example is supposed to do.. What if there is no browser connected? What if there are 10 browsers connected? What if this isn't run via any UI at all?
  Reply


Messages In This Thread
Interact with the UI - by tommiehansen - 02-06-2018, 06:25 PM
RE: Interact with the UI - by askmike - 02-07-2018, 04:04 AM
RE: Interact with the UI - by tommiehansen - 02-07-2018, 10:02 AM
RE: Interact with the UI - by askmike - 02-07-2018, 11:16 AM
RE: Interact with the UI - by tommiehansen - 02-07-2018, 10:26 PM
RE: Interact with the UI - by askmike - 02-08-2018, 04:28 AM
RE: Interact with the UI - by tommiehansen - 02-09-2018, 12:43 PM

Forum Jump:


Users browsing this thread: