STORSI Smoothed
STORSI Smoothed
STORSI Smoothed
PI = 3.14159265359
drop1st(src) =>
x = na
x := na(src[1]) ? na : src
ob = 80
os = 20
midpoint = 50
price = log(drop1st(src))
rsi1 = xrsi(price, lengthRSI)
rawsig = Stochastic(rsi1, rsi1, rsi1, lengthStoch)
sig = EhlersSuperSmoother(rawsig, smoothK)
ma = sma(sig, smoothD)
// Buy/Sell Signals
sellsignals = showsignals and (mm1 + ms1 < 0 and mm2 + ms2 < 0) and crossunder(sig,
ma) and sig[1] > midpoint
buysignals = showsignals and (mm1 + ms1 > 0 and mm2 + ms2 > 0) and crossover(sig,
ma) and sig[1] < midpoint
ploff = 4
plot(buysignals ? sig[1] - ploff : na, style=circles, color=#008fff, linewidth=3,
title="Buy Signal", transp=0)
plot(sellsignals ? sig[1] + ploff : na, style=circles, color=#ff0000, linewidth=3,
title="Sell Signal", transp=0)