Real Author:
The simple oscillator indicator displayed as colored cloud. The color of cloud indicates the direction of trend.
Indicator Input Parameters:
//+----------------------------------------------+ //| Indicator input parameters | //+----------------------------------------------+ input uint  HL_Period=55; //---- input Smooth_Method SmoothMethod=MODE_JJMA; // Smoothing method input uint SmoothLength=3; // Smoothing depth                    input int SmoothPhase=100; // Smoothing parameter input uint UpLevel=80; // Overbought level input uint DnLevel=20; // Oversold level input color UpLevelsColor=Purple; // Overbought level color input color DnLevelsColor=Purple; // Oversold level color input STYLE Levelstyle=DASH_;   // Levels style input WIDTH  LevelsWidth=Width_1; // Levels width Â
This indicator allows to select averaging algorithms out of ten possible versions:
- 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 with the use of the Tushar Chande’s algorithm
- AMA – smoothing with the use of the Perry Kaufman’s algorithm
It should be noted that Phase parameters for different smoothing algorithms have completely different meaning. For JMA it is the Phase external variable changing from -100 to +100. For T3 it is the smoothing ratio multiplied by 100 for better visualization, for VIDYA it is the CMO oscillator period and for AMA it is the slow EMA period. In other algorithms these parameters do not affect smoothing. For AMA, the fast EMA period has a fixed value and is equal to 2 by default. The ratio of raising to the power is also equal to 2 for AMA.
The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes was thoroughly described in the article “Averaging Price Series for Intermediate Calculations Without Using Additional Buffers”.
Fig.1 The XPercentR-PCR Indicator