Login Page - Create Account

Support Board


Date/Time: Sun, 02 Feb 2025 23:16:07 +0000



[Programming Help] - How to Link Flattened Order IDs to newly created Market Order ID

View Count: 1366

[2019-09-24 21:57:16]
neodigm - Posts: 7
I'd like to quickly be able to link a filled Limit Order to the Market Order created when using the sc.FlattenPosition() function call. What would be the best means of doing this? I can see that the attached (to the parent order) Limit Order (for the target) and Stop Order get canceled for these positions, and a Market Order is then created to close, but it's under a newly created InternalOrderID. How would one best, quickly determine which original Limit Orders the Market Order closes (especially when there are multiple ones)? Thank you.
[2019-09-30 16:52:55]
neodigm - Posts: 7
If there's no internal link between flattened order(s) and the ensuing market order(s) that are issued, just let me know and I'll try to figure out a different path. The silence is deafening here. This is not a hard question. It sure seems that there should be some internal tie between the two that can be exposed to the programmer.
[2019-09-30 22:06:01]
Sierra Chart Engineering - Posts: 104368
How would one best, quickly determine which original Limit Orders the Market Order closes (especially when there are multiple ones)?
There is no way to know this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-10-01 01:22:19]
neodigm - Posts: 7
Internally, when you flatten an order, you clearly cancel the attached orders. I can see that happen. At the same time, once those are canceled, you then place a market order. It seems very simple to link the two in your code. Once the orders are cancelled you place the market order. There is clearly is a way to know this. Maybe you don't track it internally, but it would have been simple for you to do. And would have made sense.
[2019-10-02 20:23:30]
Sierra Chart Engineering - Posts: 104368
It seems very simple to link the two in your code.
We do not understand what you are saying in post #4.

There is no information with the Position as to what orders created that. There could have been many orders. And orders which could have been long gone or just simply unknown.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-10-02 20:23:45

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account