scottsamesame
New member
I am looking for a script to put on a daily chart that would show an arrow on the candle, during a 200 day period, whereby the candle is the highest CLOSE of the period, not the highest high.
I have the following HOWEVER this gives a result whereby the arrow is on the highest high, not the highest CLOSE.
Any help is appreciated. TY
input aggregationperiod = Aggregationperiod.DAY;
input length = 200;
input showonlylastperiod =yes;
plot alltimehigh;
if showonlylastperiod and !isnan(close(period = aggregationperiod)[-1]) { alltimehigh = double.nan; } else {alltimehigh=highest(close(period = aggregationperiod)[-displace], length);}
alltimehigh .setdefaultcolor(color.yellow);
alltimehigh.setpaintingstrategy(PaintingStrategy.ARROW_UP);
I have the following HOWEVER this gives a result whereby the arrow is on the highest high, not the highest CLOSE.
Any help is appreciated. TY
input aggregationperiod = Aggregationperiod.DAY;
input length = 200;
input showonlylastperiod =yes;
plot alltimehigh;
if showonlylastperiod and !isnan(close(period = aggregationperiod)[-1]) { alltimehigh = double.nan; } else {alltimehigh=highest(close(period = aggregationperiod)[-displace], length);}
alltimehigh .setdefaultcolor(color.yellow);
alltimehigh.setpaintingstrategy(PaintingStrategy.ARROW_UP);