ORDER_POSITION_ID - page 16

 
Serj_Che:

Here's what I dug up:

Thank you. Oh, how many wondrous discoveries we have...
 
Mikalas:
And what, it's been recording lately.
You're fantasising now.
 
Integer:

Are you sure you know or are you fantasising?

That's a little confusing. Let's say the order was partially executed and the executed part received an id. We close the position. Then the remaining part triggers. Since there was no position, we should have a position with a new id. Where will it be written in the history?

The position was closed by another order, and the id of this position was assigned to it.

 
Mikalas:

The position was closed by another order and the position ID was assigned to it.

But a new position was opened by an order that already opened another position, so the ID should be new, but the field for recording is the same. There is a misunderstanding.

The order that closed is not interested at all.

 
Integer:
Thank you. Oh, how many wondrous discoveries we have...
HI 0 10:29:25.468 Trades : exchange buy 2.00 SBRF-9.14 at market
JE 0 10:29:25.531 Trades : accepted exchange buy 2.00 SBRF-9.14 at market
NM 0 10:29:25.562 Trades : exchange buy 2.00 SBRF-9.14 at market placed for execution in 88 ms
MN 0 10:29:25.562 Trades : deal #4522433 buy 2.00 SBRF-9.14 at 6903 done (based on order #4988264)
IE 0 10:29:26.640 Trades : exchange sell 2.00 SBPR-9.14 at market
DL 0 10:29:26.734 Trades : accepted exchange sell 2.00 SBPR-9.14 at market
MQ 0 10:29:26.734 Trades : exchange sell 2.00 SBPR-9.14 at market placed for execution in 92 ms
KF 0 10:29:26.734 Trades : deal #4522434 sell 1.00 SBPR-9.14 at 5255 done (based on order #4988265)

DK 0 10:29:26.734 Trades : deal #4522435 sell 1.00 SBPR-9.14 at 5255 done (based on order #4988265)

it is now a partial execution.

 
Serj_Che:
HI 0 10:29:25.468 Trades : exchange buy 2.00 SBRF-9.14 at market
JE 0 10:29:25.531 Trades : accepted exchange buy 2.00 SBRF-9.14 at market
NM 0 10:29:25.562 Trades : exchange buy 2.00 SBRF-9.14 at market placed for execution in 88 ms
MN 0 10:29:25.562 Trades : deal #4522433 buy 2.00 SBRF-9.14 at 6903 done (based on order #4988264)
IE 0 10:29:26.640 Trades : exchange sell 2.00 SBPR-9.14 at market
DL 0 10:29:26.734 Trades : accepted exchange sell 2.00 SBPR-9.14 at market
MQ 0 10:29:26.734 Trades : exchange sell 2.00 SBPR-9.14 at market placed for execution in 92 ms
KF 0 10:29:26.734 Trades : deal #4522434 sell 1.00 SBPR-9.14 at 5255 done (based on order #4988265)

DK 0 10:29:26.734 Trades : deal #4522435 sell 1.00 SBPR-9.14 at 5255 done (based on order #4988265)

it is now a partial execution.

I see. So for partially executed orders the position id property would be really useless.
 
Integer:
I see. So for partially executed orders the position id property would be really useless.
That's what I was talking about in the first pages.
 
papaklass:

I would like to see a partial execution with different prices/times of execution. Is there such an example?

In this example both the execution time is the same and the execution price is the same.

+1.
 
papaklass:

I would like to see a partial execution with different prices/times of execution. Is there such an example?

In this example both execution time and price are the same.

I think this example is enough, I was searching for it.)

How do you propose to search for similar situations in the history?

I did not find any comments for such situations. I found it by searching the entire history for the same ticket number.

 
Mikalas:
And I have "0", the one that participated in the order.....

You are looking in the wrong part,OrderGetInteger(ORDER_POSITION_ID) - you are trying to look in the part that was not involved in opening/modifying/closing of a position

you need to look like this: HistoryOrderGetInteger(ticket,ORDER_POSITION_ID)