Login Page - Create Account

Support Board


Date/Time: Mon, 23 Dec 2024 20:24:16 +0000



ACSIL: Getting the most recent order

View Count: 789

[2015-10-12 06:53:30]
William O - Posts: 16
I would like to get the most recent order submitted (not necessarily filled), preferably without using looping. Am I safe to assume that sc.GetOrderByIndex() is ordered where the last element is the most recent order? If so is there a way to get the order array size similar to sc.GetOrderFillArraySize()? With the order array size i'd be able to easily grab the last element. Thank you.
[2015-10-12 17:26:55]
Sierra Chart Engineering - Posts: 104368
It is not as simple as this because the order list can change when it is sorted when left clicking on the column headers on the Trade >> Trade Orders and Positions >> Orders tab.

You really need to iterate through all of the orders and find the one with the latest s_SCTradeOrder::EntryDateTime.
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

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

Login

Login Page - Create Account