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:
- 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.
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".

Comments 0