Opening, closing in Expert Advisor generated by MQL5 Wizard - page 7

 
Andy:

Perhaps.

Also, Vladimir, could you advise on the scheme - what is this block of market patterns (selecting the strongest signal) and in what form is it in the MQL Wizard?

***


As far as I understood it, there is no selection of the strongest signal among the models of one module.


Andy:

***

And then how to remove the arrow lines from the chart obtained as a result of your file?


Close the STRATEGY TESTER and all icons, lines will disappear :)

 
Andy:

OK, but if there are two modules, then what selects the signal (and the example of calculating a signal from two modules, which is in the help, does not mention this)?

***


When there is more than one module (described in the articleMQL5 Wizard: New Version) all signals are resultant and the final forecast (direction and strength) is obtained


Andy:

***

If I ran the file directly on the chart and not in the tester, how can I remove it?

Remove: Right click on the graph and select "List of objects". In the opened window press "All" button, then you have to select everything: "Ctrl" + "C" and delete: "Delete" button. To avoid creating these objects in the future, use an Expert Advisor based on the standard module "SignalMA.mqh".
 
Andy:

Yes, it's retractable as an object. I'll deal with the pattern information I've received.

Well then, what's on the diagram at the very top (where signal 100 is selected) - I can't figure out where it might be in the Wizard, what do you think?


I don't understand. Insert a picture showing the correct area.

 
Andy:
In the diagram the top part - where it says selection of a stronger signal (100) and market patterns. This is selected by what and even without scales?

I don't understand, paste the picture already.

 
Andy:

You have inserted a whole drawing. I'm waiting for you to circle the right section - otherwise it's not clear what you're asking again.

 
Andy:

I have corrected it - look there just below my line above the picture.


Edit the picture: circle the area of interest, then formulate your question.

 
Andy:

I have edited the post above - take a look.


I already replied on the last page:

Forum on trading, automated trading systems and strategy testing

Opening and Closing in Expert Advisor Generated by MQL5 Wizard

Vladimir Karputov, 2017.09.29 12:54


As far as I understand, there is no selection of the strongest signal among the models of one module.

***


 
Andy:

And another question - why is the m_base_price value assigned in the MA signal module when all patterns (1-3) are selected, but not when pattern 0 is selected?


Let's see ...

 
Andy:

And another question - why when selecting all patterns (1-3) in the MA signal module m_base_price is assigned, but not when selecting pattern 0?


I got it this way: the CExpert class contains an object -m_signal

//+------------------------------------------------------------------+
//| Class CExpert.                                                   |
//| Purpose: Base class expert advisor.                              |
//| Derives from class CExpertBase.                                  |
//+------------------------------------------------------------------+
class CExpert : public CExpertBase
  {
protected:
***
   //--- trading objects
***
   CExpertSignal    *m_signal;                   // trading signals object
***

- which is a parent object of CExpertSignal class. The trading signals module (let SignalMA.mqh in this case) is inherited and its descendant is CExpertSignal.

The Trading Signals module, when the pattern 2 is triggered, its descendant writes some price into them_base_price variable (it is not even important which one). But here, the CExpertSignal class does not access them_base_price variable of our signals module - when a position is opened, the CExpertSignal class refers to them_base_price variable of them_signal object - the parent object of the CExpertSignal class.

It turns out that it makes no sense to write any value intothem_base_pricevariable in the Trading Signals module.

 
Andy:
There, when m_base_price=0, it takes the Ask or Bid price, depending on the Buy/Sell condition, except for pattern 2 (it takes the MA price as a pending order), but why is it all and why isn't it used at all for 0 pattern?

Yes, BUT: m_base_price variable looks for parent object, not for signal module.