MQL5 Wizard: Trading Signals with Meeting Lines and RSI Confirmation

MQL5 Wizard: Trading Signals with Meeting Lines and RSI Confirmation
Download ALL MT5 experts (1593)
YouTube Video Thumbnail



Similar MetaTrader Tools

MQL5 Wizard: Trading Signals with Meeting Lines and RSI Confirmation

Info

The MQL5 Wizard: Trading Signals with Meeting Lines and RSI Confirmation is a Expert Advisor for MetaTrader 5 that this tool allows the creation of ready-made expert advisors (eas) based on provided classes. It facilitates rapid testing of trading ideas by enabling users to create their own trading signal classes.

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 MQL5 Wizard: Trading Signals with Meeting Lines and RSI Confirmation

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 allows the creation of ready-made Expert Advisors (EAs) based on provided classes.

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: automated trading with mq l5 wizard: crossover of two exponentially smoothed moving averages - another powerful expert for MetaTrader 5 traders.

This tool allows the creation of ready-made Expert Advisors (EAs) based on provided classes. It facilitates rapid testing of trading ideas by enabling users to create their own trading signal classes. The structure of these classes and usage examples are detailed in the accompanying documentation.

Also recommended: trade signals using reversal candlestick patterns in mql5 - similar expert with strong performance on MetaTrader 5.


The core concept involves deriving a trading signal class from a base class, then overriding specific virtual methods with custom logic.

A reference book, "" (in Russian), discusses numerous trading strategies. This guide focuses on reversal candlestick patterns, specifically the 'meeting lines' pattern, confirmed by the Relative Strength Index (RSI) oscillator.

It is recommended to create a separate class derived from a candlestick pattern class for detecting these patterns. To confirm trade signals generated by candlestick patterns, a class derived from `CCandlestickPattern` can be extended with additional confirmation logic, such as oscillator confirmation.

This guide specifically covers signals based on the 'bullish meeting lines' reversal candlestick pattern, confirmed by the RSI indicator. The trading signal module is built upon a base class, providing a simple example for creating candlestick pattern-based trade signals.


Meeting Lines Reversal Candlestick Patterns

Bullish Meeting Lines
This pattern consists of two candlesticks, a bearish and a bullish, with equal or very close closing prices. The body of both candlesticks should be greater than the average body length.
The 'bullish meeting lines' pattern signals a potential reversal of a downtrend.
Figure 1 depicts the 'bullish meeting lines' pattern.
The recognition of the 'bullish meeting lines' pattern is implemented within the `CheckPatternBullishMeetingLines()` method of the relevant class.
The `CheckCandlestickPattern(candle_pattern_bullish_meeting_lines)` method of the class is utilized to detect the formation of the 'bullish meeting lines' candlestick pattern.

Bearish Meeting Lines
This pattern comprises two candlesticks, a bullish and a bearish, with equal or very close closing prices. The body of both candlesticks should exceed the average body length.
The 'bearish meeting lines' pattern indicates a potential reversal of an uptrend.
Figure 2 illustrates the 'bearish meeting lines' pattern.
The detection of the 'bearish meeting lines' pattern is handled by the `CheckPatternBearishMeetingLines()` method of the class.
The `CheckCandlestickPattern(candle_pattern_bearish_meeting_lines)` method of the class is employed to identify the formation of the 'bearish meeting lines' candlestick pattern.


Trade Signals Confirmed by RSI Indicator

Trade signals for opening long or short positions must be confirmed by the RSI indicator. The RSI value should be below critical levels for long positions (e.g., below 40) and above critical levels for short positions (e.g., above 60).
The closing of open positions is determined by RSI values and can occur in two scenarios:

1. If the RSI reaches the opposite critical level (e.g., 70 for long positions, 30 for short positions).

2. If a reverse signal is not confirmed (e.g., when RSI reaches levels like 30 for long positions, 70 for short positions).

Figure 3 shows the 'bearish meeting lines' pattern confirmed by the RSI indicator.

The `LongCondition()` method of the `CML_RSI` class checks conditions for opening a long position (returns 80) and closing a short position (returns 40).

