Trade Signals Using Morning/Evening Stars Confirmed by CCI Indicator in MT5
Info
The Trade Signals Using Morning/Evening Stars Confirmed by CCI Indicator in MT5 is a Expert Advisor for MetaTrader 5 that this tool enables the creation of ready-made expert advisors (eas) based on classes provided with the client terminal. It allows for quick testing of your trading ideas, requiring only the creation of your own trading signals class.
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 Trade Signals Using Morning/Evening Stars Confirmed by CCI Indicator in MT5
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
This tool enables the creation of ready-made Expert Advisors (EAs) based on classes provided with the client terminal.
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: Quantora Trade Manager MT5: Advanced Position Management - another powerful expert for MetaTrader 5 traders.
This tool enables the creation of ready-made Expert Advisors (EAs) based on classes provided with the client terminal. It allows for quick testing of your trading ideas, requiring only the creation of your own trading signals class. The structure of this class and an example can be found in the accompanying article.Also recommended: Professional Automatic Trailing Stop Utility for MetaTrader 5 - similar expert with strong performance on MetaTrader 5.
The generic concept involves deriving a trading signals class from the base class and overriding the virtual methods with your custom logic.
A reference book, "
It is recommended to create a separate class derived from the base class for identifying candlestick patterns. For signal confirmation, a class derived from the CCI indicator class can be used to add necessary features.
This guide details signals based on "Morning Star/Evening Star" (including Doji variants) reversal candlestick patterns, confirmed by the CCI indicator. The trading signal module is built upon a base class, offering a straightforward example for creating signals with candlestick patterns.
Morning Star and Evening Star Reversal Candlestick Patterns
Morning Star
This pattern signals a downtrend reversal and consists of three candles. Following a long black candle, a candle with a small body appears, not overlapping the black candle's body. This indicates a balance between buying and selling pressure, suggesting a potential trend change. The third candle is a bullish candle whose body does not overlap the second candle's body, with its closing price within the first candle's body. Figures illustrate the pattern and its Doji variant.
The identification of "Morning Star" and "Morning Doji Star" patterns is handled by specific methods within the relevant class. These methods are used to check for the formation of these candlestick patterns.
Evening Star
This pattern indicates an uptrend reversal and also consists of three candles. After a long white candle, a candle with a small body appears, not overlapping the white candle's body, suggesting a potential trend change. The third candle is a bearish candle whose body does not overlap the second candle's body, with its closing price within the first candle's body. Figures illustrate the pattern and its Doji variant.
Methods are provided for identifying "Evening Star" and "Evening Doji Star" patterns, utilized to check for their formation.
Trade Signals Confirmed by CCI Indicator
Trading signals for opening long or short positions must be confirmed by the CCI indicator. The CCI value must be above -50 for long positions and below 50 for short positions. Position closure depends on CCI values, specifically when the line reaches opposite critical levels (80 for long, -80 for short) or when a reverse signal is not confirmed (at -80 for long, 80 for short).
Methods are available to check conditions for opening long/short positions and closing short/long positions, returning specific values for these actions.
Open Long Position / Close Short Position
The formation of a "Morning Star" pattern requires confirmation from the CCI indicator (CCI < -50). A short position should be closed if the CCI crosses the -80 level upwards or the 80 level downwards.
Open Short Position / Close Long Position
The formation of an "Evening Star" pattern requires confirmation from the CCI indicator (CCI > 50). A long position should be closed if the CCI crosses the -80 level downwards or the 80 level upwards.
Creating an Expert Advisor Using the MQL5 Wizard
The trading signal class is not part of the standard library. You need to download the provided .mqh files and place them in the appropriate client terminal folders (e.g., \MQL5\Include\Expert\Signal\MySignals). You can then use them in the MQL5 Wizard after restarting MetaEditor.
To create an Expert Advisor, launch the MQL5 Wizard. Specify the Expert Advisor's name and configure its general properties. Afterward, select the trade signal modules to be used. In this case, only one module, "Signals based on Morning/Evening Stars confirmed by CCI," is selected.
After adding the module, you can choose trailing stop properties (defaulting to not used) and money management properties (defaulting to fixed trade volume).
Upon clicking "Finish," the Expert Advisor code will be generated and saved in the \MQL5\Experts\ folder.
The default input parameters of the generated Expert Advisor require adjustment. The `signal_thresholdopen` and `signal_thresholdclose` parameters control the threshold levels for opening and closing positions. These correspond to the fixed values set within the trade signals class methods (e.g., 80 for open, 40 for close).
The Expert Advisor uses
You may also like: Quantora Risk Calculator MT5 - Professional Trade Risk and Reward Calculator - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.00"
#include <expert\expert.mqh>
#include <expert\signal\mysignals\acms_es_cci.mqh>
#include <expert\trailing\trailingnone.mqh>
#include <expert\money\moneyfixedlot.mqh>
input string expert_title ="expert_ams_es_cci"; // document name
ulong expert_magicnumber =7663; //
bool expert_everytick =false; //
.......
⚠ 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.