I split the trading day into two sessions: RTH and RTH.
The RTH session is from 9:30 AM to 4:15 PM. The ETH session from 4:15 PM of the current trading day to 9:30 AM of the following trading day.
What I would like to accomplish is to reference within OnBarUpdate() the levels of the last ETH session and the previous RTH session.
In other words, I would like to get, in the current RTH session, the levels of the two most recent closed sessions ETH [0] and RTH [1].
I guess I could try hacking around TimeHours. Any help will be welcome!

Comment