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

 
t101:
Downloaded it, generated it through the Wizard, tried to run it in the tester. It doesn't work. It doesn't even access the CheckOpenLong/Short() methods in samplesignal. They are called in ExpertSignal, but not in SampleSignal. What else can I do to override them for sure?

Is this what you have been doing:

Forum on trading, automated trading systems and testing trading strategies

Discussion of the article "How to write a trading signals module for MQL5 Wizard"

SaprykinON, 2015.02.06 19:04

In the comments you need to replace the line

//|| Type=Signal

to

//|| Type=SignalAdvanced

After that my master started to see the signal.


and so:

It should be noted that in order for this file to be later "detected" by the MQL5 Wizard as a signal generator, it should be created in the Include\Expert\Signal\ folder.

?
 
Karputov Vladimir:

That's what you did:


and like this:

?
Yeah.
 
Try it yourself. Only with the latest build, I don't exclude that it used to work.
 
t101:
Try it yourself. Only with the latest build, I do not exclude that it used to work.

Perhaps after the release of the article the structure of signals has been changed. I picked up my article Generator of trading signals of custom indicator - there is a signals module in the article. I ran it in the tester - the signal module works.

Генератор торговых сигналов пользовательского индикатора
Генератор торговых сигналов пользовательского индикатора
  • 2013.07.19
  • Karputov Vladimir
  • www.mql5.com
Как сделать генератор торговых сигналов основанный на пользовательском индикаторе. Как создать пользовательский индикатор. Как получить доступ к данным пользовательского индикатора. Зачем нужна конструкция IS_PATTERN_USAGE(0) и model 0.
 
Karputov Vladimir:

Perhaps after the article was published the structure of signals has been changed. I picked up my article Generator of trading signals of custom indicator - the article has a signal module. I ran it in the tester - the signals module works.

You have no methods CheckOpenLong(), CheckOpenShort() or CheckCloseLong(), CheckCloseShort() there. You use only LongCondition() and ShortCondition().
 
t101:
You don't have CheckOpenLong(), CheckOpenShort() or CheckCloseLong(), CheckCloseShort() methods there. You only use LongCondition() and ShortCondition().
I don't mind, but what should I do if I need functions of position closing in my signal module?
 

I have added a CheckOpenLong() declaration to your file:

public:

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


And a description:

bool CSignalMyCustInd::CheckOpenLong(double &price,double &sl,double &tp,datetime &expiration)
  {
   Print(__FUNCTION__+": TEST!");
   return(false);
  }


But it doesn't get here. Only the method of the same name in ExpertSignal is executed. What is the right way to do it?
 
t101:

I have added a CheckOpenLong() declaration to your file:

public:

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


And a description:

bool CSignalMyCustInd::CheckOpenLong(double &price,double &sl,double &tp,datetime &expiration)
  {
   Print(__FUNCTION__+": TEST!");
   return(false);
  }


But it doesn't get here. Only the method of the same name in ExpertSignal is executed. How to do it correctly?

Since this article was published, the MQL5 Wizard has been changed: MQL5 Wizard: New Version. The Expert Advisor generated by the new wizard

will trade according to the selected algorithms of trading signals, maintenance of open positions and capital and risk management.

 
If you need to implement your own closing algorithms, how is it supposed to be done? Should I write my own module for maintaining open positions?
 
t101:
If you need to implement your own closing algorithms, how is it supposed to be done? Should I write my own module for maintaining open positions?
Or a capital management module. What exactly to choose, you need to look at it in detail.