Skip to content
All library documents

Displaying Smoothed Trend Direction Across Multiple Timeframes

Article MQL5 code base

Summary

This article describes a chart indicator that displays slope-based trend direction across nine timeframes in one panel. It explains how the indicator uses an existing slope-direction method, with a selectable second moving-average smoothing method. The author says using a simple average for that pass can make the display less reactive than applying linear weighting twice, which may help avoid misleading short-term readings.

The panel marks each timeframe as rising, falling, or flat. When the current reading is flat, it checks earlier readings to show the direction of the last non-flat trend. The article also outlines how the indicator creates and positions chart objects, checks that enough bars are available, refreshes the display on incoming ticks, and removes its objects when closed. It provides implementation details rather than performance evidence: no tests establish predictive value, and the article defers explanation of the underlying trend calculation and any trading rules to other material.

Key ideas

  • The indicator puts slope-based trend readings for nine timeframes in one chart panel.
  • Users can select the second moving-average method used to smooth the trend calculation.
  • A flat reading is colored according to the most recent prior non-flat direction.
  • The article explains display and update mechanics but does not test whether the indicator predicts prices.

Tags

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