Root Mean Square - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources



Checking to see if this exists as a standalone function/indicator, since I didn't find it, it is
The RMS (Root Mean Square) value is calculated by squaring the value, taking the average of the squared values, and then taking the square root of the average. This calculation works for a set of values, especially in the context of waveforms in electrical engineering.
RMS is also known as quadratic mean (expressed as 𝑀2 )
What you need to know if you want to use it:
I've seen the quadratic mean implemented as a moving average, but it seems people forget to compare it to some other averages
The RMS or Quadratic Mean is equal to the SMA (Simple Moving Average) when applied to a set of values that are always equal to or greater than 0
As long as there is a negative value, the result will be wrong (it's just a result of the formula used for the calculation), so it cannot be used as a normal moving average without the restrictions described

Attachment download
📎 root_mean_square.mq5 (8.2 KB)
Source: MQL5 #50398
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •