Finding the High and Low of prv day with Specific time number

Hi,
i am working on 5 min Chart.
Following code helps me to find the first bar's High and Low of Prv Day.
How can i find the High and Low of prv day with Specific Time number? for instance 2:30 Pm candle.

tn=Timenum();
starttime=103000;
Endtime=180000;
//Prv day First bar High and Low
FBH = ValueWhen( Day() != Ref( Day(), -1 ), H, 2 );
FBL = ValueWhen( Day() != Ref( Day(), -1 ), L, 2 );

Any help would be greatly appreciated.

Thanks,
Gloria Filamino.

tn=Timenum();
time = 143000;
timecond = tn == time;

//Prv day High and Low of timenum bar
FBH = ValueWhen( timecond, H, 2 );
FBL = ValueWhen( timecond, L, 2 );
5 Likes

The same way,
part of the answer is already in your code.

Read more about TimeNum()

ValueWhen( tn == "143000", H,  1)

since ValueWhen can refer to multiple occurrences of same TimeNum, make sure you select right nth occurrence.

Edit: @fxshrat responded a minute earlier, he has posted complete example.

2 Likes

Thanks a lot for your time and help.
It worked like charm.