Unlocking the X2MA_BBx3_Cloud Indicator for MetaTrader 5: A Trader's Guide

Mike 2012.02.02 19:50 25 0 0
Attachments

If you're looking to take your trading game to the next level, the Bollinger Bands ® in the DRAW_FILLING style might just be the tool you need. This indicator presents a colorful background that enhances visibility, making it easier to interpret market movements.

Input Parameters:

//+-----------------------------------+
//| Indicator input parameters        |
//+-----------------------------------+
input Smooth_Method MA_Method1=MODE_SMA// First smoothing method
input int Length1=100;                   // 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 BandsPeriod=100;                // BB smoothing period
input double BandsDeviation = 2.0;        // Number of deviations
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 this indicator is derived from a universal moving average that utilizes two smoothing methods, allowing you to select from a variety of options:

  1. SMA - Simple Moving Average;
  2. EMA - Exponential Moving Average;
  3. SMMA - Smoothed Moving Average;
  4. LWMA - Linear Weighted Moving Average;
  5. JJMA - JMA Adaptive Average;
  6. JurX - Ultralinear Smoothing;
  7. ParMA - Parabolic Smoothing;
  8. T3 - Tillson's Multiple Exponential Smoothing;
  9. VIDYA - Smoothing using Tushar Chande's Algorithm;
  10. AMA - Smoothing using Perry Kaufman's Algorithm.

It's essential to realize that the Phase1 and Phase2 parameters differ significantly across smoothing algorithms. For example, in JMA, it acts as an external Phase variable ranging from -100 to +100. For T3, it's a smoothing ratio multiplied by 100 for clarity, while VIDYA uses it as a CMO oscillator period. For AMA, the fast EMA period is preset at 2, and the raising power ratio is also set to 2 by default.

This indicator leverages the SmoothAlgorithms.mqh library classes (make sure to copy these to the terminal_data_folder\MQL5\Include). For an in-depth explanation of using these classes, check out the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

X2MA_BBx3_Cloud

List
Comments 0