Support Board
Date/Time: Sat, 23 Nov 2024 23:27:09 +0000
Post From: Error with Sim Lock & Orders being executed
[2024-07-01 03:27:39] |
User194332 - Posts: 40 |
Apologies I might be mis understanding something here. The code is checking if P&L exceeds a specific amount and sets a lock state but before the lock I want the orders and positions flattened. Are you saying that this cannot be done directly in the code? What does sc.CancelAllOrders(); do ? I'd like to avoid P&L watching at all if possible and just let the program take care of the cancelling. |