EA will pause itself during visual backtesting

 
ok this is tricky, i've got an EA that "pauses" itself.
It happens between the end and the beginning of Start();

The only thing it can guess about is a function that passes by reference.

 

 res =  fn1(var1,var2,var3,var4);  

 double fn1(  double& var1 , int& var2 ,  double& var3 ,  int& var4)

 

But besides that -  i dont know what events happen at the end of Start()
It may be a global variable not wanting to be reset or was nulled ???
Or may help if i use 'static' ???

If i manually give these byref variables a value - no error.

But i'm not sure if that is because something is now not happenning

e.g. Orderclose.

Is "pause" something that has happened before?

var1,var2,var3,var4 are all being set to 0 before the call to fn1

I changed the function to use globals and not by reference - but still a pause at end of start();

 

 

 


 
  • Where are you getting this Pause? Live trading or within Strategy Tester.
  • Why do you believe its a Pause instead of the normal waiting for the Next Tick?
  • Is there any Sleep functions within the Code?
  • Is there any Complicated Functions which requires allot of time?
  • Did you write the Expert yourself and know everything its doing?
  • Can you re-create this behavior with a sample/simple code?
  • Where is the Code we cannot see?
 
mrmedia:
ok this is tricky, i've got an EA that "pauses" itself.
It happens between the end and the beginning of Start();

The only thing it can guess about is a function that passes by reference.

It sounds like you have a loop (for or while) that is running and running,  if you want more specific help you will need to show at least some relevant parts of your code . . .  and make sure you use the SRC button.
 

EA can't pause in the tester, (no sleep.) you have a infinite loop. Add print statements at the beginning and before each return of your major functions and hunt down where it's going in but not coming out.

Also look in the log for divide by zero, that doesn't pause it, it kills it.

Reason: