Ticket number
Ticket number
05 Apr 2015, 11:31
Hi
How to get a unique reference to a PendingOrder , which becomes a Position which becomes a HistoricalTrade ?
Something similar to OrderTicket in MT4, that designate the trade in a unique fashion ?
The PendingOrder.ID is not kept when becoming a Position. What would be the unique reference ? not a custom hand made Label please
Thanks a lot
Replies
gjmarkets
07 Apr 2015, 14:06
RE:
THis is of course not the point.
A Label is a custom set, which is not a Unique ID.
Will you have the opportunity to add a formal Unique ID to the trade (that is kept when the trade becomes a Position or Historical ) ?
Spotware said:
You can pass Label when you place pending order. Label will be inherited by Position and Historical Trade.
@gjmarkets
gjmarkets
09 Apr 2015, 14:57
It is of course the other way around:
The "Position" class shall be augmented with a "PendingOrderId" member, which can be null (in case of market orders) or equal to the PendingOrder.ID
@gjmarkets
Spotware
06 Apr 2015, 12:58
You can pass Label when you place pending order. Label will be inherited by Position and Historical Trade.
@Spotware