SessionLastBar in live trading
Posted: Sep 16 2023
I have a question about the behavior of SessionLastBar during live trading, specifically with regards to sessions whose duration is reduced compared to the theoretical session on the chart, for example during holidays when the market may close a few hours earlier.
I saw a similar question being asked in viewtopic.php?t=50358, but I didn't solve my doubt entirely.
I can see that in backtest, the behavior of SessionLastBar is correct, even for shorter-than-normal sessions, but during backtest MultiCharts knows when the new session started, so in retrospect it can fix the value of SessionLastBar. I guess it doesn't have this information during live trading though, at least until the new session starts.
During live trading, does SessionLastBar really reflect the fact that the session has already ended, sooner than intended?
Example:
- let's assume IOG is disabled
- @ES future's session ends at 16:00 exchange time
- during holidays, the session may end sooner, say 13:00
- say I have a 15 minute chart, will SessionLastBar be correctly set to true when my strategy/indicator code is evaluated at the close of the bar that started at 12:45 and ended at 13:00?
I saw a similar question being asked in viewtopic.php?t=50358, but I didn't solve my doubt entirely.
I can see that in backtest, the behavior of SessionLastBar is correct, even for shorter-than-normal sessions, but during backtest MultiCharts knows when the new session started, so in retrospect it can fix the value of SessionLastBar. I guess it doesn't have this information during live trading though, at least until the new session starts.
During live trading, does SessionLastBar really reflect the fact that the session has already ended, sooner than intended?
Example:
- let's assume IOG is disabled
- @ES future's session ends at 16:00 exchange time
- during holidays, the session may end sooner, say 13:00
- say I have a 15 minute chart, will SessionLastBar be correctly set to true when my strategy/indicator code is evaluated at the close of the bar that started at 12:45 and ended at 13:00?