strategy tester error 134, and 138

 
Hey People,

i m testing a new strategy and there are always this errors ?


2017.02.06 19:04:54.903    2017.02.02 23:59:48  BO_EA_vortex_pme - 3 EURUSD,M1: OrderSend error 134

M1 Order send error: 138




can sb help me pls ?
 
Sure. Fix the code.
 
Alain Verleyen:
Sure. Fix the code.
but its interesting: in live trading the EA works - only not in strategy tester ?
 
vortex_pme:
but its interesting: in live trading the EA works - only not in strategy tester ?

If the data are different in the Strategy Tester, for any reason, the code should be able to manage it.

So...fix the code. 

 

Look up your error codes here

ERR_NOT_ENOUGH_MONEY134Not enough money.

Fairly self-explanatory. Good job you don't see it in live trading then...

ERR_REQUOTE138Requote.

Unusual for strategy tester. Are you using tick data? 

Error Codes - Appendixes - MQL4 Tutorial
Error Codes - Appendixes - MQL4 Tutorial
  • book.mql4.com
Error Codes - Appendixes - MQL4 Tutorial
 
honest_knave:

Look up your error codes here

ERR_NOT_ENOUGH_MONEY134Not enough money.

Fairly self-explanatory. Good job you don't see it in live trading then...

ERR_REQUOTE138Requote.

Unusual for strategy tester. Are you using tick data? 

thank you a lot! :)yes
 
vortex_pme:
thank you a lot! :)yes

i been running EA testers fine until update 1045.

guess what - now im getting error 138 + 130.

its not the code that needs to be fixing. its update - that broke the codes..

 
gudruolis:

i been running EA testers fine until update 1045.

guess what - now im getting error 138 + 130.

its not the code that needs to be fixing. its update - that broke the codes..

 

Possibly.

But I normally find it better to presume the problem is with my code rather than the build.

Are you using 3rd party tick data? 

 
honest_knave:

 

Possibly.

But I normally find it better to presume the problem is with my code rather than the build.

Are you using 3rd party tick data? 

no. just 1 minute data used.

was running tests fine until closed mt4 -> update -> loads of errors :( 

 
Post up your OrderSend() code, and where any variables used in OrderSend() are set.
 

   if(Digits==4 || Digits==2) {pip=Point; dig=Digits; spr=MarketInfo(Symbol(),MODE_SPREAD); slp=Slippage;}
  
   if(Digits==5 || Digits==3) {pip=Point*10; dig=Digits-1; spr=MarketInfo(Symbol(),MODE_SPREAD)*0.1; slp=Slippage*10;}
  





----------------------------------

  if(t==0 && GD==0 && a==0 && ExecuteNow1==true && l[1]>0 && cl==0) tickx=OrderSend(Symbol(),OP_BUY,l[1],Ask,slp,0,0,GridCmnt+" L1",Magic);

     

Reason: