Problem with RefreshRates() giving Error #129

 


I am using the same EA on several different charts. I am also using trade context monitoring via Global variables and RefreshRates() to update predefined variables. However I am still getting Error #129 returned occassionaly. Can anyone tell me why the following piece of code does not always give error free trading.

Very frustrated

BigAl


if (TradeBusy() < 0) {Print(Symbol(), " Trade Context is still busy when attempting to open trade");return(0);}

GetOrderDetails();
while (RefreshRates()==false) Sleep(10);
Result = OrderSend(Symbol(), OP_BUY, MyLots, Ask, MarketInfo(Symbol(), MODE_SPREAD) + 1, 0, 0, NULL, 0, 0, Blue);
if (Result < 1)
{
Print("Last Error was ", GetLastError());
}

TradeNotBusy();

Reason: