Raeon Cohen
Raeon Cohen

Reputation: 1

Cannot use 'plot' in local scope on trading view pine editor

When entering this code on trading views pine editor it returns "Cannot use 'plot' in local scope"

// Plot indicators
plot(sma_short, color=color.blue, title="SMA Short")
plot(sma_long, color=color.red, title="SMA Long")
hline(rsi_buy_level, "RSI Buy Level", color=color.green)
hline(rsi_sell_level, "RSI Sell Level", color=color.red)
plot(rsi, color=color.purple, title="RSI")

I was expecting to add to chart but keeps preventing me because of plot can be used in local scope

Upvotes: 0

Views: 23

Answers (0)

Related Questions