Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Directional Trend Index Blau_DTI - indicator for MetaTrader 5

Views:
11001
Rating:
(22)
Published:
2011.07.14 16:47
Updated:
2016.11.22 07:32
blau_dti.mq5 (9.4 KB) view
\MQL5\Include\
williamblau.mqh (4.52 KB) view
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Author: Andrey N. Bolkonsky

The Directional Trend Index (DTI) indicator (based on the Composite High/Low Momentum) is described by William Blau in the book "Momentum, Direction, and Divergence: Applying the Latest Momentum Indicators for Technical Analysis".

  • WilliamBlau.mqh must be placed in terminal_data_folder\MQL5\Include\
  • Blau_DTI.mq5 must be placed in terminal_data_folder\MQL5\Indicators\

Directional Trend Index (DTI) Indicator by William Blau

Directional Trend Index (DTI)Indicator by William Blau

Calculation:

The Directional Trend Index is calculated by formula:

                       100 * EMA(EMA(EMA( HLM(q) ,r),s),u)             100 * HLM(q,r,s,u)
DTI(q,r,s,u) = ––––––––––––––––––
––––––––––––––– = –––––––––––––––––––––––––––––
                         EMA(EMA(EMA( |HLM(q)| ,r),s),u)          EMA(EMA(EMA( |HLM(q)| ,r),s),u)

if EMA(EMA(EMA(|HLM(q)|,r),s),u)=0, then DTI(price,q,r,s,u)=0

where:

  • q - number of bars, used in calculation of Up Trend Momentum and Down Trend Momentum;
  • HLM(q)=HMU(q)-LMD(q) - the Composite High/Low Momentum;
  • |HLM(q)| - the absolute value of HLM(q);
  • HLM(q,r,s,u) - triple smoothed HLM(q);
  • EMA(...,r) - 1st smoothing - EMA(r), applied to
    1. HLM(q)
    2. to the absolute values of HLM(q);
  • EMA(EMA(...,r),s) - 2nd smoothed - EMA(s), applied to result of the 1st smoothing;
  • EMA(EMA(EMA(...,r),s),u) - 3rd smoothing - EMA(u), applied to result of the 2nd smoothing.
Input parameters:
  • q - number of bars, used in calculation of HLM (by default q=2);
  • r - period of the 1st EMA, applied to HLM (by default r=20);
  • s - period of the 2nd EMA, applied to result of the 1st smoothing (by default s=5);
  • u - period of the 3rd EMA, applied to result of the 2nd smoothing (by default u=3).
Note:
  • q>0;
  • r>0, s>0, u>0. If r, s or u are equal to 1, the smoothing is not used;
  • Min. rates = (q-1+r+s+u-3+1).

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/384

Composite High/Low Momentum Blau_HLM Composite High/Low Momentum Blau_HLM

Composite High-Low Momentum Indicator by William Blau.

Ergodic CSI-Oscillator Blau_Ergodic_CSI Ergodic CSI-Oscillator Blau_Ergodic_CSI

Ergodic CSI-Oscillator by William Blau.

Ergodic DTI-Oscillator Blau_Ergodic_DTI Ergodic DTI-Oscillator Blau_Ergodic_DTI

Ergodic DTI-Oscillator (Directional Trend Index) by William Blau.

BrainTrend2 BrainTrend2

BrainTrend2 is an indicator of the market trends that assigns colours to candlesticks according to the trend direction.