(1) Code(a) plots the high and low of current day according to the session begins and session ends time defined in the chart properties. Code(b) get the first bar of the session.
(a) if (Bars.SessionBreak)
{
currentHigh = High[0];
currentLow = Low[0];
}
currentHigh = Math.Max(currentHigh, High[0]);
currentLow = Math.Min(currentLow, Low[0]);
(b) if(Bars.FirstBarOfSession)
(2) What function should I use if I would like to plot the current high and low as well as to get the the first bar of the following defined sessions(eg. 9:15 to 10:15 ; 10:15 to 11:15 ; 11:15 to 12:15 and so on)? Thanks in advance.
Comment