View Full Version : GetAccountValue
ATI user
10-24-2009, 09:32 AM
as yet there is no documentation on using GetAccountValue
I get a compile error "The name GetAccountValue does not exist in current context"
please provide syntax/context details
thanks
NinjaTrader_Dierk
10-24-2009, 09:34 AM
public double GetAccountValue(Cbi.AccountItem accountItem)
.... here are the supported enum values
public enum AccountItem
{
/// <summary>
/// Buying power.
/// (= remaining buying power).
/// </summary>
BuyingPower = 0,
/// <summary>
/// Total cash value of account.
/// </summary>
CashValue = 1,
//// <summary>
/// Realized profit / loss on account.
/// </summary>
RealizedProfitLoss = 9,
}
ATI user
10-24-2009, 10:05 AM
thanks Dierk
need more detail please....e.g. printing cash value of Sim101 account
ATI user
10-24-2009, 10:45 AM
point is Dierk, I can not get your code to compile so I am using it wrong of missing something
NinjaTrader_Dierk
10-25-2009, 03:24 AM
Please try this:
Print(GetAccountValue(AccountItem.CashValue));
Note: This method will return zero (0) on historical bars.
ATI user
10-25-2009, 08:41 AM
Thanks Dierk
Compiles and runs fine