Multi-Timeframe Moving Average Crossover Expert Advisor
Info
The Multi-Timeframe Moving Average Crossover Expert Advisor is a Expert Advisor for MetaTrader 5 that expert advisor signals based on moving average intersectionthis expert advisor generates trading signals based on the intersection of two moving average (ma) lines. A long position signal is generated when the MA of the current timeframe crosses the MA of a higher timeframe upwards.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Multi-Timeframe Moving Average Crossover Expert Advisor
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
Expert Advisor Signals Based on Moving Average IntersectionThis Expert Advisor generates trading signals based on the intersection of two Moving Average (MA) lines.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Moving Average Crossover Expert Advisor - another powerful expert for MetaTrader 5 traders.
Expert Advisor Signals Based on Moving Average IntersectionAlso recommended: Neon Desk: Manual Trading Panel with Multi-Timeframe Bias for MT5 - similar expert with strong performance on MetaTrader 5.
This Expert Advisor generates trading signals based on the intersection of two Moving Average (MA) lines.
A long position signal is generated when the MA of the current timeframe crosses the MA of a higher timeframe upwards.
A short position signal is generated when the MA of the current timeframe crosses the MA of a higher timeframe downwards.
Upon receiving a signal, an appropriate position is opened, and any opposing position is closed.
This Expert Advisor is designed for hedging accounts. It will display a warning and unload if run on a netting account.
An external indicator is not required as the calculation of the necessary moving averages is implemented directly within the EA's code.
The Expert Advisor offers the flexibility to reverse indicator signals, allowing sells to be opened on buy signals and vice versa. You can also configure Stop Loss and Take Profit levels in points. If invalid Stop Loss or Take Profit values are provided, the EA will automatically adjust them to the minimum allowed for the symbol.
The EA also adjusts the lot size if an incorrect value is specified. If the specified lot size is too large, it will be adjusted to a value that allows a position to be opened. If there are insufficient funds to open even the minimum lot size, the signal will be skipped.
Please note that this Expert Advisor is intended for training purposes.
Input Parameters:
- Experts Magic Number: A unique identifier for the EA's positions.
- Period of MA: The calculation period for the moving average on the higher timeframe. The calculation period for the current timeframe's MA is selected automatically.
- Timeframe of MA: The timeframe used for calculating the higher timeframe's moving average.
- Reverse Trade: Choose to reverse signals (Yes/No). If set to 'Yes', a short position will be opened on a long signal, and vice versa.
- Lots: The volume of positions to open.
- Stop Loss in Points: The Stop Loss level for a position, specified in points.
- Take Profit in Points: The Take Profit level for a position, specified in points.
- Slippage of Price: The maximum allowable price slippage when opening a position.
- Multiplier Spread for Stops: A spread multiplier used to calculate the correct distance for stop orders. There is a minimum allowed distance for placing stop loss, take profit, and pending orders, known as the 'stop level'. If the 'stop level' is zero, it indicates a floating stop level, typically related to the spread. This parameter allows for a custom multiplier of the spread to determine the minimum distance for placing stop orders.
Testing and Optimization (2026)
The strategy was tested using data from 2017.01.02 to 2018.01.19. Initially, with default settings, the EA did not yield optimal results. However, when tested in reverse mode with the 'Period of MA' optimized between 1 and 20 (step 1), better results were observed. The optimal value found for maximum balance was a period of 8.
Figure 1: Testing results from 2017.01.02 to 2018.01.19, Period 8, Reverse Trades Enabled.
Figure 2: Testing chart from 2017.01.02 to 2018.01.19, Period 8, Reverse Trades Enabled.
You may also like: Relative Moving Average EA - excellent alternative for expert users on MetaTrader 5.
Source Code
/
.......
⚠ 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.