Anything special when testing EA based on Indicator from Market?

 

I purchased a custom indicator from the MQL5 Market and developed an EA to utilize the indicator.

The EA can work as I expected. However, when I was testing the EA in the strategy tester I got a problem:

The test execution speed is  very slow. Actually the test's speed is as slow as testing the EA in "Visualization" mode. It means that I need much time to test the EA.

My question is: is there anything special to test an EA based on an indicator from the Market and a standard indicator or a self-developed custom indicator?

Or my problem is just an individual case, it's just because that the calculation of the indicator I purchased is slow? I really doubt it because the testing speed of "Visualization" mode and "Non-Visualization" mode is almost the same.

Step on New Rails: Custom Indicators in MQL5
Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
 
forex2start:

I purchased a custom indicator from the MQL5 Market and developed an EA to utilize the indicator.

The EA can work as I expected. However, when I was testing the EA in the strategy tester I got a problem:

The test execution speed is  very slow. Actually the test's speed is as slow as testing the EA in "Visualization" mode. It means that I need much time to test the EA.

My question is: is there anything special to test an EA based on an indicator from the Market and a standard indicator or a self-developed custom indicator?

Or my problem is just an individual case, it's just because that the calculation of the indicator I purchased is slow? I really doubt it because the testing speed of "Visualization" mode and "Non-Visualization" mode is almost the same.

To test the performance of an indicator, I am using a very simple EA with the Strategy Tester :

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   double buffer[1];
   
   if (CopyBuffer(handle, 0, 0, 1, buffer)==1)
      ;//Print("Buffer value = ", buffer[0]);
   else
      Print("Error copying buffer...");
   
  }

I run it with strategy tester with EURUSD/H1, every tick for last month. If it takes more than a few seconds then your indicator is slow (you can compare with standard indicator).

If it's the case of your indicator, ask to the seller to fix it. If it's not the case, then fix your EA.

 
angevoyageur:

To test the performance of an indicator, I am using a very simple EA with the Strategy Tester :

I run it with strategy tester with EURUSD/H1, every tick for last month. If it takes more than a few seconds then your indicator is slow (you can compare with standard indicator).

If it's the case of your indicator, ask to the seller to fix it. If it's not the case, then fix your EA.

Thank you very much for the suggestion.

I tried the tests and found that it should be the indicator's problem. Maybe its calculation is too complex :)

I also tried the code with a free indicator in the market and it runs much faster. 

 
forex2start:

Thank you very much for the suggestion.

I tried the tests and found that it should be the indicator's problem. Maybe its calculation is too complex :)

I also tried the code with a free indicator in the market and it runs much faster. 

Either too complex or bad coded (not optimized).
 

put indicator to charts and check CPU

 
song_song:

put indicator to charts and check CPU

can you please explain?

thank you.

 
some indicators Spend a lot of resources, they make computer also EA testing very slow.
 
angevoyageur:

To test the performance of an indicator, I am using a very simple EA with the Strategy Tester :

hi;

i test your ea , and there is no action at all.

can you please check this ?

 
TIMisthebest:

hi;

i test your ea , and there is no action at all.

can you please check this ?

Did you set the name for your Indicator ?

input string indicatorName = "Your indicator";
 
RaptorUK:

Did you set the name for your Indicator ?

yes ,

i set it.

even i put ea and indicator in one folder.

i run it on metatrader and :


    

 
TIMisthebest:

yes ,

i set it.

even i put ea and indicator in one folder.

i run it on metatrader and 

Indicators and EAs do not belong in the same folder . . .  you know this already,  don't you ?
Reason: