Login Page - Create Account

Support Board


Date/Time: Thu, 26 Jun 2025 08:54:06 +0000



[User Discussion] - ACSIL: Checking for open positions on the current account

View Count: 1664

[2020-11-23 07:36:39]
ycomp - Posts: 324
I would like to lock trading at a specific time, I have coded this part already.

However I don't want to lock trading at that time if there are any positions currently open.

How can I check if there are any positions on the current account open before I lock trading?
[2020-11-23 16:46:34]
ForgivingComputers.com - Posts: 1071
s_SCPositionData PositionData;
sc.GetTradePosition(PositionData);
if (PositionData.PositionQuantity != 0)
{
//Trading Unlocked code goes here
}
else
{
// Trading Locked code goes here
}

[2021-11-23 20:20:32]
ycomp - Posts: 324
This works great for the current symbol and account but is there any way to check if the account itself is flat?
[2021-11-23 20:54:27]
ForgivingComputers.com - Posts: 1071
ACSIL Interface Members - Functions: sc.GetTradeServiceAccountBalanceForTradeAccount()

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account