Skip to content
All library documents

Visualizing Price and Moving-Average Gaps with a Color Histogram

Article MQL5 code base

Summary

This indicator places two moving averages, labeled fast and slow, in the main chart window and uses a colored histogram to show the gap between a selected pair of values. The histogram can represent price versus the fast average, price versus the slow average, or the fast average versus the slow average. When a price-to-average comparison is selected, the price type is configurable. Optional labels display the values of the two moving averages.

The document explains a charting and visualization concept rather than a complete trading system. It does not specify parameter settings, color interpretation, signal rules, test results, or evidence that histogram changes forecast returns. The display may help a trader inspect relative price and average positioning, but the source provides no guidance for converting that view into entries, exits, or risk controls. Any trading use would therefore require additional rules and independent validation.

Key ideas

  • The indicator plots fast and slow moving averages in the main chart window.
  • Its colored histogram can show the gap between price and either average or between the averages.
  • The compared price type can be selected for price-to-average displays.
  • Optional labels show the values of the two moving averages.
  • The document gives no trading rules or performance evidence.

Tags

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