I am trying to plot a line with the script below based on GetQuantity. The script works but i only get a little cyan line above the candle. I am trying to have a full line
extend to the right. Can someone help me out with what is wrong with my script below on why it is not fully extending the line to the right
extend to the right. Can someone help me out with what is wrong with my script below on why it is not fully extending the line to the right
Ruby:
def Current_Open = if IsNaN(close[-1]) and !IsNaN(close) then open else Current_Open[1];
def HighLine = HighestAll(if IsNaN(close[-1])
then high(period = "Day")
else Double.NaN);
def plotline = if GetQuantity() != 0 then
if GetQuantity()[1] == 0
then HighLine
else HighLine [1] else Current_Open ;
plot TestLine = plotline;
TestLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
TestLine.SetDefaultColor(Color.CYAN);
Testline.SetLineWeight(1);
Attachments
Last edited by a moderator: