Running my code in strategy tester and getting the Requote error 138. Is there a way to avoid this or fix the code?
-
Running my code in strategy tester and getting the Requote error 138. Is there a way to avoid this or fix the code?
-
@fxmich78 In MT5 it happens because the tester simulates possible insertion delays of orders, is your case?
Otherwise take a look at this forum https://www.mql5.com/en/forum/136010 -
@ambrogio
Hello,thank you for the answer.I use it on MT4.
Is this the same?
Does it mean the EA has a problem?
Can i do something to fix it? -
@fxmich78 No it's not the same because MT4 tester don't replicate the delay.
Can you upload a little part of your project to test by myself? The problem appear at the opening orders or at the closure of them? -
-
@fxmich78 said in Running my code in strategy tester and getting the Requote error 138. Is there a way to avoid this or fix the code?:

This is what i get.
Order close error.Oh yes, are you testing with Tick Data Suite?
If you notice the delay of 200-300 ms is set, it's a bit too much. -
@fxmich78 On my PC the MetaTrader 5 measuring a delay of 35-40 ms, on a VPS service should be well below the 10 ms
-
@ambrogio
So,to understand,must i do something to fix it or is a problem of tick data suite? -
@fxmich78 Nothing to fix. Set the delay parameters at 30ms or less
-
@ambrogio
You mean at the tick data suite? -
@fxmich78 said in Running my code in strategy tester and getting the Requote error 138. Is there a way to avoid this or fix the code?:
@ambrogio
You mean at the tick data suite?Yes, for what I remember there is the delay setting table, you can disable it or set it with a real delay, many VPS services guarantee an order execution of less than 5 ms
-
@ambrogio
I really thank you for the valuable help! -
@fxmich78 you're welcome
