Discussion of article "MQL5 Wizard: How to Create a Module of Trading Signals" - page 3

 
In the new version of MQL5 Wizard, the format of signal modules has changed. Look here for information - https://www.mql5.com/ru/forum/3724/66962#comment_66962.
Обсуждение статьи "Мастер MQL5: Новая версия"
Обсуждение статьи "Мастер MQL5: Новая версия"
  • www.mql5.com
Изменения в архитектуре сигналов позволяют теперь создавать торговые роботы на основе комбинации различных рыночных моделей.
 
Rosh:
In the new version of MQL5 Wizard, the format of signal modules has changed. Look here for information - https://www.mql5.com/ru/forum/3724/66962#comment_66962.

I have made these changes, the wizard sees the new signal module, but the resulting Expert Advisor does not trade for some reason. Can I use debugging to get to the CheckOpenShort/CheckOpenLong functions?
 
I looked through the code of several ready signals from the Signal folder, there is no implementation of the CheckOpenShort/CheckOpenLong functions. Instead of them are used
//--- methods of checking if the market models are formed
   virtual int       LongCondition();
   virtual int       ShortCondition();
do I understand correctly? When writing my own module, do I need to implement them too? When will the CExpert class description appear?
 
beginner:

I looked through the code of several ready signals from the Signal folder, there is no implementation of the CheckOpenShort/CheckOpenLong functions. Instead of them are used correctly I understand?
Yes, that's correct.
 
Rosh:
Yeah, that's right.

To be honest, I'm a bit confused. There are CheckOpenShort/CheckOpenLong functions in the CExpertSignal class. You use other functions in your signals, and I don't understand where they are called in CExpert either. The problem is that I took a ready-made signal from the article about writing my own signals module, got the wizard to see it (you can probably make changes to the article about the new format) and got an Expert Advisor with this signal, but it doesn't trade, not a single deal in the tester for a year.

Functions are called in the constructor - it is clear, but why are not used standard functions?

 
Please see what's wrong. Not trading in the tester.
Files:
1.mq5  7 kb
 
beginner:

Please see what's wrong. It's not trading in the tester.

This module is trading.

For your case, replace for longs

if(  High(1) > High(2) && Low(2)>Low(3) && High(2)<High(3) && Close(3)>Open(3) ){
     return(100);
   }
//--- условие не выполнено
   return(0);  
  }

by

Open(1)< Open(2)

for shorts - find it yourself

Files:
 
gdtt:

this module trades

for your case, replace the longs

by

for shorts, you'll find it yourself.

Yes it does, thanks! I spent the day, I think I did everything as in the article, what is my mistake?
 
beginner:
Yes it does, thank you! I spent the day, I think I did everything like in the article, what is my mistake?

In the new wizard compared to the previous one, there are very big changes,

virtual bool CheckOpenLong(double& price,double& sl,double& tp,datetime& expiration);

virtual bool CheckOpenShort(double& price,double& sl,double& tp,datetime& expiration);

I understood as follows: there should be an object of CExpertSignal class among several objects used in the Expert Advisor with the main attribute, it can use these functions. other objects take part in opening positions through the functions

virtual int ShortCondition(); //check the Sell opening condition

virtual int LongCondition(); //check the condition for opening a Buy position

To dot the i's, we need an article on how to write your own signals module in the new wizard, so we are waiting for it.

 
Yes, the article is missing, and the CExpertSignal documentation probably needs to be updated.