Implementing the True Strength Index as a Custom MQL5 Indicator
Summary
This tutorial explains how to implement the True Strength Index (TSI) as a custom MQL5 indicator. TSI normalizes a double-smoothed close-to-close momentum series by a double-smoothed series of absolute momentum, using two exponential smoothing periods. The article walks through creating an indicator with the MQL5 Wizard, choosing the calculation input, and placing the main logic in the calculation event handler.
It then describes the intermediate calculation buffers needed for momentum, absolute momentum, and both stages of smoothing, along with binding those buffers for internal calculations. The tutorial discusses using moving-average helper functions, handling the data range available for calculation, and configuring the displayed line and label. It provides implementation guidance rather than a trading rule or performance study: there are no reported backtest results, and the indicator’s usefulness depends on how a trader interprets or combines its momentum and overbought or oversold readings.
Key ideas
- TSI divides double-smoothed momentum by double-smoothed absolute momentum.
- The indicator uses separate buffers for the visible output and intermediate calculations.
- The calculation handler processes price arrays and updates indicator values as data change.
- MQL5 Wizard can create the indicator framework, which developers then complete and tune.
- The tutorial explains implementation, not evidence that TSI produces profitable trades.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.