Expert Advisors: MQL5 Wizard - Trade Signals Based on Reversal Candlestick Patterns

 

MQL5 Wizard - Trade Signals Based on Reversal Candlestick Patterns:

MQL5 Wizard provides the automatic creation of Expert Advisors (see MQL5 Wizard: Creating Expert Advisors without Programming).

The CSignalCandles class provides trade signals, based on reversal candlestick patterns. The strategy called "Signals based on reversal candlestick patterns" (when creating EA automatically in MQL5 Wizard).

The idea of the system is to indentify the reversal patterns using the calculation of the composite candle. The reversal patterns is similar to the "Hammer" and ">Hanging Man" patterns in Japanese candlestick analysis. But it uses the composite candle instead the single candle and doesn't need the small body of the composite candle to confirm the reversal.

Testing Results of the Expert Advisor with trading signals, based on the reversal candlestick patterns

Author: MetaQuotes Software Corp.


 
Good afternoon! Could you please advise how to supplement the Expert Advisor code so that the column (or column) of the MT5 comment is filled in when opening and closing positions. So that it would be visible which Expert Advisor opened or closed a trade. Thank you.
 

We need to specify the right comment when sending a request from OrderSend(). Here is an example of how to do this using the CTrade class

//+------------------------------------------------------------------+
//|AddCommentToPosition.mq5 |
//| Copyright 2011, MetaQuotes Software Corp. | |
//|http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2011, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
#property script_show_inputs
#include <Trade/Trade.mqh>

//--- input parameters
input string   comment="From the script.";
//+------------------------------------------------------------------+
//| Script programme start function|
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   CTrade trade;
   
   trade.Buy(0.1,_Symbol,0,0,0,comment);

  }
//+------------------------------------------------------------------+

Result:


 

Thank you. I understand that this is the code when writing a new Expert Advisor, or can it be inserted into any existing Expert Advisors by copying this code? I am interested in -to insert it into Expert Advisors that are already in the database, for example, this one: Moving Averages.mq5

 
How to install ?
 
I have downloaded all the files. but I can't use it when creating an EA. it is not in the list of signals
 
Could you tell me how the code would look like, if the price trades above the average of period N, then the Expert Advisor would only enter to buy, ignore signals to sell, and vice versa, if below, then only sell?
 

Dear all, good morning!


I tried to use the algorithm to trade on MT5 on the Brazilian Stock Exchange, and it has no movement. When I debugged the algorithm, it showed consistency errors in lines 34,35,36 and 51 of the auxiliary file "SignalCandles.mqh". - Please be so kind as to point out how to correct these errors, or edit the corrected auxiliary file.

 

Paulo,


The programmes are made for forex, which has several peculiarities that are not compatible with the B3 or BMF.

If you still have doubts, I suggest this article to start programming in mql5: https://www.mql5.com/en/articles/100.

With a few adaptations, you can run it on the B3 and BMF, which in practice would be a simplification, as many forex parameters are unnecessary, such as margin calculation, volume checking, order expiry time, leverage, etc.


Abs,


Luciano

Guia passo a passo para iniciantes para escrever um Expert Advisor no MQL5
Guia passo a passo para iniciantes para escrever um Expert Advisor no MQL5
  • www.mql5.com
Este artigo é destinado a iniciantes que desejam aprender como escrever Consultores Especialistas simples na nova linguagem MQL5. Nós começaremos primeiro definindo o que queremos que o nosso CE (Consultor Especialista) faça, e descrição então passaremos para como nós queremos que o CE o faça. 1. Estratégia de negociação Ele irá monitorar um...
 
Someone could tell me how to install this, because I try with the indications but it does not help me, thank you very much nice night.
 
Hello, is there any update version that replace this one? Bcos the CSignalCandles class seem no longer exist.

Thx