Skip to content
All library documents

Calculating the Trend Intensity Index from Moving-Average Deviations

Article MQL5 code base

Summary

The Trend Intensity Index (TII), attributed in the document to M. H. Pee, estimates the balance of recent closing prices above and below a longer moving average. For the described 30-day version, calculate a 60-day simple moving average, then compare each of the most recent 30 closes with that average. A close above it contributes an upward deviation equal to the difference; a close below contributes a downward deviation measured in the opposite direction. The index expresses the proportion of deviations that are upward or downward.

The document suggests using changes in the indicator’s displayed color as signals, but gives no explicit threshold rules, trade entries, exits, or risk controls. It provides no examples, market context, or performance evidence, and does not explain how deviation magnitudes are aggregated into the final percentage. As presented, TII is a compact trend-state concept whose practical interpretation and trading use require further specification and testing.

Key ideas

  • The described TII compares the latest 30 closing prices with a 60-day simple moving average.
  • Closes above the average produce upward deviations, while closes below it produce downward deviations.
  • The index represents the share of deviations pointing upward or downward.
  • The document proposes indicator color changes as signals without defining trading rules.
  • It provides no performance evidence or details on how deviation magnitudes are combined.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.