Support Board
Date/Time: Fri, 31 Jan 2025 18:53:23 +0000
[Programming Help] - ACSIL: sc.GetOrderForSymbolAndAccountByIndex(), how to get Index without open Chart?
View Count: 1148
[2019-05-16 19:14:11] |
TedMar - Posts: 190 |
I have no idea how i generate Index for sc.GetOrderForSymbolAndAccountByIndex() without Open Chart. any idea? |
[2019-05-17 15:01:25] |
Sierra Chart Engineering - Posts: 104368 |
Refer to the updated documentation here in regards to this: Automated Trading From an Advanced Custom Study: sc.GetOrderForSymbolAndAccountByIndex() 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-05-17 16:39:53] |
TedMar - Posts: 190 |
Not Works Based on your Example from ACSIL howto get working OrderID/FilledPrice in ReplayMode (Sim) i added for test this 2 lines to access s_SCTradeOrder with sc.GetOrderForSymbolAndAccountByIndex int& PriorOrderFillEntrySize = sc.GetPersistentInt(1); int CurrentOrderFillEntrySize = sc.GetOrderFillArraySize(); if (CurrentOrderFillEntrySize != PriorOrderFillEntrySize) { PriorOrderFillEntrySize = CurrentOrderFillEntrySize; if (CurrentOrderFillEntrySize > 0) { s_SCOrderFillData OrderFillData; sc.GetOrderFillEntry(CurrentOrderFillEntrySize - 1, OrderFillData); SCString OrderFillMessage; double OrderQuantity = OrderFillData.Quantity; //added access throgh sc.GetOrderForSymbolAndAccountByIndex s_SCTradeOrder s_TradeOrdersSymbol; sc.GetOrderForSymbolAndAccountByIndex("F.US.EPM19", sc.SelectedTradeAccount, (CurrentOrderFillEntrySize - 1), s_TradeOrdersSymbol); OrderFillMessage.Format("sc.GetOrderFillEntry: InternalOrderID = %u || sc.GetOrderForSymbolAndAccountByIndex : InternalOrderID = %u", OrderFillData.InternalOrderID, s_TradeOrdersSymbol.InternalOrderID); sc.AddMessageToLog(OrderFillMessage, 0); } but result is 0 sc.GetOrderFillEntry: InternalOrderID = 460964 || sc.GetOrderForSymbolAndAccountByIndex : InternalOrderID = 0 | 2019-05-17 18:31:18.492
Date Time Of Last Edit: 2019-05-17 16:53:55
|
To post a message in this thread, you need to log in with your Sierra Chart account: