Jim Cruz
Jim Cruz

Reputation: 11

I am try to plot a circle with a condition /// (var) with (if) statement

// Plot circles based on conditions
var plot Shape = na
if (array.sum(above200) >= 3 and close > sma1m)
    Shape := shape.circle
    Colour := color.new(color.green, 60)

if (array.sum(below200) >= 3 and close < sma1m)
    Shape := shape.circle
    Colour := color.new(color.red, 60)

// Plot circles
plotshape(Shape, color=Colour, location=location.belowbar, size=size.small)

error message is var plot Shape = na 'plot' is not a valid type keyword in variable declaration

Upvotes: 0

Views: 23

Answers (0)

Related Questions