Support Board
Date/Time: Sat, 22 Feb 2025 03:28:31 +0000
Post From: [Programming Help] Issues trying to to read all orders on each study interval.
[2025-02-19 17:57:13] |
LTSys - Posts: 42 |
Hi, I'm having issues reading all orders each time a study function is called. If I place some orders and start the study the code below can see the orders, but only once on the first call to the study function. If I place a new order while the study is running, the code doesn't see the newly added order? The following study code is called every second when enabled on a chart. I expected it to print all the orders as they are placed but it doesn't. It only prints the orders on the first startup call to the function. I'm I missing some extra step? TIA 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 } } Date Time Of Last Edit: 2025-02-21 19:51:50
|