godzilla74
New member
I'm trying to get horizontal lines to extend all the way to the right of a chart on certain candles where the high/low range has exceeded the previous candle (These are labeled as '3' on my chart and are painted yellow). It plots the high/low of the candle (again, in yellow) but doesn't extend to the right as I would expect it to based on the numerous posts I've read in this forum. The desired effect would be a bunch of yellow lines that extend all the way to the right of the chart
Can someone help or at least identify what I've missed in the code?
Can someone help or at least identify what I've missed in the code?
Ruby:
# Find all outside bars and change their fill color to yellow
rec outsideBar = if high > high[1] and low < low[1] then 1 else 0;
plot ThreeBar = outsideBar;
# Use the upcolor and downcolor variables to fill the candles
AssignPriceColor(if ThreeBar then color.Yellow else color.CURRENT);
# Find the high and low of the most recent outside bar
def outsideBarHigh = if ThreeBar then high else Double.NaN;
def outsideBarLow = if ThreeBar then low else Double.NaN;
# Add horizontal lines to the chart
plot OutsideBarHighLine = outsideBarHigh;
plot OutsideBarLowLine = outsideBarLow;
OutsideBarHighLine.SetDefaultColor(color.YELLOW);
OutsideBarLowLine.SetDefaultColor(color.YELLOW);
OutsideBarHighLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
OutsideBarLowLine.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);