Trading Signals from Candlestick Patterns and Stochastic Indicator using MQL5 Wizard

Trading Signals from Candlestick Patterns and Stochastic Indicator using MQL5 Wizard
Download ALL MT5 experts (1592)
YouTube Video Thumbnail



Similar MetaTrader Tools

Trading Signals from Candlestick Patterns and Stochastic Indicator using MQL5 Wizard

Info

The Trading Signals from Candlestick Patterns and Stochastic Indicator using MQL5 Wizard is a Expert Advisor for MetaTrader 5 that traders can now leverage trading signals based on trading signal classes, position tracking, and money management. With the standard library, you can develop and test your own trading systems by writing a custom indicator or expert advisor.

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 Trading Signals from Candlestick Patterns and Stochastic Indicator using MQL5 Wizard

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

Traders can now leverage trading signals based on trading signal classes, position tracking, and money management.

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: Interactive Chart Trading Panel with Risk Management for MT5 - another powerful expert for MetaTrader 5 traders.

Traders can now leverage trading signals based on trading signal classes, position tracking, and money management.

Also recommended: Trading Panel EA - Enhanced Trade Management - similar expert with strong performance on MetaTrader 5.


With the standard library, you can develop and test your own trading systems by writing a custom indicator or expert advisor.

This report describes indicators and trading strategies for technical analysis, focusing on reversal candlestick patterns combined with confirmations from the Stochastic indicator.

Using reversal candlestick patterns with oscillator signals can reduce false signals and increase trading system efficiency.

In this description, we will examine the results of combining these models with indicator signals.


1. Bullish and Bearish Candlestick Models and Their Detection

The system includes functions for detecting the formation of various bullish and bearish candlestick patterns (excluding hammer/hanging man combinations).

The formation of a bearish candlestick pattern is checked by the `checkpatternallbullish()` function.

The formation of a bullish candlestick pattern is checked by the `checkpatternallbearish()` function.


2. Trading Signals Combined with Stochastic Indicator

Opening a long or short position occurs when a bullish or bearish model is formed and confirmed by the Stochastic indicator. The %d signal line value should be above or below the critical levels of 30 and 70.

An exit signal is generated in two scenarios:

When an opposite candlestick pattern is formed (a bearish pattern for a long position, or a bullish pattern for a short position).

Based on the subsequent behavior of the Stochastic indicator. If the indicator reaches the opposite market level (80 for a long position, 20 for a short position) or if it does not confirm the reversal signal and reaches 20 for a long position or 80 for a short position.

Checking market entry and exit conditions is performed in the following methods:

int ccp_stoch::longcondition() - checks conditions for opening a long position (m_pattern_0) and closing a short one (m_pattern_1).

int ccp_stoch::shortcondition() - checks conditions for opening a short position (m_pattern_0) and closing a long one (m_pattern_1).


2.1. Opening a Long Position and Closing a Short One

The signal to open a long position is the formation of a bullish candlestick combination and the condition `stochsignal(1)<30` (the Stochastic signal line value on the last completed bar is less than 30).

The signal to close a short position is the formation of a bullish candlestick pattern, or when the Stochastic signal line crosses the 20-level upwards or the 80-level upwards.


2.2. Opening a Short Position and Closing a Long One

The signal to open a short position is the formation of a bearish candlestick pattern and the condition `stochsignal(1)>70` (the Stochastic signal line value on the last completed bar exceeds 70).

The signal to close a long position is the formation of a bearish candlestick pattern, or when the Stochastic signal line crosses the 80-level downwards or the 20-level downwards.


2.3. Creating an Expert Advisor Based on Trading Signals of "Candlestick Patterns+Stochastic" Reversal Pattern Using MQL5 Wizard

The `ccp_stoch` class is not part of the standard library of trading signals. Download the `ccp_stoch.mqh` file and save it to the `terminal_folder\include\expert\signal\mysignals` directory. The `candlepatterns.mqh` file should be in the same directory. Relaunch MetaEditor to use the file in the MQL5 Wizard.

To create a trading robot following this strategy via MQL5 Wizard, select "Signals based on candlestick patterns+stochastic" as the signal type in the second step.

In subsequent steps, specify the necessary type and system. The Expert Advisor code will be generated automatically and then compiled to be ready for testing.


2.4. Testing Results

Results of Expert Advisor testing on historical data (EURUSD H1, testing period: 1.1.2000-2.2.2011, periodK=33, periodD=37, periodSlow=30, MA_period=25).

This Expert Advisor uses a module for trading a fixed volume of 0.1 lots. Trailing stop is not used.

The optimal set of trading system parameters can be found using the MetaTrader 5 optimization tools.

The code of the Expert Advisor generated by the MQL5 Wizard is attached in the `expert_cp_stoch.mq5` file.

You may also like: Blue Moon EA: Advanced EMA Envelope Trading for MT5 - 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\ccp_stoch_m.mqh>
#include <expert\trailing\trailingnone.mqh>
#include <expert\money\moneyfixedlot.mqh>
input string         expert_title           ="expert_cp_stoch"; // document name
ulong                expert_magicnumber     =15642;             // 
bool                 expert_everytick       =false;             // 

.......

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.