Login Page - Create Account

Support Board


Date/Time: Mon, 24 Feb 2025 22:24:39 +0000



[User Discussion] - What does this code mean?

View Count: 920

[2021-03-22 20:58:57]
User769783 - Posts: 190
for (int OrderDataIndex = 0; OrderDataIndex < ActualLevels; OrderDataIndex++)
    {
      uint64_t OrderID = MarketOrderData[OrderDataIndex].OrderID;
      t_MarketDataQuantity MarketDataQuantity = MarketOrderData[OrderDataIndex].OrderQuantity;
    }
...
I'm trying to understand the Market Order data and how it relates in this code..
[2021-03-22 23:00:33]
Flipper_2 - Posts: 57
Be easier to tell if you include the initiation and code for MarketOrderData & ActualLevels but its a loop over a vector of orders probably from something like this

Automated Trading From an Advanced Custom Study: sc.GetTradeListEntry()
Date Time Of Last Edit: 2021-03-22 23:52:30
[2021-03-22 23:42:58]
User769783 - Posts: 190
for (int LevelIndex = 0; LevelIndex < AskNumLevels; LevelIndex++)

{

s_MarketDepthEntry MarketDepthEntry;

sc.GetAskMarketDepthEntryAtLevel(MarketDepthEntry, LevelIndex);

ActualAskLevels = sc.GetAskMarketLimitOrdersForPrice(sc.Round(MarketDepthEntry.Price / sc.TickSize), NumberOfMarketOrderDataElements, MarketOrderData);

for (int AskOrderDataIndex = 0; AskOrderDataIndex < ActualAskLevels; AskOrderDataIndex++)

{

uint64_t AskOrderID = MarketOrderData[AskOrderDataIndex].OrderID;
t_MarketDataQuantity AskMarketDataQuantity = MarketOrderData[AskOrderDataIndex].OrderQuantity;

}
[2021-03-23 00:02:22]
Flipper_2 - Posts: 57
What are you trying to do? That code gets the Ask limit orders that are in the order book puts them in an Array and iterates over them at each order in the book to find the OrderID & OrderQuantity.

ACSIL Interface Members - Functions: sc.GetAskMarketLimitOrdersForPrice()
Date Time Of Last Edit: 2021-03-23 00:02:54
[2021-03-23 01:53:26]
User769783 - Posts: 190
Trying to see when the last limit order has been filled. Can I do that with this code?
[2021-03-23 02:25:58]
Flipper_2 - Posts: 57
Who's limit order? Yours or all the markets?
[2021-03-23 02:28:13]
User769783 - Posts: 190
All the markets, at price, if that's possible
[2021-03-23 02:37:19]
Flipper_2 - Posts: 57
Hey Now I'm very confused! The last order filed is simply sc.Close[sc.Index]

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

Login

Login Page - Create Account