suggestions:
1- check if arguments are ok
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
2 - see eventual problems in arguments' values :
...
int ticket_sell = OrderSend(...);
if(ticket_sell==-1)
{
Print(" lotsize=",LotSize(), " Comment=", GetCommentForOrderSellTO(), " magic_number=", MagicSellTO);
}
...
I've only seen it when there is a connection failure before the send. Log it, return, wait for the next tick, retry.
Did you not read the answer just above your post?
Forum on trading, automated trading systems and testing trading strategies
How to fix a failed [Common error]
William Roeder, 2018.08.09 15:40
I've only seen it when there is a connection failure before the send. Log it, return, wait for the next tick, retry.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Anybody know how to fix a failed [Common error]?
My EA did a sell trade which is successfull previously and now when it tries to place a sell trade again, it has a failed [Common error]. No problem with the buy order.
I have search in the metaeditor documentation and this forum but it doesnt do much help.
OrderSend(Symbol(), OP_SELL, LotSize(), Bid, 3, 0, 0, GetCommentForOrderSellTO(), MagicSellTO, 0, Red);
Is it because of the slippage? If it is, it should be reqoute error and not common error.
The broker im using is fxpro. Anybody?