Notifications
Clear all

2 MA Crossover Robot for MetaTrader 4 (moving average crossover)

1 Posts
1 Users
0 Reactions
50 Views
Full Trader
(@fulltrader)
Member Admin
Joined: 2 year aug
Posts: 104
Topic starter  

The 2 MA Crossover robot is an automatic expert advisor for MetaTrader 4 that trades one of the most classic and transparent strategies in trading: the crossover of two moving averages. It is an excellent starting point for anyone new to algorithmic trading, because its logic is easy to understand, to optimize and to adapt to any currency pair or asset.

How it works

The robot constantly monitors two simple moving averages: a fast one and a slow one. When the fast average crosses the slow one from below, it reads bullish momentum and opens a buy. When the fast one crosses the slow one from above, it opens a sell. Each trade closes at a fixed Take Profit or when the next opposite crossover appears. It performs best in markets with a defined trend.

Configurable parameters

  • Position size: lot volume of each trade.
  • Fast and slow average: the periods of the two averages that generate the signals.
  • Stop Loss and Take Profit: maximum loss and profit target, in pips.
  • Close on the next signal: switches between fixed Take Profit or closing on the opposite crossover.

Recommended requirements

  • MetaTrader 4 with a low spread broker, preferably an ECN account.
  • H1 or H4 timeframes for cleaner signals. A VPS is recommended to trade without interruptions.

File contents: .mq4 source code ready to compile in MetaEditor. Before using it live, always test it on a DEMO account and optimize the average periods in the Strategy Tester.

View the original robot documentation on EarnForex (Apache-2.0 license)



   
Quote
Scroll to Top