Support Board
Date/Time: Thu, 06 Feb 2025 16:44:26 +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(); } } } |