Skip to content
All library documents

Building a Rainbow Moving-Average Indicator with Linear or Fibonacci Spacing

Article ProRealCode

Summary

This ProRealTime v11 indicator plots a family of moving averages over a chosen close-price series. The user sets the fastest period, the number of additional averages, the moving-average type, and either a constant period increment or a multiplicative spacing factor. In the multiplicative mode, starting from a Fibonacci-number period and using a factor near the Fibonacci ratio produces periods that approximate a Fibonacci sequence. The averages are drawn as colored segments with a gradient that progresses across the set.

The accompanying notes advise reducing the step width before switching to nonlinear spacing and caution that exponential spacing can become computationally expensive as the number of averages grows. The example gives settings and implementation logic, but offers no trading rules, market rationale, or performance tests. The indicator is therefore a visualization of moving-average structure; the document does not establish that its spacing or display produces predictive signals.

Key ideas

  • The indicator plots multiple moving averages whose periods can be spaced linearly or multiplicatively.
  • A Fibonacci-number starting period and a factor near the Fibonacci ratio create Fibonacci-like periods.
  • A color gradient distinguishes averages across the set.
  • The notes warn that many averages with exponential spacing can increase calculation time.
  • The document provides no trading signal rules or evidence of predictive performance.

Tags

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