Skip to content
All library documents

A Cumulative Moving Average Trend Filter for Closing Prices

Article ProRealCode

Summary

This indicator builds a trend measure by comparing each close with a simple moving average, using a period shown as 30. It increments a running score when the close is above the average and decrements it otherwise. A second moving average is then calculated on that cumulative score and displayed as a trend filter. The idea is to turn repeated closes on either side of the price average into a smoothed directional reading, potentially helping trend followers assess persistence.

The author describes the method as a simple way to reduce conventional whipsaw, but supplies no test results, examples, or defined trading rules to support that claim. The indicator’s behavior also depends on the initialization and persistence of its running score, details not explained in the text. It is therefore a proposed visualization and decision aid rather than evidence of a profitable strategy; users would need to specify implementation details and test it across markets and conditions.

Key ideas

  • The indicator compares each closing price with a simple moving average of the close.
  • It adds one to a running score above the average and subtracts one otherwise.
  • A second moving average smooths the cumulative score as a trend filter.
  • The example uses a 30-period price average, while the text offers no empirical validation.
  • Initialization details and rules for turning the indicator into trades are not provided.

Tags

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