Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:40:55 +0000



[Programming Help] - size manager

View Count: 177

[2023-12-20 09:51:14]
stephane1 - Posts: 111
Hello, I'm looking to create a ACSIL position size manager, and I need real-time data from my account (IBKR). First, I want to use this command:
n_ACSIL::s_TradeAccountDataFields TradeAccountDataFields;
    if (sc.GetTradeAccountData(TradeAccountDataFields, sc.SelectedTradeAccount))
    {
       AccountValue = TradeAccountDataFields.m_CurrentCashBalance;
    }

however, I don't understand why when I go short (sell) "AccountValue" increases. I have an idea; I think it's the borrowed money that gets added to cash. That being said, I just want to have the value of the amount involved in the trade. Secondly, I'm looking for the other fields of this command TradeAccountDataFields.m_CurrentCashBalance, but I can't find them.
tku
Stef

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

Login

Login Page - Create Account