User4536124
User4536124

Reputation: 97

ema not plotting correctly! (or human error?)

Orange bar shown on the plots do not correspond to the expected places?

https://www.tradingview.com/chart/ZARAUD/03uXsufA-orange-bar/

//@version=5
indicator("TestEma10")

ema10 = ta.ema(close, 10)

test = ta.crossover(ema10, close)

plot(ema10)    

bgcolor(test? color.orange:na)

Copy-paste the code into a Pine script, and draw the plot lines with the mouse into the main chart to get the linked chart.

Upvotes: 0

Views: 540

Answers (1)

Bjorn Mistiaen
Bjorn Mistiaen

Reputation: 6875

You've pinned your indicator to the left scale, while the price is pinned to the right scale.
That way they won't lign up.

What you did to pin the indicator to the left scale was:
Right-click ema10 line > Pin To Scale (Now Right) > Pine To New Left Scale

Pin to left

What you need to do to restore the indicator to the right scale is:
Right-click ema10 line > Pin To Scale (Now Z) > Pine To Scale A

Pin restore

Upvotes: 1

Related Questions