I have a strategy that starts when it sees the first bar of the session, as indicated by Bars.FirstBarOfSession, and looks for a condition in the first 10 minutes of the session. After that the strategy does no more.
I need to understand what the value of Bars.FirstBarOfSession is in the following unusual situation because my strategy started unexpectedly.
Situation:
My strategy is started before the session start, so it waits as expected.
The PC (laptop) goes into hibernation before the session starts (so no data is obtained).
The user wakes up the laptop several hours after the session starts.
My strategy starts as though the current baris the first bar, even though the time is many bars after the session start.
Perhaps I need to also check the bar time to prevent this late start in circumstances like this - please confirm.
Regards
Tony
Comment