Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 14:01:48 +0000



ACSIL - Find order fills until flat / reversed

View Count: 1338

[2018-10-23 10:39:33]
User19165 - Posts: 346
I'm starting to dabble in the ACSIL and want to be able to easily go through all the order fills for a given "trade" and perform my own calculations. I'm confused how to get all the order fills for the current position. Is there a trick to match up the fills with the position data? I'm new to this and just need a nudge to get going. Thanks.
[2018-10-25 18:40:17]
Sierra Chart Engineering - Posts: 104368
You need to use this function:
Automated Trading From an Advanced Custom Study: sc.GetOrderFillEntry()

The documentation has been updated to explain how to do what you want.
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
[2018-10-28 07:48:05]
User19165 - Posts: 346
Thanks support, I understand that. I am updating this tool on a tick by tick basis but would prefer to only run certain bits of it on order fill events. Is there an event to detect, on any specific tick, if an order was filled for that tick? If I could do this, then most of the ticks would have nothing to do and it would be much more efficient.
[2018-10-29 07:39:27]
User19165 - Posts: 346
This is the best I have managed to come up with regarding post #3.

- Once position is active, record the timestamp of the fill.
- Each successive tick, compare the recorded timestamp of the last fill for equality with the fill from the last entry in GetOrderFillEntry()
- When the last fill from GetOrderFillEntry() is > than the recorded last fill timestamp, then update the locally recorded fill timestamp, do trade mgmt indicator processing
- Else do nothing

Is there anything better than this that I have not yet learned about? I am new to the ACSIL API and this seems quite tedious of a solution. Maybe better comparing InternalOrderID? or FillExecutionServiceID? I need to be able to check for partial fills and update this tool on each partial fill, should they occur.
Date Time Of Last Edit: 2018-10-29 07:45:01
[2018-11-01 02:16:06]
Sierra Chart Engineering - Posts: 104368
We think a better solution would be to check sc.GetOrderFillArraySize(), save the size in a persistent variable and see if it gets larger in size.
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: 2018-11-01 02:22:56

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

Login

Login Page - Create Account