Download MQ L5 Wizard - Trade Signals Based on Three Moving Averages for MetaTrader 5

MQ L5 Wizard - Trade Signals Based on Three Moving Averages

MQ L5 Wizard - Trade Signals Based on Three Moving Averages

This is a powerful addition to your MetaTrader 5 toolkit designed to optimize market analysis and performance. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.

MT5 expert Pack 📂

How to Setup and Use MQ L5 Wizard - Trade Signals Based on Three Moving Averages

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.

Description & Settings


allows to create the code of Expert Advisors automatically. See for the details.
Here we will consider the trend strategy, based on three moving averages. The strategy called
"Signals based on three EMA"
. To determine the trend, it uses three exponentially smoothed moving averages: FastEMA, MediumEMA and SlowEMA.
Trade signals:

Buy signal: FastEMA>MediumEMA>SlowEMA (upward trend).

Sell signal: FastEMA<MediumEMA<SlowEMA (downward trend).
This strategy is implemented in CSignal3EMA class (the signal3ema.mqh must be placed to terminal_data_folder\MQL5\Include\Expert\Signal\Signal3EMA.mqh).
Figure 1. Trade signals, based on three moving averages
Trade Signals
The trading strategy is implemented in CSignal3EMA class, it has some protected methods to simplify access to values of three moving averages (Fast, Medium, Slow):
The indicator values of the 0th (uncompleted) bar may change, so it's necessary to perform the checking of trade conditions using the completed (formed) bars data.
1. Open long position
The upward trend is determined by following condition: FastEMA>MediumEMA>SlowEMA:

FastEMA(1)>MediumEMA(1): Fast EMA is higher than Medium EMA (last completed bar);

MediumEMA(2)>SlowEMA(1): Medium EMA is higher than Slow EMA (last completed bar);
2. Close long position
The downward trend is determined by following condition: FastEMA<MediumEMA<SlowEMA:

FastEMA(1)<MediumEMA(1): Fast EMA is lower than Medium EMA (last completed bar);

MediumEMA(2)<SlowEMA(1): Medium EMA is lower than Slow EMA (last completed bar); You may improve the closing of long position: it isn't necessary to wait for the downward trend, you may close long positions when flat, which can be determined by following conditions: FastEMA<MediumEMA>SlowEMA.
3. Open short position
4. Close short position
You may improve the closing of short position: it isn't necessary to wait for the upward trend, you may close short positions when flat, which can be determined by following conditions: FastEMA>MediumEMA<SlowEMA.
Creating Expert Advisor using MQL5 Wizard
To create a trading robot based on the strategy you need to choose the signal properties as "
Signals based on three EMA
" in "Creating Ready-Made Expert Advisors" option of :
Figure 2. Choose "Signals based on three EMA" in MQL5 Wizard
The next you have to specify the needed algorithm and system. The code of Expert Advisor will be created automatically, you can compile it and test in of MetaTrader 5 client terminal.
Testing Results
Let's consider backtesting of the Expert Advisor on historical data (EURUSD H1, testing period: 1.1.2010-05.01.2011, FastPeriod=5, MediumPeriod=12, SlowPeriod=24, StopLoss=400, TakeProfit=900).
In creation of Expert Advisor we used the fixed volume (, 0.1), Trailing Stop algorithm is not used ().
Figure 3. Historical backtesting results of the Expert Advisor, based on three EMA
Attachments:
The Signal3EMA.mqh with CSignal3EMA class must be placed to terminal_data_folder\MQL5\Include\Expert\Signal.
The threeema.mq5 file contains the code of the Expert Advisor, created using MQL5 Wizard.

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators