One of the most popular and simple trading strategies involves the use of a slow moving average and a fast moving average, using the crossover of the two as entry signal. Here you can download an expert advisor to run this strategy on MetaTrader 4 and see its strengths and weaknesses.
- Position Size to define the position size.
- Use next entry to close the trade to specify to use a specific take-profit or to wait for the next entry signal.
- Stop-loss in pips.
- Take-profit in pips.
- Slippage in pips.
- Enable trade to enable or disable the trading function.
- Fast moving average period.
- Slow moving average period.
The type of MA used is simple moving average.
- Buy when the fast moving average crosses the slow one from below.
- Sell when the slow moving average crosses the fast one from above.
- Fixed take-profit OR
- Close when the next order opens.
Results on EUR/USD @ M30
Backtesting results for EUR/USD on M30 timeframe is not very exciting. With the current setup and rules, the expert advisor is generally not profitable with any currency and any timeframe.
The strategy is very simple and is based on only two indicators. It works well in case of a clear trend. Under perfect conditions, a clear long trend can be very profitable.
The expert advisor is too simple and is negatively impacted by ranging market.
What Is It Good For?
It wouldn't be a good idea to use this expert advisor on a real account. It isn't generally profitable and is too affected by ranging market.
This expert advisor is free to download and use.
If you want to save hours of research and coding and you want to see some professional code, have a look at this expert advisor. You can use it to build your own EA.
EA-2MACrossover_v1-0.mq4 is a simple expert advisor for MT4 that opens an order at the crossover of a fast moving average with a slow moving average.
Downloads➥ Download EA-2MACrossover_v1-0.mq4
- Download the expert advisor .mq4 file.
- Open the MetaTrader 4 data folder (via File→Open Data Folder).
- Open the MQL4 Folder.
- Copy the .mq4 file to MQL4/Experts/ subfolder.
- Restart MetaTrader 4 or refresh the expert advisors list by right-clicking the Navigator subwindow of the platform and choosing Refresh.
Or you can read a more detailed instruction on how to perform the installation.
If you are interested in building your own expert advisor or knowing more about how to do it, check our MT4 Expert Advisor Template.