I'm running a backtest on a strategy with sessions configured from 8AM to 9PM.
I want, at the end of the day, to output a simple report about the day. The point is that I don't know how to do that. Obviously, there is no such thing as a "lastBarOfSession". The dispose method is called at the end of backtest but not at the end of each session.
Outputing in the onbarupdate method, while checking for a specific time won't work, since somedays there is quotations until 6PM while other days will have quotations up to 8PM.
Does anyone have an idea of how I should do.
The only working idea i had so far is to call the output method at each onbarupdate call, each time overwriting the report with the latest values, which is a bit a shame in terms of waste of ressources.
Thanks in advance.
Comment