How to fix a failed [Common error]

To add comments, please log in or register
ejoi
280
ejoi  

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?

Joao Rosas
391
Joao Rosas  

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);

}

...

ejoi
280
ejoi  
Its ok... I have solved the problem.
Sanford Staab
13
Sanford Staab  
ejoi wrote >>
Its ok... I have solved the problem.

You wanna like, share what you learned?

I am seeing common errors come in batches on an EA that has run for months successfully.

Hemmy6
5
Hemmy6  
Hello
Please I'm having a 'common error' issue placing a trade
Taproum
17
Taproum  
ejoi:
Its ok... I have solved the problem.
Hi, May I know how can you solved it? I'm having the same problem.
whroeder1
17987
whroeder1  
ejoi: Anybody know how to fix a failed [Common error]?

I've only seen it when there is a connection failure before the send. Log it, return, wait for the next tick, retry.

To add comments, please log in or register