Is this happening on XAUUSD only ?
The code is not much useful without the values used to call this function. What filling mode is used ? In general what are the value of the MqlTradeRequest structure ?
What is the code used with when modify a position ?
An error 10012 seems to be a broker issue but you need to check what request is sent to the server before confirming it.
Why not using the CTrade class from the Standard Library ? At least we would know if it comes from the code or from the broker.
Is this happening on XAUUSD only ?
The code is not much useful without the values used to call this function. What filling mode is used ? In general what are the value of the MqlTradeRequest structure ?
What is the code used with when modify a position ?
An error 10012 seems to be a broker issue but you need to check what request is sent to the server before confirming it.
Why not using the CTrade class from the Standard Library ? At least we would know if it comes from the code or from the broker.
this EA trades mostly XAUUSD
this is the code to call the SendOrder
ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); int Ticket = SendOrder(Symbol(), ORDER_TYPE_BUY, dNextLot, ask, 100, 0, 0, "5", magic_number);
for filling mode we check in code before sending order
if((int) SymbolInfoInteger(position_symbol, SYMBOL_FILLING_MODE)==SYMBOL_FILLING_FOK) trade_request.type_filling = ORDER_FILLING_FOK; else if((int) SymbolInfoInteger(position_symbol, SYMBOL_FILLING_MODE)==SYMBOL_FILLING_IOC) trade_request.type_filling = ORDER_FILLING_IOC; else if((int) SymbolInfoInteger(position_symbol, SYMBOL_FILLING_MODE)==0) trade_request.type_filling = ORDER_FILLING_RETURN; else if((int) SymbolInfoInteger(position_symbol, SYMBOL_FILLING_MODE)>2) { int FillingCheck_ = (int)FillingCheck(position_symbol); if(FillingCheck_ > 0) return(-FillingCheck_); }
about Ctrade - yes - this could be a good idea to test it and see if there will be any changes
the issue is that sometimes it happens sometimes not - it's like sometimes when server is loaded on broker side it will give this timeout.
How can we explain this:
- we receive timeout error for like 5 tries of orders to be sent(each new try is done after 3 min - the timeout response comes after 3 minutes check the time on image) and then suddenly after 20-30 minutes the orders appear in account? all at once (check the image with red highlight at bottom), till the moment when timeout orders come on account there are no new trades present when checked all positions from account.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys
I receive quite often from broker the timeout error when I use my MT5 EA - it is on LIVE account
and it happens like this:
the order is sent to market , after 3 min I receive a Timeout Error, and then my EA tries again - it could try 5 times
after 5 timeout tries it will stop trying, and suddenly after 30 min I can see all 5 orders filled in market. Before it tries to place again the order it checks is there is a new order on account - but no, there is none, they all somehow magically appear after 30-40 minutes.
Attached you have the image from live account how orders are being filled after 30 min, all at once and the code for sending orders.
If anyone can help me figure this out would appreciate a lot - is it from My EA or from broker?
Broker does not want to answer to my requests, it could happen on ICMarkets/Vantage and others as well
It could happen when I try to open trade and sometimes when I try to change SL/TP
Is this broker issue?Thank you