I am printing the values of next begin and End Date Time. and they does not match with Begin & End of the chart loaded. I am using the <Use instrument settings> session template in the chart.
The begin and end of the chart are: 08:00 and 19:00
But, the begin and end returned by the GetNextBeginEnd are: 07:00 and 21:00.
Which is the righ way to get the correct begin & end throght the GetNextBeginEnd funtion?.
I am using the code in the help guide:
{ // On the start of a new session, get the next begin or end session time and its corresponding paired session begin/end time.
if (Bars.FirstBarOfSession)
Bars.Session.GetNextBeginEnd(BarsArray[0], 0, out sessionBegin, out sessionEnd);
Print("Session Start: " + sessionBegin + " Session End: " + sessionEnd);
}
Thanks
Comment