Hi seniors,
I am not pro in coding, but i tried to code for comparing last day first 15 min high low with low high of rest of the day.
After deploying the afl, it is capturing last day first 15 min either low or high, but not capturing both low high of candle ( as you can see in attached picture) instead of one part it is capturing from prev candle.
CODE is following :
TimeFrameSet(in15Minute);
TimeFrameInMinutes = 1;
ppl = ParamToggle( "IB_LEVELS", "Off|On", 1 );
pplxt = ParamToggle( "IB _LEVELSExtn", "Off|On", 0 );
P11 = ParamTime( "IB Start Time", "09:14:59") ;
P12 = ParamTime( "IB END Time", "09:29:59" );
tn = TimeNum();
START = tn > P11;
END = tn <= P12;
ZONE = START AND END;
ST = tn >= P12;
NewTime = Ref (ZONE,-1)==ZONE;
highestoftheday = HighestSince( NewTime, H, 1 );
Lowestoftheday = LowestSince( NewTime, L, 1 );
IBHigh = ValueWhen( ZONE, highestoftheday, 1 );
IBLow = ValueWhen( ZONE, lowestoftheday, 1);
AddColumn( IBHigh, "High of time window", 1.2 );
AddColumn( IBLow, "Low of time window", 1.2 );
Plot( Close, "Price", colorDefault, styleCandle );
prevHigh = TimeFrameGetPrice("High",inDaily,-1);
prevLow = TimeFrameGetPrice("Low",inDaily,-1);
Plot(IBHigh, "Prev Day 1st candle High", colorRed, styleLine);
Plot(IBLow, "Prev Day 1st candle Low", colorGreen, styleLine);