Download MetaTrader 5

Strategy tester

To add comments, please log in or register
Develop applications to order. Make profit using Freelance service!
bmhassene
26
bmhassene 2016.11.25 21:12 

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
14470
whroeder1 2016.11.25 21:36  
bmhassene: , works normal then stops suddenly.
Look in the experts tab. Most likely you'll see a divide by zero.
Keith Watford
Moderator
9603
Keith Watford 2016.11.25 21:50  
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 2016.11.25 22:06  
Keith Watford:
In the strategy tester, look in the journal tab

In the journal I'm not getting any error

bmhassene
26
bmhassene 2016.11.25 22:07  
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
9603
Keith Watford 2016.11.25 22:25  
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 2016.11.25 22:28  
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
9603
Keith Watford 2016.11.25 22:36  
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 2016.11.25 22:38  
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
30707
Alain Verleyen 2016.11.25 22:41  
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
9603
Keith Watford 2016.11.25 23:03  
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