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

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

author EAcpu | 5 reads | 0 comments |

XMA_TrendSignal - indicator for MetaTrader 5

The XMA_TrendSignal indicator defines three states of the market such as flat, trending and very strong trend.

During consolidation, the indicator value is set to -1 or +1 depending on the direction of movement. In a moderate trend, the values ​​are -2 or +2, in a strong trend, the values ​​are -3 and +3. Depending on the strength and direction of the trend, the indicator bars are colored accordingly. The primary tool for measuring the strength of a trend in an indicator is the rate of trend change expressed in points. Input parameters for fixing this rate threshold:

 Input unit MA1_level = 20 ; // flat trigger
Input unit MA2_level = 60 ; // Trend trigger

This indicator needs to be carefully set up for each specific financial instrument and its time frame display. For each time frame, it should have its own optimal trigger level setting!

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.

XMA_TrendSignal - indicator for MetaTrader 5

Figure 1 XMA_TrendSignal indicator


Attachment download

📎 smoothalgorithms.mqh (130.19 KB)

📎 xma_trendsignal.mq5 (10.27 KB)

Source: MQL5 #1351

Verification code Refresh