Download MQ L5 Wizard - Trade Signals Based on Morning/Evening Stars + CC I for MetaTrader 5

MQ L5 Wizard - Trade Signals Based on Morning/Evening Stars + CC I

MQ L5 Wizard - Trade Signals Based on Morning/Evening Stars + CC I

This software component for MetaTrader 5 is built to enhance the capabilities of your trading environment. 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 Morning/Evening Stars + CC I

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


The allows creating ready-made Expert Advisors based on the classes delivered together with the client terminal (see for the details). It allows to check your trade ideas quickly, all you need is to create your own trading signals class. The structure of this class and example can be found in the article .
The generic idea is the following: the class of trading signals is derived from , the next, it's necessary to override the and virtual methods with your own methods.
There is a book " (in Russian), there are many trading strategies are considered there, we will focus on reversal candlestick patterns, confirmed by , , and oscillators.
The best way is to create the separate class, derived from for checking of formation of candlestick patterns. For confirmation of trade signals, generated by candlestick patterns, it's sufficient to write the class, derived from CCandlePattern and add the necessary features (for example, confirmation by oscillators) there.
Here we will consider the signals, based on "Morning Star/Evening Star" (Morning Doji Star/Evening Doji Star) reversal candlestick patterns, confirmed by indicator. The module of trade signals is based on the class, it's simple example of its use for creation of trade signals with candlestick patterns.
1."Morning Star" and "Evening Star" reversal candlestick patterns
1.1. Morning Star
This pattern indicates the reversal of downtrend, it consists of three candles (Fig. 1). After a long black candle there is a candle (the color isn't important) with a small body, which lies outside the body of the black candle. The small body of a candle means that strengths of the bulls and bears are equal and market is ready to change the trend.
The third candle of the pattern is the bullish candle, it's body isn't overlapped with the body of the second candle, and close price lies inside the body of the first (bearish) candle. The resulting candle of the model is also plotted at Figure 1.
For the case if the second candle is doji-like-candle, the model is named "Morning Doji Star".
Fig. 1. "Morning Star" and "Morning Doji Star" candlestick patterns
The identifying of "Morning Star" pattern is implemented in CheckPatternMorningStar() and CheckPatternMorningDoji() methods of class:
The CheckCandlestickPattern(CANDLE_PATTERN_MORNING_STAR) and CheckCandlestickPattern(CANDLE_PATTERN_MORNING_DOJI) methods of class are used to check formation of "Morning Star" and "Morning Doji Star" candlestick patterns.
1.2. Evening Star
This pattern indicates the reversal of uptrend, it consists of three candles (Fig. 2). After a long white candles there is a candle (the color isn't important) with a small body, which lies outside the body of the white candle. The small body of a candle means that strengths of the bulls and bears are equal and market is ready to change the trend.
The third candle of the pattern is the bearish candle, it's body isn't overlapped with the body of the second candle, and close price lies inside the body of the first (bullish) candle. The resulting candle of the model is also plotted at Figure 2.
For the case if the second candle is doji-like-candle, the model is named "Evening Doji Star".
Fig. 2. "Evening Star" and "Evening Doji Star" candlestick patterns
Here are the methods for identifying of "Evening Star" and "Evening Doji Star" patterns:
The CheckCandlestickPattern(CANDLE_PATTERN_EVENING_STAR) and CheckCandlestickPattern(CANDLE_PATTERN_EVENING_DOJI) methods of class are used to check formation of "Evening Star" and "Evening Doji Star" candlestick patterns.
2. Trade signals, confirmed by CCI indicator
The trading signals to open long or short position must be confirmed by indicator. The value of CCI must be greater/lower than critical levels (-50 for long position and 50 for short position).
The closing of opened position depends on the values of CCI. It can be done in 2 cases:

if CCI line has reached the opposite critical level (80 for long position and -80 for short position)

if the reverse signal isn't confirmed (when CCI reaches the following levels: -80 for long position and 80 for short position)
Fig. 3. The "Evening Star" pattern, confirmed by CCI indicator

int CMS_ES_CCI::LongCondition() - checks conditions to open long position (returns 80) and close of the short position (returns 40);

int CMS_ES_CCI::ShortCondition() - checks conditions to open short position (returns 80) and close of the long position (returns 40).
2.1. Open long position/Close short position

The formation of "Morning Star" pattern must be confirmed by indicator: CCI(1)<-50 (the value of the CCI of the last completed bar must be less than -50).

The short position must be closed if the indicator has crossed upward the critical level -80 or crossed downward the critical level 80.

2.2. Open short position/Close long position

The formation of "Evening Star" pattern must be confirmed by indicator: CCI(1)>50 (the value of the CCI indicator of the last completed bar must be greater than 50).

The long position must be closed if indicator has crossed downward the -80 or 80 levels.

2.3. Creating Expert Advisor using MQL5 Wizard
The CMS_ES_CCI class isn't included in the Standard Library classes, to use it, it's necessary to download the acms_es_cci.mqh file (see attachments) and save it to the client_terminal_data_folder\MQL5\Include\Expert\Signal\MySignals. The same should be done with the candlepatterns.mqh file. You can use it in MQL5 Wizard after restart of the MetaEditor.
To create an Expert Advisor launch :
Fig. 4. Creating Expert Advisor using MQL5 Wizard
Let's specify the name of the Expert Advisor:
Fig. 5. General properties of the Expert Advisor
After that we need to select the modules of trade signals used.
Fig. 6. Signal properties of the Expert Advisor
In our case we use only one module of trade signals.
Adding the "
Signals based on Morning/Evening Stars confirmed by CCI
" module of trading signals:
Fig. 7. Signal properties of the Expert Advisor
Module of trade signals added:
Fig. 8. Signal properties of the Expert Advisor
You can select any trailing properties, but we will use "Trailing Stop not used":
Fig. 9. Trailing properties of the Expert Advisor
Concerning the money management properties, we will use "Trading with fixed trade volume":
Fig. 10. Money management properties of the Expert Advisor
By pressing the "Finish" button, we will get the code of the generated Expert Advisor, located in Expert_AMS_ES_CCI.mq5, it will be saved in terminal_data_folder\MQL5\Experts\.
The default input parameters of the generated Expert Advisor:
must be replaced to:
The Signal_ThresholdOpen/Signal_ThresholdClose input parameters allow to specify threshold levels for open and close of positions.
In code of the LongCondition() and ShortCondition() methods of the trade signals class we have specified the fixed values of the threshold:

Open position: 80;

Close position: 40.
The Expert Advisor, generated by MQL5 Wizard open and close position using the "votes" from the modules of trade signals. The vote of the main module (as container, it consist of all the modules added) is also used, but its LongCondition() and ShortCondition() methods always return 0.
The vote results of the main module is also used in "votes" averaging. In our case we have: main module + 1 module of trade signals, so we need to take this fact into account when setting of the threshold values. Because of this fact the ThresholdOpen and ThresholdClose must be set as 40=(0+80)/2 and 20=(0+40)/2.
The values of Signal_StopLevel and Signal_TakeLevel input parameters is set to 0, it means that closing of the positions will be done only when closing conditions will be true.
2.4. History backtesting results
Let's consider backtesting of the Expert Advisor on historical data (EURUSD H1, testing period: 2009.01.01-2011.03.16, PeriodCCI=25, MA_period=5).
In creation of Expert Advisor we used the fixed volume (, 0.1), Trailing Stop algorithm is not used ().
Fig. 11. Testing results of the Expert Advisor, based on Morning/Evening Stars + CCI
The best set of input parameters can be found using the of MetaTrader 5 client terminal.
The code of the Expert Advisor, created by MQL5 Wizard is attached in expert_ams_es_cci.mq5.

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