X2MACandle indicator with two colored channels based on standard deviations from High and Low of the indicator candles. The indicator brightness is decreased for ease of the candle chart analysis. For a normal display of the indicator, check the “Chart on foreground” checkbox in the chart properties.
//+----------------------------------------------+ //|  INDICATOR INPUT PARAMETERS                 | //+----------------------------------------------+ input Smooth_Method MA_Method1=MODE_SMA_;              //first smoothing averaging method input int Length1=12;                                  //depth of the first smoothing                    input int Phase1=15;                                  //first smoothing parameter, //---- for JJMA within the range of -100 ... +100, it influences the quality of the transition process; //---- for VIDIA it is a CMO period, for AMA it is a slow average period input Smooth_Method MA_Method2=MODE_JJMA;              //second smoothing averaging method input int Length2 = 5;                                //depth of the second smoothing input int Phase2=15;                                  //second smoothing parameter, //---- for JJMA within the range of -100 ... +100, it influences the quality of the transition process; //---- for VIDIA it is a CMO period, for AMA it is a slow average period input uint Gap=10;                                    //unconsidered gap in points input uint BBLength=10;                                // Bollinger period                                                  input double BandsDeviation=1.0;                      // deviation
The indicator uses SmoothAlgorithms.mqh library classes (copy it to <terminal_data_folder>MQL5Include). The use of the classes was thoroughly described in the article
Fig. 1. X2MACandle_Chl