The Moving Average of Oscillator (OsMA) is an essential tool for traders, representing the difference between the oscillator value and its smoothed counterpart.
In this context, the basic MACD line acts as the oscillator, while the signal line provides the smoothing functionality.
OSMA = MACD - SIGNAL
Here's what that means:
- MACD: The MACD indicator value (histogram);
- SIGNAL: The averaged value of the MACD indicator.
This indicator lets you customize the smoothing type of the MACD histogram and its signal line, offering ten different options:
- SMA - simple moving average;
- EMA - exponential moving average;
- SMMA - smoothed moving average;
- LWMA - linear weighted moving average;
- JJMA - JMA adaptive average;
- JurX - ultralinear smoothing;
- ParMA - parabolic smoothing;
- T3 - Tillson's multiple exponential smoothing;
- VIDYA - smoothing using Tushar Chande's algorithm;
- AMA - smoothing based on Perry Kaufman's algorithm.
It's important to understand that the phase type parameters for various smoothing algorithms have distinct meanings. For instance, in JMA, the phase variable ranges from -100 to +100, while for T3, it represents a smoothing ratio multiplied by 100 for better visualization. In VIDYA, it corresponds to the CMO oscillator period, and for AMA, it's linked to the slow EMA period. Notably, in other algorithms, these parameters don't influence smoothing. The fast EMA period in AMA is a fixed value of 2 by default, with the raising power ratio also set at 2.
To utilize this indicator, you’ll need to copy the SmoothAlgorithms.mqh library classes into your terminal_data_folder\MQL5\Include directory. A detailed overview of using these classes can be found in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".


Comments 0