I have zero coding experience. I am trying to create a script that shows the midpoint level of the previous candle. I came up with this after browsing some other threads but it shows the levels for the current and previous candles. I only want the midpoint level for the previous candle to show. Also, if it is possible to make the midpoint line extend from the previous candle to the current candle as well. Any help is much appreciated!
Code:
def Data = (Close + open) / 2;
Plot Stop = if isnan(close[-1]) then Data[1] else double.nan;
Stop.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Stop.AssignValueColor(Color.PLUM);
Stop.SetLineWeight(3);
Last edited by a moderator: