Skip to content
All library documents

Sylvain Vervoort Rainbow Moving Average Calculation

Article MQL5 code base

Summary

This document explains how to calculate the Sylvain Vervoort Rainbow Moving Average from closing prices. It has one adjustable input, the period. The calculation starts with a simple moving average, then applies a sequence of linearly weighted moving averages to the preceding average. Those ten values are combined in a weighted sum: the first four receive descending weights, while the remaining six each receive equal unit weight, and the total is divided by twenty.

The document describes the indicator’s construction but gives no trading rules, chart examples, performance evidence, or guidance on selecting a period. It therefore teaches a smoothing calculation rather than a complete strategy. As with other moving averages, its usefulness for a particular market or timeframe would require independent assessment; the text does not discuss lag, false signals, or how to combine the indicator with risk controls.

Key ideas

  • The indicator uses a configurable period as its sole input.
  • It begins with a simple moving average of closing prices.
  • Nine successive linearly weighted moving averages are applied to earlier stages.
  • The ten stages are combined with larger weights on the earliest four values and normalized by twenty.
  • The document provides no entry, exit, or risk management rules.

Tags

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