Here is y version of the famous “Traders Dynamic Index” aka TDI.
//The settings are;
//r[14], l1[2], s1[8], s2[21], bb[55], dev[2]
TDI = WilderAverage[l1](rsi[r])
Sf = Average[s1](TDI)
Ss = ExponentialAverage[s2](TDI)
offs = (dev * std[bb](TDI))
ma = Average[bb](TDI)
bu = ma + offs
bl = ma – offs
bm = (bu + bl) / 2
return TDI as “neoTDI”, Sf as “SignalFast”, Ss as “SignalSlow”, bu as “UpperBand”, bl as “LowerBand”, bm as “MiddleBand”, 32 as “OsLevel”, 48.5 as “DecisionZone1”, 51.5 as “DecisionZone2”, 68 as “ObLevel”