RobotFX curates the best open-source MetaTrader code to inspire your trading automation.
Uses the idea of the classical moving average smoothing. The class can be used when you want to smooth out any array of type double without using the standard indicator.
The class sample requires the following:
- Fill in the array double in_mas[];
- Set the values of the variables int in_period (smoothing period), int in_dim (array size);
- Perform the procedure ini() to initialize the arrays;
- Perform the procedure void zap_mas2(), which forms a smoothed array double out_mas[].
An example of using the class is available in the indicator line.mq5
Reduce lag and improve accuracy with the NonLagMA Expert Advisor for MT4/MT5. Discover it.

Build better strategies with RobotFX professional tools – check them out.
2210