Slawa -- Problem with MetaTrader

 
Hello Slawa,

We have a problem with MetaTrader. It took around 1 minute to close a BUY order and there was over 60 ticks that occured during this time period. Is there any way to stop this from happening again / speed up time for order to close? Here is the log file:


23:20:45 Expert 'Quottro 8000': close #2796480 8.40 lots at 1.2160 [slippage 3]
23:20:47 '1141': close order #2796480 at price 1.2160
23:20:58 '1141': close failed [price is changed]
23:21:09 Expert 'Quottro 8000': close #2796480 8.40 lots at 1.2156 [slippage 3]
23:21:10 '1141': close order #2796480 at price 1.2156
23:21:11 '1141': close failed [price is changed]
23:21:21 Expert 'Quottro 8000': close #2796480 8.40 lots at 1.2154 [slippage 3]
23:21:22 '1141': close order #2796480 at price 1.2154
23:21:23 '1141': close failed [price is changed]
23:21:34 Expert 'Quottro 8000': close #2796480 8.40 lots at 1.2148 [slippage 3]
23:21:35 '1141': close order #2796480 at price 1.2148
23:21:39 '1141': order #2796480 closed


This is my code for closing our positions:
{
OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,White) ;
return(0);
}

If we were to change the above code to:
{
RefreshRates()
OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,White) ;
return(0);
}

Would the use of the RefeshRates() function speed up the time to close our orders?

Have I put the RefreshRates() function in the right place?

And, is there any other way that you can think of that will reduce time taken to close orders (Slippage in expert is set to 3 pips)?

And most importantly, should everyone be putting "RefreshRates()" command just before order functions (eg open and close orders)?

Thank you Slawa kindly in advance.

Regards

RJF
 
You should close BUY orders by Bid price not Ask!