Trigun1127
Member
This isnt plotting right. Im trying to a get a dot to plot when 3 bull bars or 3 bears bars occur and there is a gap (bull open>close[1]) or (bear open<close[1] anywhere in those 3 bars.
Code:def legup = Sum(open < close, 3) == 3 and open [0] > close[1] and close > open and close[1] > open[1]; def legdn = Sum(open > close, 3) == 3 and open [0] < close[1] and close < open and close[1] < open[1]; plot LegupStart = if !legup and !legup[-1] and legup[-2] then low else Double.NaN; LegupStart.SetPaintingStrategy(PaintingStrategy.POINTS); LegupStart.SetLineWeight(5); LegupStart .SetDefaultColor(Color.WHITE); plot LegdnStart = if !legdn and !legdn[-1] and legdn[-2] then high else Double.NaN; LegdnStart.SetPaintingStrategy(PaintingStrategy.POINTS); LegdnStart.SetLineWeight(5); LegdnStart .SetDefaultColor(Color.YELLOW);