Discussion of article "Creating an Expert Advisor, which Trades on a Number of Instruments" - page 6

 
GODZILLA:

...Stoploss in such systems plays a secondary role and is placed at a very decent distance from the entry, counted in several candles at least. ... ...
Thanks for the clarification, I realised that multiple trades within a bar are caused by triggering of Stoploss and Take Profit within the bar, and not by errors in the code, as I thought wrongly.
 

Can you please tell me how to increase the speed of testing the Expert Advisor from the article exp_tema.mq5 .

For two currencies I can keep within 5 minutes. For three currencies I can't get out of 6 minutes.

Files:
 
AM2:

Can you please tell me how to increase the speed of testing the EA from the article exp_tema.mq5 .

For two currencies I can keep within 5 minutes. For three currencies I do not get out of 6 minutes.

Ordinary single test

None (if the algorithm cannot be further optimised), or optimise the algorithm.

In parameter optimisation mode

Optimise the algorithm, or chain additional agents...

 
Interesting:

Normal single test

None (if the algorithm cannot be further optimised), or optimise the algorithm.

In parameter optimisation mode

Optimise the algorithm, or chain additional agents...

You can also just use the OnTimer() function. Well, in terms of optimising the program code, there are endless possibilities there.

By the way, why do you need to meet the five-minute deadline and why not, for example, fifteen minutes?

 
papaklass:
I reworked the algorithm a bit and on 12 currencies the test runs for 727 seconds. Optimise the algorithm.

Even this probably won't be necessary because I have a 2-currency 4 minutes test on my computer, but when I uploaded it to the test in 1 minute!

4. Start
finished in 1 min 4 sec

GODZILLA:

You can also just use the OnTimer() function. There are inexhaustible possibilities in terms of optimising program code.

By the way, why do you need to meet the five-minute deadline and why not, for example, fifteen minutes?

They have increased the testing time now.

Now testing is going on i7 950 and the maximum time has been increased up to 15 minutes.
.

 

Good afternoon!

Maybe someone can help to understand global variables on the example of the discussed Expert Advisor (Creating an Expert Advisor that trades on different instruments). What would you add in the Expert Advisor toperform such a function :

     if (dtema2 > 0 && dtema1 < 0) 
     {
     DnSignal[Number] = true;
     volume = 0.1;
     } // If the if function is true, volume for Buy and Sell will be 0.1
Документация по MQL5: Основы языка / Переменные / Глобальные переменные
Документация по MQL5: Основы языка / Переменные / Глобальные переменные
  • www.mql5.com
Основы языка / Переменные / Глобальные переменные - Документация по MQL5
 

6.Why is the int Recount[] data type chosen in exp_tema.mq5 in:

 static int Recount[], MinBars[];

Given that Recount[] then takes the value of the bool data type:

Recount[Number] = true;
...
Recount[Number] = false;

7.Does it affect the results?

 
ias:

6.Why is the int Recount[] data type selected in exp_tema.mq5 in:

Given that Recount[] then takes the value of the bool data type:

7.Does it affect the results?

It will not affect the results in any way, but, actually, this variable should have been made a logical, static variable!
 

I have trouble when attach this EA. In Expert tab appear this message :

2012.07.09 11:31:16    exp_tema (multicurrency)-new (EURUSD,M1)    cannot load indicator 'Triple Exponential Moving Average' [4302]

What wrong? Thank you

Documentation on MQL5: Math Functions / MathExp
  • www.mql5.com
Math Functions / MathExp - Documentation on MQL5