EA unable to close an open position

 

Hi.

Would you mind telling me why my EA can not close an open position?

Here is the line:

OrderClose(TicketNumber,1,Ask,1,Green);

Thank you for your help.

Le.

 

Not enough information.

 
phy:

Not enough information.

The Error code that the systems gives is INVALID PRICE or Error # 129.
 

Not enough information.

 

FXE


> OrderClose(TicketNumber,1,Ask,1,Green);


If this is a BUY order, you should be closing at the Bid, else your likely to get a 'wrong price' message

In any case, a Slippage of 1 is unwise, 3 or even 5 is more usual


FWIW

-BB-

Reason: