Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 23:53:55 +0000



Post From: Error with Sim Lock & Orders being executed

[2024-06-29 03:02:34]
User194332 - Posts: 40
Thanks Brad - The issue i'm having is that the Lock is getting set but the orders in the book are not cancelling.


Once, the the Lock is now on and I cannot cancel the orders manually but it still executes. I want the position to Flatten & All Orders Open to be cancelled before the lock gets set.


i'm using the following but think it might be interfering with a position limit set in global settings. Is there a way round this?

sc.PlaySound("Alert1.wav");
sc.CancelAllOrders();
sc.FlattenPosition();
  
//Locktrading
sc.SetTradingLockState(1);


Additionally can I ask when testing this out in Replay mode, CurrentsystemDateTime Is the time based on Global settings time zone which I've got set to New York or Local time is UK. Assuming its NY but could be mistaken there.