The `ShortCondition()` method of the `CML_RSI` class checks conditions for opening a short position (returns 80) and closing a long position (returns 40).

Open Long Position / Close Short Position

The formation of the 'bullish meeting lines' pattern must be confirmed by the RSI indicator: RSI(1) < 40 (the RSI value of the last completed bar must be less than 40).

A short position should be closed if the RSI has crossed above the critical levels of 70 or 30.

Open Short Position / Close Long Position

The formation of the 'bearish meeting lines' pattern must be confirmed by the RSI indicator: RSI(1) > 60 (the RSI value of the last completed bar must be greater than 60).

A long position should be closed if the RSI has crossed below the critical levels of 70 or 30.


Creating an Expert Advisor Using the MQL5 Wizard

The `CML_RSI` class is not part of the standard library. To use it, download the `ACML_RSI.mqh` file (from attachments) and save it to the `Client_Terminal_Data_Folder\MQL5\Include\Expert\MySignals` directory. Similarly, save the `ACandlestickPatterns.mqh` file to the same location. After restarting the MetaEditor, these classes will be available in the MQL5 Wizard.

To create an Expert Advisor, launch the MQL5 Wizard.
Figure 4 illustrates the process of creating an Expert Advisor.

Specify the name for the Expert Advisor.
Figure 5 shows the general properties of the Expert Advisor.

Next, select the trading signal modules to be used.
Figure 6 displays the signal properties of the Expert Advisor.

In this example, we will use only one trading signal module.

Add the 'Signals based on Bullish/Bearish Meeting Lines Confirmed by RSI' trading signal module.
Figure 7 shows the signal properties of the Expert Advisor after adding the module.

The trading signal module has now been added.
Figure 8 shows the signal properties of the Expert Advisor with the module added.

You can select any trailing properties; however, we will use 'Trailing Stop Not Used'.
Figure 9 illustrates the trailing properties of the Expert Advisor.

Regarding money management properties, we will use 'Trading with Fixed Trade Volume'.
Figure 10 displays the money management properties of the Expert Advisor.

Upon clicking the 'Finish' button, the generated Expert Advisor code will be created in `Expert_AML_RSI.mq5` and saved in the `Terminal_Data_Folder\MQL5\Experts\` directory.

The default input parameters of the generated Expert Advisor are as follows:
These parameters must be replaced with the following:

The `signal_thresholdopen` and `signal_thresholdclose` input parameters allow specifying threshold levels for opening and closing positions.

In the code of the `LongCondition()` and `ShortCondition()` methods of the trade signals class, fixed threshold values were specified:

Open position: 80;

Close position: 40.

The Expert Advisor generated by the MQL5 Wizard opens and closes positions using 'votes' from the trading signal modules. The vote from the main module (which acts as a container for all added modules) is also used, but its `LongCondition()` and `ShortCondition()` methods always return 0.

The vote results of the main module are also used in 'votes' averaging. In this scenario, with a main module plus one trading signal module, this must be considered when setting threshold values. Consequently, `thresholdopen` and `thresholdclose` should be set to 40 = (0 + 80) / 2 and 20 = (0 + 40) / 2, respectively.

The `signal_stoplevel` and `signal_takelevel` input parameters are set to 0, indicating that positions will only be closed when the defined closing conditions are met.


History Backtesting Results

Let's examine the backtesting results of the Expert Advisor using historical data (EURUSD H1, testing period: 2000.01.01-2011.03.01, RSI Period=11, MA Period=3).

During the Expert Advisor's creation, a fixed lot size (0.1) was used, and the trailing stop algorithm was not employed.

Figure 11 presents the testing results of the Expert Advisor based on Bullish/Bearish Meeting Lines + RSI.

The optimal set of input parameters can be determined using the Strategy Tester within the MetaTrader 5 client terminal.

The code for the Expert Advisor created by the MQL5 Wizard is attached as `Expert_AML_RSI.mq5`.

You may also like: mql5 wizard: trade signals with dark cloud cover/piercing line and rsi confirmation - excellent alternative for expert users on MetaTrader 5.

Source Code

/

.......

Leave your opinion, ask a question, share some knowledge

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.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.