Link a PendingOrder with the Position
Link a PendingOrder with the Position
01 Apr 2017, 20:20
Hi, what I'm trying to do is very simple, I'm working with a Grid, and i have a lot of PendingOrders. But when those orders are executed and pass to be a Position, I don't see a way to identify which PendingOrder was.
The only way that I see, is to put an ID in the comment, because the OID is diferente than the PID. So I have to create a second ID and put It in the comment of the PendingOrder... And this is... well... a pain in the ass...
The OID changes to a new PID... the EntryPrice is not always the same as the TargetPrice... there is no PendingOrder.Closed event, or any sort of information at the Position.Opened event(that I'm aware of) so...?
Is there other way to link them?
Greetings.