Download MetaTrader 5

Strategy tester

To add comments, please log in or register
bmhassene
26
bmhassene  

Hello evrybody,

I'm trying to test my EA with the strategy tester, I download a history of one pair (AUDUSD, EURGBP...) and it starts normal , works normal then stops suddenly. When I try with sample that it came with MT4 (MACDSample) it works properly?

Some advises please. Thanks in advance. 

whroeder1
14778
whroeder1  
bmhassene: , works normal then stops suddenly.
Look in the experts tab. Most likely you'll see a divide by zero.
Keith Watford
Moderator
9641
Keith Watford  
whroeder1:
Look in the experts tab. Most likely you'll see a divide by zero.
In the strategy tester, look in the journal tab
bmhassene
26
bmhassene  
Keith Watford:
In the strategy tester, look in the journal tab

In the journal I'm not getting any error

bmhassene
26
bmhassene  
whroeder1:
Look in the experts tab. Most likely you'll see a divide by zero.
I have no error in the expert tab. Actually the expert is working perfectly when I run it normally, but in strategy tester no...
Keith Watford
Moderator
9641
Keith Watford  
it starts normal , works normal then stops suddenly

What do you mean by stop? Does the test end or does it stop responding?

If it stops responding then you may be stuck in a loop.

We can only guess without you showing the code.

bmhassene
26
bmhassene  
Keith Watford:

What do you mean by stop? Does the test end or does it stop responding?

If it stops responding then you may be stuck in a loop.

We can only guess without you showing the code.

I mean in the visualization window, it works normal and then no more ticks
Keith Watford
Moderator
9641
Keith Watford  
bmhassene:
I mean in the visualization window, it works normal and then no more ticks
Then check your for and while loops as you may be getting stuck in an enless loop.
bmhassene
26
bmhassene  
Keith Watford:
Then check your for and while loops as you may be getting stuck in an enless loop.
I learned from you that before here :) ... and I don't use anymore loops neither while or for
Alain Verleyen
Moderator
31183
Alain Verleyen  
bmhassene:
I learned from you that before here :) ... and I don't use anymore loops neither while or for


The point is not to avoid using loop but to use them properly.

By the way you can have an endless loop without even coding a loop

Show your code if you need help !

Keith Watford
Moderator
9641
Keith Watford  
bmhassene:
I learned from you that before here :) ... and I don't use anymore loops neither while or for

You didn't learn to not use loops from me.

I doubt that I write any indicator or EA that doesn't use loops. At least I can't think of any.

To add comments, please log in or register