Use of standard indicator for multiple symbols and time frames

 

Hello,

Here is a question maybe one of you mql5 guys can help me with.

I created an EA in mql4 that reviews and creates orders for 28 different currency pairs simultaneously, in the sense that the EA runs in only one chart window and cycles through the different pairs.  

Now – because I have to review each symbol settings (like valid RSI and STO points for the entry point etc.), I have to run a Strategy Tester Optimization over a three months period - which takes me up to 2 days for each for an optimization. That’s equal to 56 days if I do it for all pairs. TOO LONG!

The reason for the long run is, that the MetaTrader 4 optimizer is running only in a single thread, i.e. it uses only one of the logical core processors – even though I have plenty free doing nothing. MetaTrader 5 on the other hand uses all configured processors and has even the ability to use other computer in my network as slaves. Which would be extremely helpful for me - I REALLY want to migrate my EA to MetaTrader 5 😊 But...

 

My question is (sorry for the long preamble) –

For each of the currency pairs I use a combination of up to 6 standard indicators (like iMA, iADX, iRSI etc). In MQL4 I use functions like this (a made-up example):

int lib_GetIchimokuTrend(int pTimeFrame)
{
   double dTenkan0     = iIchimoku(Global_Symbol,pTimeFrame, 9, 26,   52,   MODE_TENKANSEN, 0); 
   double dKijun0      = iIchimoku(Global_Symbol,pTimeFrame, 9, 26,   52,   MODE_KIJUNSEN, 0); 
   if (dTenkan0 > dKijun0) return OP_BUY;
   if (dTenkan0 < dKijun0) return OP_SELL;
   return -1;
}


The good thing here is, I can use the same function for different symbols and time frames.


If I migrate, I would need to create these indicators during the initialization of the EA – but that means for my EA, that I have to create 28 * 6 = 168 different indicators. That would be a mess. Is that correct? Or can I create let’s say one indicator I than can reuse for all 28 currency pairs? They must be a way – I probably haven’t found it yet.


Thanks in advance
😊

 

 
Martin Hill Is that correct? 

Yes

 
William Roeder:

Yes

Yeah, I feared so. Thanks for the reply William