order close error
Keith Watford #:
Ok I Understand. I thought OrderTicket() is storing the ticket number automatically.
OrderTicket() will not necessarily have a value until an order is selected.
If it has already been selected somewhere, why are you selecting it again?
You are selecting by ticket but you don't check if it has already been closed or not.
if(OrderSelect(OrderTicket(),SELECT_BY_TICKET))
MT4: You can not use any Trade Functions until you first select an order.
Hi everyone I had a problem when trying to close an open order, here's my code:
When I tried to close open order it return with error 4108 (invalid ticket). I tried to save the order ticket into variable ticketBuy and ticketSell but it change with error 4051(Invalid function parameter value). Is anyone knows how to fix this?