XMA_Range_Bands - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

Real author:
Daniel V. Bugaev
Using fixed-size channels often presents difficulties due to ever-changing market volatility. The provided indicator does not have such a drawback, it changes the channel size based on the average value of the candlesticks. At the same time, most of the common functions of the Moving Average indicator are preserved. In fact, on Keltner Channels, instead of the usual simple averaging of candlestick sizes, one of ten averaging versions can be used:
It should be noted that the Phase1 and Phase2 parameters have completely different meanings for different smoothing algorithms. For JMA, it is an external phase variable that varies from -100 to +100. For T3, it is the smoothed ratio multiplied by 100 for better visualization; for VIDYA, it is the CMO oscillation period; for AMA, it is the slow EMA period. In other algorithms, these parameters do not affect smoothing. For AMA the fast EMA period is a fixed value, equal to 2 by default. For AMA, the ratio of raised powers is also equal to 2.
The indicator was first implemented in MQL4 and released in the code base on July 16, 2009.
The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Figure 1 XMA_Range_Bands indicator.
Attachment download
📎 smoothalgorithms.mqh (133.8 KB)
📎 xma_range_bands.mq5 (9.37 KB)
Source: MQL5 #1273
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •