Support Board
Date/Time: Sat, 23 Nov 2024 23:18:23 +0000
Post From: Error with Sim Lock & Orders being executed
[2024-07-03 10:41:01] |
User431178 - Posts: 541 |
sometimes I see cannot cancel because trading lock is on.
To check the position before locking trading: s_SCPositionData PositionData; int Result = sc.GetTradePosition(PositionData); if (PositionData.PositionQuantity == 0 && PositionData.NonAttachedWorkingOrdersExist == 0) sc.SetTradingLockState(1); else /* Do something else */ Automated Trading From an Advanced Custom Study: Getting Trade Position Data Date Time Of Last Edit: 2024-07-03 10:41:29
|