XMACD_HTF - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources





This version of the Standard Moving Average Convergence and Divergence can be found by setting a different indicator timeframe value than the chart. The indicator also allows traders to choose histogram and signal line smoothing algorithms from ten possible variants:
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 colors of the histogram and signal lines change based on current market conditions.
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.
The indicator was first implemented in MQL4 and published in the article Efficient Average Algorithm with Minimal Lag: Use in Indicators and Expert Advisors of March 3, 2009.
Place ColorXMACD.mq5 into terminal_directory\MQL5\Indicators.

Figure 1. ColorXMACD_HTF, ReDraw parameter equals false

Figure 2. ColorXMACD_HTF with ReDraw parameter equal to true
Attachment download
📎 colorxmacd.mq5 (10.73 KB)
📎 colorxmacd_htf.mq5 (12.26 KB)
📎 smoothalgorithms.mqh (133.8 KB)
Source: MQL5 #1011
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •