I've below code which pulls High and Low Value for particular time range for a current day.
Requesting forum members to help me in writing same code which pulls H and L for PREVIOUS DAY with time range same as below.
_SECTION_BEGIN("Time range High-Low");
tn = TimeNum();
// define start/end hours in TimeNum format
StartTime = 91500;
Endtime = 093000;
MendTime = 152000;
// these conditions are true when TimeNum of the bar equals startime/endtime
StartBar = tn == StartTime;
EndBar = tn == Endtime;
// on the end bar we read the value of highest high or lowest low since the start bar
myH = ValueWhen( EndBar, HighestSince( StartBar, High ) );
myL = ValueWhen( EndBar, LowestSince( StartBar, Low ) );
Thanks Travick. I had gone through the forum and checked many codes provided in an answer but all those were for current day while I was looking for solution was slight different.
Below code is for current day. I don't know how to convert it so that it look for previous day.
_SECTION_BEGIN("Time range High-Low");
tn = TimeNum();
// define start/end hours in TimeNum format
StartTime = 91500;
Endtime = 093000;
MendTime = 152000;
// these conditions are true when TimeNum of the bar equals startime/endtime
StartBar = tn == StartTime;
EndBar = tn == Endtime;
// on the end bar we read the value of highest high or lowest low since the start bar
myH = ValueWhen( EndBar, HighestSince( StartBar, High ) );
myL = ValueWhen( EndBar, LowestSince( StartBar, Low ) );