Download MetaTrader 5

long order EA tester problems

To add comments, please log in or register


 when I try my EA on the EA Tester from yesterday, the orders long don't work, just the short ones, but in the live version is all right, same script both work.

The error that is returning is #138 ..."requote".

It should be somthing related to broker price. How can I fix it? The live version is working, but i can't test the EA in this way.



Hi florenceale,

did you check, if your OrderClose() functions use the bid price for closing long orders, respectively the ask price for closing short orders?

I had a similar problem with error 138 requote in the tester (in my case related to closing orders on the short side) and changed the double price parameter from Bid to Ask.

Then it worked in my case.

                       int CloseBuyTicket=OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,clrNONE);

                       int CloseSellTicket=OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,clrNONE);

The same might be applicable correspondingly for other order related functions such as OrderSend().

Hope this helps.

Cheers, mocwoc

To add comments, please log in or register