You are on page 1of 1

study(title="Warrior Trend", shorttitle="Warrior Trend", overlay=false)

src = close, len = input(90, minval=1, title="Long Trend")

up = rma(max(change(src), 0), len)


down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

lenema = input(33, minval=1, title="Short Trend")


out = ema(rsi, lenema)
col=out >= out[1] ? lime : red
plot(out, title="Short Trend", color=col, linewidth=3,style=area,transp=25)

You might also like