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

Moving Average Cross - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resource

author EAcpu | 2 reads | 0 comments |

Crossing Moving Average - expert for MetaTrader 5

Crossing Moving Average - expert for MetaTrader 5

Crossing Moving Average - expert for MetaTrader 5

Author of the idea : Screenwriter

MQL5 code author : Balabashka Kong

The EA only runs when a new bar appears. Open interest is always fixed and set in many ranges. StopLoss , TakeProfit and TrailingStop parameters can be disabled - to do this, set the appropriate value to "0.0". The last trailing step parameter - the trailing step.

Two moving averages ( the first and the second ) are used. Crossover is defined in a very simple way (it is not the most accurate method, but it is the simplest) - by analyzing the indicator values ​​on two adjacent bars:

 //--- Buy signal if (MA_First[ 1 ]>MA_Second[ 1 ]+ExtMA_Minimum Distance&& MA_First[ 2 ]  2]-ExtMA_minimum distance)
... //--- sell signal if (MA_First[ 1 ]  1 ]-ExtMA_MinimumDistance && MA_First[ 2 ]>MA_Second[ 2 ]+ExtMA_Minimum Distance)
...

Where:

The filter then checks each signal momentum indicator using the following command - Momentum Filter Check Parameter Override.

Visually, this looks like this:

Crossing Moving Average - expert for MetaTrader 5

EURUSD M15 test:

Crossing Moving Average - expert for MetaTrader 5


Attachment download

📎 crossing_moving_average.mq5 (47.55 KB)

Source: MQL5 #21515

Crossed Moving Average - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resource Usage and Screening Suggestions

Crossed Moving Average - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 resources are resources related to Forex indicators. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.

Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.

Verification code Refresh