Support Board
Date/Time: Sat, 22 Feb 2025 02:59:37 +0000
Post From: [Programming Help] Issues trying to to read all orders on each study interval.
[2025-02-19 20:39:50] |
LTSys - Posts: 42 |
and using sc.GetOrderByIndex() instead
That works great but it only get orders for the symbol on the chart. For example I have 2 orders open: EURUSD and BTCUSD... the study is on the EURUSD chart and only orders happening for EURUSD are being seen by the code. UPDATE: I just rebuilt everything and restarted SierraChart and changed my original code... SCSFExport scsf_TradeCopierFunction(SCStudyInterfaceRef sc) { int orderIndex = 0; while(true) { s_SCTradeOrder order; if(sc.GetOrderForSymbolAndAccountByIndex(EMPTY_STRING, tradeAccount, orderIndex, order) < 0) break; orderIndex++; // code that prints details about each order } } to use this from your example... while(sc.GetOrderForSymbolAndAccountByIndex(EMPTY_STRING, tradeAccount, orderIndex, order) != SCTRADING_ORDER_ERROR)
and now it works... I get all order actions for all symbols on one chart. Thanks Date Time Of Last Edit: 2025-02-19 20:52:14
|