Nicolas

Traders Dynamic Index TDI

Category: Indicators By: Nicolas Created: October 11, 2015, 9:49 PM
October 11, 2015, 9:49 PM
Indicators
12 Comments
Traders Dynamic Index TDI

Here is the code for the famous Traders Dynamic Index aka the “TDI”.

//parameters
// lengthRSI = 13
// lengthband = 34
// lengthrsipl = 2
// lengthtradesl = 7

r = rsi[lengthrsi](close)
ma = average[lengthband](r)
offs = (1.6185 * std[lengthband](r))
up = ma+offs
dn = ma-offs
mid = (up+dn)/2
mab = average[lengthrsipl](r)
mbb = average[lengthtradesl](r)

lineup = 68
linemid = 50
linedown = 32

RETURN lineup as "line up", linemid as "line mid", linedown as "line down", up coloured(0,238,238) as "up", dn coloured(0,238,238) as "dn", mid coloured(255,165,0) as "mid", mab coloured(0,255,0), mbb coloured(255,0,0)

 

Download
Filename: Trader-Dynamic-Index-TDI.itf
Downloads: 1289
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Brent38
4 years ago
#

Bonjour à tous, Post tardif, mais on débute tous un jour, et moi je découvre Prorealcode. A propos de jolis code de "Traders Dynamic Index TDI", on peut obtenir exactement la même chose (je dis bien exactement) avec un RSI 13 auquel on ajoute : - 2 Moyennes mobiles simple de 2 et 7 périodes (pour cet exemple) - des Bandes de Bollinger de période 34 et d'écart type 1.6185 (Les BB contiennent déjà la bande du milieu) Je dis simplement ça pour expliquer que tous les signaux sont basés sur des calculs qui se croisent souvent et qu'on peut les retrouver par des chemins différents. Ça me paraît inintéressant pour mieux les comprendre Tradivement ;-)

Nicolas
4 years ago
#

Oui en effet, le TDI c'est un RSI lissé avec des écarts types sur sa moyenne.

Guibourse
5 years ago
#

HI, I wonder how to change the mid line color depending on its growing or declining evolution. I have not managed to do it myself ...sorry

ade007
7 years ago
#

Hi Nicolas,me again..Is it possible to add in the indicator box the angle of the TDI and the TDI2 as the angles of the lines are quite important.It would be much appreciated but if you are too busy i will also understand...many thanks Adrian

Nicolas
7 years ago
#

Please open a new topic in the probuilder forum with a complete description of you want to be added to the TDI indicator, thanks in advance. (pictures would be of great help!).

ade007
7 years ago
#

Thank you Nicolas.

ade007
7 years ago
#

Hi Nicolas,is there any way to change the colour of the green line (TDI 1)? many thanks

Nicolas
7 years ago
#

Just change the R,G,B code of the mab variable in the return instruction (last line)

gclark25
9 years ago
#

Nicolas - you sir, are an absolute gentleman. Thank you for getting back to me so quick.

I see you have also written a code to back test (I think) the simple trading system regarding the TDI (First found on Forex Factory).

Not sure what your own results of that was, but it seems to me (won't have your experience) that it is a more manual system as there are certain criteria that need to be considered that an automatic system couldn't programme? (I obviously could be entirely wrong on that).

Anyway, thanks again, this will allow me to manually back test some results taking into consideration the general trend, whether or not the price is above the 5ema, any major S/R zones to consider etc. Then collating that info and seeing what criteria is important and what may not be in positive results via excel (The caveman way lol).

Thanks.

gclark25
9 years ago
#

Hi Nicolas.

Is there an updated code for this - I copy and pasted your code exactly how it is shown and it was coming up with syntax errors.
I'm not at the computer right now to show you - but with your experience would you have any idea what these errors are?

Apologies - I have no previous experience with programming indicators so it might be something very obviously and silly.

Nicolas
9 years ago
#

I think it might be something to deal with the parameters which are commented between line 1 to 5. Just remove the double dash. Or you can also download the ITF file and import it directly into your platform, much easier :) 

gdevaal
10 years ago
#

many thanks, very helpful

ProRealCode ProRealCode
Loading...