Skip to content
All library documents

Classifying Price Breakouts Around a Moving Average

Article MQL5 code base

Summary

This indicator displays a color-coded histogram based on the relationship between a bar’s high and low and a moving average. It has three configurable inputs: the moving average period, calculation method, and applied price. The classification also checks whether the average is rising or falling relative to its value on the previous bar.

When the bar’s low is above the average, the indicator assigns one of two colors according to the average’s direction; when the bar’s high is below the average, it uses two other colors based on the same comparison. The description does not specify what happens when the moving average lies within the candle’s range, nor does it provide signal interpretation, entry or exit rules, or performance evidence. It is therefore a visual price-location and average-slope tool, not a fully defined trading strategy. The label suggests breakouts, but the rules described classify bars relative to the average rather than test breakout profitability.

Key ideas

  • The indicator classifies bars according to whether their full range sits above or below a moving average.
  • Within each case, the moving average’s direction versus the prior bar selects between two colors.
  • Users can adjust the average period, calculation method, and applied price.
  • The description does not define a classification for bars that span the moving average.
  • No entry rules, exit rules, or performance evidence are provided.

Tags

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