Moving Average Crossover EA for MT4/MT5

Moving Average Crossover EA for MT4/MT5
Download ALL MT4 experts (885)
YouTube Video Thumbnail



Similar MetaTrader Tools

Moving Average Crossover EA for MT4/MT5

Info

The Moving Average Crossover EA for MT4/MT5 is a Expert Advisor for MetaTrader 4 that this expert advisor (ea) utilizes exponential moving averages (emas) for its trading strategy. Trading Logic:- A buy signal is generated when the EMA with a period of 2 crosses above the EMA with a period of 35.

Usage

This tool is typically used for automated trading on major forex pairs and gold.

Platform

This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.


How to Install and Use Moving Average Crossover EA for MT4/MT5

1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.

2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.

3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.

4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.

Frequently Asked Questions

Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.

Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.

Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.

What this tool does

This Expert Advisor (EA) utilizes Exponential Moving Averages (EMAs) for its trading strategy.

Typical Use Case

This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.

Compatible Platform & Setup

This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.

Description & Settings

Related: e-moving in wl2: automated stop loss adjustment - another powerful expert for MetaTrader 4 traders.

This Expert Advisor (EA) utilizes Exponential Moving Averages (EMAs) for its trading strategy.

Also recommended: moving average grid ea - similar expert with strong performance on MetaTrader 4.


Trading Logic:
- A buy signal is generated when the EMA with a period of 2 crosses above the EMA with a period of 35.
- A sell signal is generated when the EMA with a period of 2 crosses below the EMA with a period of 35.
- Stop Loss is set at 30 pips.
- Take Profit is set at 200 pips.
- Trailing Stop is set at 60 pips.

Users can modify the EMA periods and other parameters within the EA's code.

Strategy Tester Report

MA MA 2-35 EA

Broker: xm.com-demo (build 509)

Symbol: EURUSD (Euro vs US Dollar)

Period: 4 Hours (H4) from 2013.06.03 00:00 to 2014.02.19 23:59 (2013.06.01 - 2014.02.20)

Model: Open Prices Only (for automated strategies that control bar openings directly)

Parameters:
Magic Number: 10001
Lots: 1
Stop Loss: 30
Take Profit: 300
Trailing Stop: 60
Slippage: 3

Bars in Test: 2113

Ticks Used in Model: 3223

Modeling Quality: n/a

Every Tick Based on Real Ticks (for backtesting)

Initial Deposit: 10000.00

Total Net Profit: 4482.40

Gross Profit: 13169.40

Gross Loss: -8687.00

Profit Factor: 1.52

Expected Payoff: 99.61

Absolute Drawdown: 0.00

Maximal Drawdown: 3550.80 (24.42%)

Relative Drawdown: 24.42% (3550.80)

Total Trades: 45

Short Positions (Profitable %): 23 (30.43%)

Long Positions (Profitable %): 22 (31.82%)

Winning Trades (% of Total): 14 (31.11%)

Losing Trades (% of Total): 31 (68.89%)

Largest
Winning Trade: 2989.20

Largest
Losing Trade: -311.60

Average
Winning Trade: 940.67

Average
Losing Trade: -280.23

Maximum
Consecutive WINS (Profit): 2 (3939.20)

Maximum
Consecutive LOSSES (Loss): 8 (-2322.80)

Largest
uninterrupted profit (sum of winning trades): 3939.20 (2 trades)

Largest
uninterrupted loss (sum of losing trades): -2322.80 (8 trades)

Average
consecutive WINS: 1

Average
consecutive LOSSES: 3

This report reflects backtesting results up to 2026.

You may also like: average range monitor (arm) - excellent alternative for expert users on MetaTrader 4.

Source Code

extern int magicnumber=10001;
extern double lots =0.1;
extern double stoploss=50;
extern double takeprofit=150;
extern int trailingstop=50;
extern int slippage=3;
int start()
{
  double mypoint=point;
  if(digits==3 || digits==5) mypoint=point*10;

.......

Leave your opinion, ask a question, share some knowledge

Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.