Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

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

author EAcpu | 3 reads | 0 comments |

XADX - indicator for MetaTrader 5

XADX - indicator for MetaTrader 5

To determine trend stability, J. Welles Wilder developed the Average Directional Index (ADX).

ADX allows analyzing market trends and making trading decisions, including the Forex market.

However, the appearance of this indicator leaves a lot to be desired - it's not very visually convenient.

In order to improve the ColorXADX.mq5 indicator code has been created, in which the +DI and -DI lines are displayed in the draw_fill style, the color of which changes according to the current trend direction, and the cloud width is proportional to the strength of the trend. ADX lines are constructed in the form of points. Their color depends on the strength of the trend defined by the position of these points relative to the horizontal, whose values ​​are assigned in the settings.

These indicators are built by using a universal smoothing with two averages, and each average can be chosen from a dozen possible versions:

It should be noted that the Phase parameter has completely different meanings for different smoothing algorithms.

The indicator uses the SmoothAlgorithms.mqh library class (must be copied to the 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.

XADX - indicator for MetaTrader 5

ColorXADX indicator input parameters:

 //+------------------------------------------------------------------------+
//|Indicator input parameters |
//+------------------------------------------------------------------------+
Enter Smooth_Method XMA_Method=MODE_T3; // Histogram smoothing method
Input integer ADX_period = 14 ; // XMA smoothing period
Input integer ADX_phase = 100 ; // XMA smoothing period [-100...+100]
Enter Applied_price_IPC=PRICE_CLOSE_; // Apply price
Enter integer shift = 0 ; // horizontal movement of the indicator in bars
Enter integer super high level = 60 ; // maximum trend level
Enter integer high level = 40 ; // Strong trend level
Enter integer low level = 20 ; // weak trend level
Input ENUM_LINE_STYLE level style = STYLE_DASHDOTDOT ; // Horizontal line style
input color level color = blue; // level color
Input ENUM_WIDTH level width=w_1; // level width

Attachment download

📎Color xadx.mq5 (12.63 KB)

📎 xadx.mq5 (9.93 KB)

📎 smoothalgorithms.mqh (133.8 KB)

Source: MQL5 #586

Verification code Refresh