Support Board
Date/Time: Fri, 04 Jul 2025 14:25:24 +0000
Post From: sc.GetOrderByOrderID
[2020-04-29 01:19:28] |
User701453 - Posts: 176 |
When using the sc.GetOrderByOrderID function. It causes the persistent variable "EntryOrderID" to increase by one number.ie 27035 will increase to 27036 Which of course will cause the "IsWorkingOrderStatus" to always be false. I have debugged with VS and using the "locals" window and break point after the function call, I can see when the value changes and its always after the call of the "sc.GetOrderByOrderID". Current SC version 2092 s_SCTradeOrder ExistingOrderDetails; if (sc.GetOrderByOrderID(EntryOrderID, ExistingOrderDetails)) { if (IsWorkingOrderStatus(ExistingOrderDetails.OrderStatusCode)) { if (EntryOrderID > 0 && sc.Index >= BarIndexOfOrder + Bars_Limit_Cancel.GetInt()) { sc.FlattenAndCancelAllOrders(); } } } |