this is my code
AccountItem[] items = {
AccountItem.BuyingPower,
AccountItem.CashValue,
AccountItem.ExcessEquity,
AccountItem.InitialMargin,
AccountItem.InitialMarginOvernight,
AccountItem.MaintenanceMargin,
AccountItem.MaintenanceMarginOvernight,
AccountItem.NetLiquidation,
AccountItem.NetLiquidationByCurrency,
AccountItem.RealizedProfitLoss,
AccountItem.TotalCashBalance };
Print( string.Format("AccountValues {0}", Account.Name) );
foreach( AccountItem ai in items )
Print( string.Format("AccountItem.{0}\t\t{1}", ai, GetAccountValue( ai )) );
this is output
**NT** Enabling NinjaScript strategy 'AccountValues/040e0af0a69144d48879e0cc46cf6980' : On starting a real-time strategy - StrategySync=WaitUntilFlat SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=False CancelExitOrdersOnDisable=True CalculateOnBarClose=True MaxRestarts=4 in 5 minutes
AccountValues xxxxxxxx!RCG!RC_Futures
AccountItem.BuyingPower 0
AccountItem.CashValue 0
AccountItem.ExcessEquity 0
AccountItem.InitialMargin 0
AccountItem.InitialMarginOvernight 0
AccountItem.MaintenanceMargin 0
AccountItem.MaintenanceMarginOvernight 0
AccountItem.NetLiquidation 0
AccountItem.NetLiquidationByCurrency 0
AccountItem.RealizedProfitLoss 0
AccountItem.TotalCashBalance 0

Comment