Author: Andrey N. Bolkonsky
Hey there, traders! Today, we're diving into the Directional Trend Index (DTI), a nifty indicator developed by William Blau. If you're keen to enhance your trading strategy, this tool might just be your new best friend. You can find more about it in Blau's book, "Momentum, Direction, and Divergence: Applying the Latest Momentum Indicators for Technical Analysis".
- Make sure to place WilliamBlau.mqh in your terminal_data_folder\MQL5\Include\
- And don’t forget to put Blau_DTI.mq5 in your terminal_data_folder\MQL5\Indicators\

Directional Trend Index (DTI) Indicator by William Blau
How the DTI is Calculated:
So, how does the Directional Trend Index work? Here’s the 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
In this formula:
- q - the number of bars used to calculate 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) - the first smoothing: EMA(r), applied to
- HLM(q)
- the absolute values of HLM(q);
- EMA(EMA(...,r),s) - the second smoothing: EMA(s), applied to the result of the first smoothing;
- EMA(EMA(EMA(...,r),s),u) - the third smoothing: EMA(u), applied to the result of the second smoothing.
- q - number of bars used in HLM calculation (default is q=2);
- r - period of the first EMA applied to HLM (default is r=20);
- s - period of the second EMA applied to the result of the first smoothing (default is s=5);
- u - period of the third EMA applied to the result of the second smoothing (default is u=3).
- Ensure that q > 0;
- r, s, and u must be greater than 0. If any of these are equal to 1, smoothing won’t be applied;
- Minimum rates = (q-1+r+s+u-3+1).
Related Posts
- Unlocking MetaCOT 2: Your Ultimate CFTC Indicator Toolkit for MT4
- Unlocking the Power of Master Tools for MetaTrader 4
- Mastering the Open Range Breakout Indicator for MetaTrader 5
- Visualize Current Trends Across All Time Frames with This MetaTrader 4 Indicator
- Unlock Trading Insights with Volume Profile + Range v6.0 for MetaTrader 5