I am developing a simple indicator script which will plot lines of various key levels on a chart. The trading hours are set to ETH / <Use instrument settings>.
When the current day RTH session starts I want to be able to plot the overnight session highs & lows along with the highs, lows & close from the previous days RTH session.
I am aware that I can use the Prior Day OHLC indicator with a 'ghost' secondary data series to plot the lines but as I'm running a tick chart I don't want to load up my chart with unnecessary data.
I am able to code a script to plot horizontal lines for the overnight sessions highs & lows and I'm able to use the ToTime() function to create a session range but I'm struggling to work out how to access the data from the previous session.
Is there a similar function I can use which will help access the prior day values which I can then use the ToTime() function to create the prior day's RTH session?
Thanks,
Neil

Comment