samuelhei

Relative Projected Ema

I realized that I can use my PEMA indicator (www.tradingview.com/v/WuSuwa50/) as ocillator too, so I created this indicator.

Good to compare top and bottom (get divergences), and oversold and overbought areas (like RSI).

If you liked, send me a small amout of bitcoin to 1NR9tyn8tAn6nuQzosaZ2SkfT38PLxN5mf it will encorage me to create other indicators open source.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study("Relative PEMA","R_PEMA")

src = close

ema2 = ema(src, input(100,"EMA 1"))
ema1 = ema(src, input(200,"EMA 2"))

dif = ema2- ema1
max = ema2 + 6*dif
min = ema1 - 2*dif

zero = min > max ? max : min
cem = min > max ? min : max

value = src < zero ? 0 : src > cem ? 100 : ((src - zero)/(cem-zero))*100


plot(value, color=navy)
band1 = hline(70)
band0 = hline(30)

fill(band1, band0, color=navy, transp=90)