Help! Strategy tester unable to complete EA backtest

 
Hello

I recently developed my first EA the code is all looking fine it compiles with no errors or warnings. However, when I try to run a backtest on strategy tester it's either it runs for some time then pauses with no errors being logged anywhere, one time I left it thinking it may be running in the background it ran for hours but still didn't leave that spot (I was using visual mode), or it completes in about two seconds with no trade opened or closed, no errors whatsoever appear in both circumstances.

What could I be missing? Is there a special code that I need to add to EA to make it work? I've heard of OnTester () must I add it before strategy tester can work properly???
 
  1. Are you sure there's no error in the tester tab?
  2. Pausing, means it is not returning from OnTick. No more ticks, nothing happens.
  3. Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.
 
whroeder1:
  1. Are you sure there's no error in the tester tab?
  2. Pausing, means it is not returning from OnTick. No more ticks, nothing happens.
  3. Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.
Thanks, I figured it out. The pause happens as a result of error 130 occurring when the EA tries to modify already placed order in order to add stops, the solution I coded for the error triggers the continue function, and in turn causes the while cycle to restart, this results in the EA opening another trade without adding stops, which when it tries to modify encounters the same problem, as a result the loop goes on till infinity, hence the pause.
Reason: