I am using the following code to draw a horizontal line at the hightest close over the last 25 candles.
var xSeries = highest(25, close());
drawLineRelative(-25, xSeries, 0, xSeries, . . . . );
This logic does draw the line but it includes the current and active candle, so if the current candle is making new highs, then the horizontal line is continually adjusted on each tick.
I do not want the current candle to be included until that period closes and the next candle begins.
So, basically, I would like the xSeries value to contain the highest high from candles -26 thru -1.
Thank you for your assistance.
var xSeries = highest(25, close());
drawLineRelative(-25, xSeries, 0, xSeries, . . . . );
This logic does draw the line but it includes the current and active candle, so if the current candle is making new highs, then the horizontal line is continually adjusted on each tick.
I do not want the current candle to be included until that period closes and the next candle begins.
So, basically, I would like the xSeries value to contain the highest high from candles -26 thru -1.
Thank you for your assistance.
Comment