Skip to content
All library documents

Building a Rainbow Indicator from Cascaded Moving Averages

Article ProRealCode

Summary

The indicator plots a sequence of moving averages, with each average after the first applied to the preceding one. The first line smooths closing prices; subsequent lines repeatedly smooth that result using the same period. Users can adjust the period and moving-average mode, and display between one and five lines as a colored cluster on a price chart.

This construction creates successively smoother series that can help visualize price direction and the effect of repeated smoothing. The document describes the indicator and provides an implementation example, but gives no trading rules, tested results, or evidence that the lines generate profitable signals. Repeated smoothing can add lag, and the post does not explain how to interpret line crossings or spacing. It is therefore a charting tool whose usefulness depends on a separate, validated decision process.

Key ideas

  • The first moving average is calculated from closing prices.\nEach later line smooths the preceding moving average with the same period.\nThe indicator supports up to five lines and a configurable moving-average mode.\nThe post gives no signal rules or performance evidence.\nRepeated smoothing may make the indicator lag price changes.

Tags

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