Skip to content
All library documents

Root Mean Square and Its Limits as a Moving Average

Article MQL5 code base

Summary

Root mean square (RMS), also called the quadratic mean, is computed by squaring observations, averaging those squares, then taking the square root. The note introduces RMS as a standalone calculation and discusses applying it to a rolling set of price-related values as a possible indicator.

It warns that RMS is not interchangeable with a simple moving average. In fact, the document's claim that RMS equals the simple average for any nonnegative inputs is mathematically inaccurate: RMS is generally at least as large as the arithmetic mean for nonnegative values, with equality only when the values are all equal. For mixed positive and negative inputs, squaring removes the signs, so the result does not behave like a conventional average that preserves direction. The note offers no market tests or evidence of trading value; it is chiefly a reminder to understand the measure's properties before using it as an indicator.

Key ideas

  • RMS is the square root of the mean of squared observations.
  • Squaring removes the signs of negative inputs, so RMS does not preserve directional information.
  • For nonnegative values, RMS is generally greater than or equal to the arithmetic mean, not always equal to it.
  • RMS equals the arithmetic mean when all observations in the set are identical.
  • The note provides no empirical evidence that an RMS-based trading indicator is useful.

Tags

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