Download MetaTrader 5
To add comments, please log in or register
MQL5 language supports OpenCL. Try it!
Jian Chen
Moderator
3618
Jian Chen 2013.09.24 08:33 

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.
Alain Verleyen
Moderator
30635
Alain Verleyen 2013.09.24 10:26  
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.

Jian Chen
Moderator
3618
Jian Chen 2013.09.24 11:36  
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. 

Alain Verleyen
Moderator
30635
Alain Verleyen 2013.09.24 12:06  
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).
Jinsong Zhang
15566
Jinsong Zhang 2013.09.27 06:09  

put indicator to charts and check CPU

Mehrdad Shiri
4480
Mehrdad Shiri 2013.09.27 06:54  
song_song:

put indicator to charts and check CPU

can you please explain?

thank you.

Jinsong Zhang
15566
Jinsong Zhang 2013.09.27 07:28  
some indicators Spend a lot of resources, they make computer also EA testing very slow.
Mehrdad Shiri
4480
Mehrdad Shiri 2013.09.27 08:47  
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 ?

Simon Gniadkowski
Moderator
17996
Simon Gniadkowski 2013.09.27 09:31  
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";
Mehrdad Shiri
4480
Mehrdad Shiri 2013.09.27 09:51  
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 :


    

Simon Gniadkowski
Moderator
17996
Simon Gniadkowski 2013.09.27 10:25  
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 ?
/ /12
To add comments, please log in or register