OrderTicket() question
- OrderTicket() - Question
- How can i know if order is open or close ?
- OrderClose Error 4051 - Invalid Ticket
YB
This isnt usually a problem, best to post your code (or the relevant part)
Please use the SRC button to insert code samples
-BB-
Does anyone know how to clear/reset the order ticket number between orders? When I close one order, let's say a Buy Order with ticket #3426154, and open a Sell Order. The Sell Order attempts to open with the same ticket# 3426154, but does not open. The Buy Order closes with no errors, and the Sell Order appears to open with no errors, but does not.
I'm a bit puzzled. The "ticket" is provided by the broker's server when an order is successfully opened - i.e. the return value from OrderSend(). The second order can't be "attempting to open" with a particular ticket number - the ticket number isn't known until/unless the order is successfully placed. Do you mean "magic number" rather than "ticket"? Or am I just confused - yet again?
As BB says, best to post your code.