First, when creating the chart I set the instrument, then I set the Data Series to load 4 days prior to today. For instance, today is October 19th and currently is 6:35 AM in my timezone: so I am asking to load the data for 18, 17, 16 and 15. I also activate the Tick Replay as I need the history of all the ticks for my indicator. Afterwards I put my indicator on the chart.
What I would like to do - in the code of the indicator - is to implement some logic which within the OnMarketData allows me to check whether the data being processed in the Tick Replay phase belongs to the current session (e.g., ETH of October 19th) or if it belongs to past sessions. Please consider that such implementation need also to work in Playback mode (for this reason I can't use the DateTime.Now to detect somehow the current date time).
Thank you in advance!
Cheers

Comment