Discussion of article "MQL5 Cookbook: Multi-Currency Expert Advisor - Simple, Neat and Quick Approach"

 

New article MQL5 Cookbook: Multi-Currency Expert Advisor - Simple, Neat and Quick Approach is published:

This article will describe an implementation of a simple approach suitable for a multi-currency Expert Advisor. This means that you will be able to set up the Expert Advisor for testing/trading under identical conditions but with different parameters for each symbol. As an example, we will create a pattern for two symbols but in such a way so as to be able to add additional symbols, if necessary, by making small changes to the code.

MQL5 Cookbook: Multi-Currency Expert Advisor - Simple, Neat and Quick Approach

Author: Anatoli Kazharski

 
Can you please tell me if the EventsSpy indicator should be placed in the window of each instrument added to the Expert Advisor?
 
RekkeR:
Could you please tell me if the EventsSpy indicator should be placed in the window of each instrument added to the Expert Advisor?
It is enough for the indicator to be located in the indicators folder: Metatrader5\MQL5\Indicators and the Expert Advisor will install everything by itself.
 
tol64:
It is enough that the indicator is located in the indicators folder: Metatrader5/MQL5/Indicators and the Expert Advisor will install everything by itself.

I didn't expect a quick response, thanks!

spy_indicator_handles[s]=iCustom(Symbols[s],_Period, "EventsSpy.ex5",ChartID(), 0,CHARTEVENT_TICK);

Could you please tell me why .ex5 is specified?

 
RekkeR:

Didn't expect a quick response, thanks!

spy_indicator_handles[s]=iCustom(Symbols[s],_Period, "EventsSpy.ex5",ChartID(),0,CHARTEVENT_TICK);

Could you please tell me why .ex5 is specified?

Why exactly so, I do not know. These are the rules. Look in the Help for the description of the iCustom function.
 
//+------------------------------------------------------------------+
//|| Gets indicator handles|
//+------------------------------------------------------------------+
void GetIndicatorHandles()
  {
//--- Let's go through all the characters.
   for(int s=0; s<NUMBER_OF_SYMBOLS; s++)
     {
      //--- If trading on this symbol is allowed
      if(Symbols[s]!="")
        {
         //--- If the handle has not yet been received
         if(signal_indicator_handles1[s]==INVALID_HANDLE || signal_indicator_handles2[s]==INVALID_HANDLE || signal_indicator_handles3[s]==INVALID_HANDLE || signal_indicator_handles4[s]==INVALID_HANDLE)
           {
            //--- Get the indicator handle
            signal_indicator_handles1[s]=iMA(Symbols[s],_Period,IndicatorPeriod1[s],0,MODE_SMA,PRICE_CLOSE);
            signal_indicator_handles2[s]=iMA(Symbols[s],_Period,IndicatorPeriod2[s],0,MODE_SMA,PRICE_CLOSE);
            signal_indicator_handles3[s]=iMA(Symbols[s],_Period,IndicatorPeriod3[s],0,MODE_SMA,PRICE_CLOSE);
            signal_indicator_handles4[s]=iMA(Symbols[s],_Period,IndicatorPeriod4[s],0,MODE_SMA,PRICE_CLOSE);
            //--- If the indicator handle could not be obtained
            if(signal_indicator_handles1[s]==INVALID_HANDLE || signal_indicator_handles2[s]==INVALID_HANDLE || signal_indicator_handles3[s]==INVALID_HANDLE || signal_indicator_handles4[s]==INVALID_HANDLE)
               Print("Failed to retrieve indicator handle for symbol "+Symbols[s]+"!");
           }
        }
     }
  }
tol64
:

Why that is, I don't know. These are the rules. Look in the Help for the description of the iCustom function.

Thank you.

It is strange that there is no excitement about this EA, you can say "the iron curtain of multicurrency is opened" for the masses.

It would be so complementary, add buffers for the use of additional indicators.

 
RekkeR:

Thank you.

It is strange that there is no excitement about this EA, you can say "the iron curtain of multicurrency is opened".

It has been ajar for a long time. I just posted my version, maybe it will be more convenient for someone.

Here are more articles on this topic:

Creating multi-experts based on trading models

Creating an Expert Advisor Trading on Different Instruments

 
tol64:

It's been open for a while. I just posted my version, maybe someone will find it more convenient.

Here are more articles on this topic:

Creating multi-experts based on trading models

Creating an Expert Advisor that trades on different instruments

In both links Creating multi-experts based on trading models , but I read the second article, thanks.
 
Fixed the link. As for additions, then further everyone can experiment, complicate and supplement. There is no dodging practice. ))
 
tol64:
Fixed the link. As for additions, then further everyone can experiment, complicate and supplement. There is no dodging practice. ))
Yes, if only "the spirit of enlightenment did not prepare us for difficult mistakes". ))
 

Dear Author,


Greetings.


To beginwith, I am quite interested in your EA and I would like to use it in a demo contest.

Next, I am familiar with the first two files: eventsspy.m5 and multisymbolexpert.zip, but I am not familiar with the second ones: multisymbolexpert_eurusd.set and multisymbolexpert_nzdusd.set. How do I have to do with the ones?

Would you give a kind of direxction of the usage of the last two files mentioned above?

Lastly but certainly not the least, thank you very much for your special attention and excellent help.


Kindest regards,


Theo Suryadi