TDI - Traders Dynamic Index ... or something similar

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
maxmax68
Posts: 156
Joined: 20 Nov 2012
Has thanked: 52 times
Been thanked: 44 times

TDI - Traders Dynamic Index ... or something similar

Postby maxmax68 » 21 Jan 2018

Code: Select all

// "TDI - Traders Dynamic Index"

Inputs:
price(Close),
rsi.length(13),
band.length(34),
fastMA.length(2),
slowMA.length(7),
overbougth.level(68),
midpoint.level(50),
oversold.level(32);

Vars:
r(0),
ma(0),
band.offset(0),
upper.band(0),
lower.band(0),
mid.band(0),
fastMA.rsi(0),
slowMA.rsi(0);

r=RSI(price,rsi.length);
ma=Average(r,band.length);
band.offset=(1.6185*StdDev(r,band.length));
upper.band=ma+band.offset;
lower.band=ma-band.offset;
mid.band=(upper.band+lower.band)/2;
fastMA.rsi=Average(r,fastMA.length);
slowMA.rsi=Average(r,slowMA.length);

plot1(upper.band,"Up Band",blue);
plot2(mid.band,"Mid Band",yellow);
plot3(lower.band,"Lo Band",blue);
plot4(fastMA.rsi,"Fast MA",red);
plot5(slowMA.rsi,"Slow MA",green);
plot6(overbougth.level,"Overbougth",lightgray);
plot7(midpoint.level,"Midpoint",lightgray);
plot8(oversold.level,"Oversold",lightgray);



For instructions on use, search the net.
For any correction or improvement, please, attach your code.

Best regards
Massimo

Return to “User Contributed Studies and Indicator Library”