Directional Trend Index (DTI) Indicator
Info
The Directional Trend Index (DTI) Indicator is a Indicator for MetaTrader 5 that the directional trend index (dti) indicator is based on a calculation described by william blau. To use this indicator:Place the williamblau.
Usage
This tool is typically used for trend following strategies across multiple currency pairs.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Directional Trend Index (DTI) Indicator
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
The Directional Trend Index (DTI) indicator is based on a calculation described by William Blau.
Typical Use Case
This Indicator excels in trend following on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Quantora Multi-Timeframe Trend Dashboard MT5 - Professional EMA Trend Analysis - another powerful indicator for MetaTrader 5 traders.
The Directional Trend Index (DTI) indicator is based on a calculation described by William Blau.Also recommended: Quantora Moving Average Dashboard MT5 - Professional EMA SMA Trend Analysis - similar indicator with strong performance on MetaTrader 5.
To use this indicator:
Place the williamblau.mqh file in your MetaTrader terminal's MQL5 include folder (terminal_data_folder\mql5\include\).
Place the blau_dti.mq5 file in your MetaTrader terminal's MQL5 indicators folder (terminal_data_folder\mql5\indicators\).
Calculation:
The Directional Trend Index is calculated using the following formula:
Where:
q - is the number of bars used for calculating up trend momentum and down trend momentum.
hlm(q) = hmu(q) - lmd(q) - this represents the smoothed momentum.
|hlm(q)| - is the absolute value of hlm(q).
hlm(q,r,s,u) - represents a triple smoothed hlm(q).
ema(...,r) - signifies the first smoothing, an Exponential Moving Average (EMA) with period r, applied to hlm(q).
ema applied to absolute values - refers to an EMA applied to the absolute values of hlm(q).
ema(ema(...,r),s) - signifies the second smoothing, an EMA with period s, applied to the result of the first smoothing.
ema(ema(ema(...,r),s),u) - signifies the third smoothing, an EMA with period u, applied to the result of the second smoothing.
Input Parameters:
q - Number of bars for hlm calculation (default: 2).
r - Period for the first EMA smoothing applied to hlm (default: 20).
s - Period for the second EMA smoothing applied to the result of the first smoothing (default: 5).
u - Period for the third EMA smoothing applied to the result of the second smoothing (default: 3).
Notes:
q must be greater than 0.
r, s, and u must be greater than 0. If r, s, or u is equal to 1, smoothing is not applied for that period.
The minimum number of rates required for calculation is (q - 1 + r + s + u - 3 + 1).
You may also like: Global Macro Trend Agreement Indicator - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#include <williamblau.mqh> // include file (terminal_data_folder\mql5\include)
#property indicator_separate_window // indicator in a separate window
#property indicator_buffers 11 // number of buffers used
#property indicator_plots 1 // number of graphic plots
#property indicator_level1 -25 // level #0
#property indicator_level2 25 // level #1
#property indicator_levelcolor silver // level line color
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.