Download MQ L5 Wizard - Trade Signals Based on Crossover of Main and Signal lines of MA C D indicator for MetaTrader 5

MQ L5 Wizard - Trade Signals Based on Crossover of Main and Signal lines of MA C D indicator

MQ L5 Wizard - Trade Signals Based on Crossover of Main and Signal lines of MA C D indicator

This tool for MetaTrader 5 is specifically engineered to streamline your trading operations. 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 Crossover of Main and Signal lines of MA C D indicator

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


provides the automatic creation of Expert Advisors (see ).
Here we will consider the trading signals, based on crossover of MACD indicator lines. The strategy called
"Signals based on crossover of main and signal MACD lines"
(when creating EA automatically in MQL5 Wizard).
The main line of MACD indicator is calculated as a difference of fast EMA and slow EMA. The signal line of MACD is calculated as the main line, smoothed with PeriodSignal period.
The trade signals:

Buy: upward crossover of main and signal lines of MACD indicator.

Sell: downward crossover of main and signal lines of MACD indicator.
This strategy is implemented in class of the of MQL5 Standard Library (located in MQL5\Include\Expert\Signal\SignalMACD.mqh).
Figure 1. Trade signals, based on crossover of main and signal MACD lines
Trade signals
The trading strategy is implemented in class, it has some protected methods to simplify access to indicator values:
1. Open long position
Conditions to open long position:

ExtStateMACD(1)==1; it means that main line has crossed upward the signal MACD line
2. Close long position
Conditions to close long position:

ExtStateMACD(1)==1; it means that main line has crossed downward the signal MACD line
3. Open short position
The conditions to open short position are the same as long position closing conditions.
4. Close short position
The conditions to close short position are the same as long position opening conditions.
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 crossover of main and signal MACD lines
" in "Creating Ready-Made Expert Advisors" option of :
Figure 2. Select "Signals based on crossover of main and signal MACD lines" 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, PeriodFast=12, PeriodSlow=24, PeriodSignal=9, StopLoss=20, TakeProfit=80).
In creation of Expert Advisor we used the fixed volume (, 0.1), Trailing Stop algorithm is not used ().
Figure 3. Testing Results of the Expert Advisor with trading signals, based on crossover MACD lines
Attachments:
The SignalMACD.mqh with class (included in ) is located at MQL5\Include\Expert\Signal folder. The testmacd.mq5 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