Trend Detection Index

Custom MT4 expert advisors published here.

Moderator: admin

Trend Detection Index

Postby Alexander.Gettinger » Thu Aug 29, 2013 10:42 am

Original LUA oscillator: http://fxcodebase.com/code/viewtopic.ph ... 3811572bd4.

Formulas:
Direction[i] = Sum(Mom) from (i-Length+1) to (i),
TDI[i] = F+H-G, where
Mom[i] = Price[i]-Price[i-Length],
F = Abs(Direction),
H = Sum(Abs(Mom)) from (i-Length+1) to (i),
G = Sum(Abs(Mom)) form (i-2*Length+1) to (i).

TDI_MQL.PNG


Download:
TDI.mq4
(2.54 KiB) Downloaded 1071 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to MT4 Expert Advisors

Who is online

Users browsing this forum: Bing [Bot] and 51 guests