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

Smoothed ATR, recalculated into price chart points.
It uses color to show whether a trend is strengthening or weakening. Red corresponds to a strengthening trend, and yellow corresponds to a weakening trend.
Indicator input parameters:
//+------------------------------------------------+ //|Indicator input parameters | //+------------------------------------------------+ Input integer ATR period = 12 ; // ATR period Enter Smooth_Method XMA_Method=MODE_JJMA; // Smoothing method Input integer X length = 5 ; // smoothing depth Input integer X phase = 15 ; // Smoothing parameter Enter integer shift = 0 ; // horizontal movement of the indicator in bars
You can change the averaging algorithm among ten possible options in the indicator:
It should be noted that the Phase parameters of different smoothing algorithms have completely different meanings. For JMA, it is an external Phase variable that varies from -100 to +100. For T3, it is the smoothing coefficient multiplied by 100 for better visualization. For VIDYA, it is one CMO oscillator period. And for the AMA, this is a slow EMA period. These parameters do not affect smoothing in other algorithms. For AMA, the fast EMA period is a fixed value, equal to 2 by default. The power supply factor of AMA is also fixed at 2.
The indicator uses the SmoothAlgorithms.mqh library class (to be copied to terminal_data_directory\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 ColorXATR indicator
The indicator was first implemented in MQL4 and published in the code base on April 26, 2011.
Attachment download
📎 colorxatr.mq5 (7.84 KB)
📎 smoothalgorithms.mqh (133.8 KB)
Source: MQL5 #1038
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •