For example, say I am charting NQ and have 20 RTH sessions loaded into the chart. I want my indicator to work through all the sessions from CurrentBar = 0 and then write out the results when it gets to the last session in the chart data series.
The code below will not work properly because the RTH session for today may not have started yet so the last session in the chart will be yesterdays RTH session.
today = DateTime.Now;
if ( Time[0].Day == today.Day
&& Time[0].Month == today.Month
&& Time[0].Year == today.Year )
{
do something....
}
Thanks
Chris

Comment