Support Board
Date/Time: Mon, 21 Apr 2025 16:56:49 +0000
Post From: SOLVED Issue with function sc.GetOrderForSymbolAndAccountByIndex(...)
[2025-02-20 19:29:25] |
LTSys - Posts: 68 |
Hi, Is this the best approach to check for new orders? I was looking for some order event I can listen for or subscribe to but I can't find anything like that in the docs. TIA bool firstFunctionCall = true; char *tradeAccount; // global SCSFExport scsf_MainFunction(SCStudyInterfaceRef sc) { // some other code if(firstFunctionCall) { tradeAccount = accountInput.GetSelectedCustomString().GetChars(); firstFunctionCall = false; } int orderIndex = 0; s_SCTradeOrder order; while(sc.GetOrderForSymbolAndAccountByIndex(EMPTY_STRING, tradeAccount, orderIndex, order) != SCTRADING_ORDER_ERROR) { orderIndex++; // do something } } Date Time Of Last Edit: 2025-02-25 12:36:41
|