The X2MA_KLx3_Cloud indicator, designed in the DRAW_FILLING style, showcases a vibrant colored background filling that traders will find visually compelling.
Indicator Input Parameters:
//+-----------------------------------+ //| Indicator Input Parameters | //+-----------------------------------+ input Smooth_Method MA_Method1=MODE_SMA; // First smoothing method input int Length1=40; // First smoothing depth input int Phase1=15; // First smoothing parameter input Smooth_Method MA_Method2=MODE_JJMA; // Second smoothing method input int Length2=20; // Second smoothing depth input int Phase2=100; // Second smoothing parameter input int KeltnerPeriod=20; // Keltner smoothing period input double Ratio = 2.0; // First level ratio input Applied_price_ IPC=PRICE_CLOSE; // Applied price input int Shift=0 // Horizontal shift of the indicator in bars input int PriceShift=0 // Vertical shift of the indicator in points
The middle line of the indicator is crafted using an algorithm that employs two smoothing techniques, giving you the flexibility to choose from a variety of 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 using Perry Kaufman's algorithm.
Keep in mind that the Phase1 and Phase2 parameters vary in significance depending on the chosen smoothing algorithm. For instance, in the case of JMA, it acts as an external Phase variable ranging from -100 to +100. For T3, it serves as a smoothing ratio multiplied by 100 for clarity, while in VIDYA, it represents the CMO oscillator period, and for AMA, it signifies a slow EMA period. In other algorithms, these parameters may not influence smoothing. Notably, for AMA, the fast EMA period is fixed and set to 2 by default, and the ratio also stands at 2.
This indicator utilizes the SmoothAlgorithms.mqh library classes, which you must copy to the terminal_data_folder\MQL5\Include. For a detailed explanation on using these classes, check out the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

Comments 0