Unable to access my account balance / values within script, trying to replicate something like this:
Simple test code snippet:
Account a = Account.All.First(t => t.Name == "Sim101");
AcctBalance = a.Get(AccountItem.NetLiquidation, Currency.UsDollar);
Print("NetLiquidation = " + AcctBalance);
The problem appears to be my account name "t.Name" string:
The exact line of code I am using (name & number obscured):
Account a = Account.All.First(t => t.Name == "Joe Blow Trader!Mirus!123456");
The display name (Joe Blow Trader!Mirus!123456) in account details does includes spaces & I have tried removing space).
The response I'm receiving in the output window:
Strategy 'STRATEGY301': Error on calling 'OnBarUpdate' method on bar 11: Sequence contains no matching element
Works fine when using Account a = Account.All.First(t => t.Name == "Sim101");
The output / response I receive : NetLiquidation = 100179.93
So it appears my Display Name does not match the account name?
How / where do I find my correct account t.Name?
And is there a method to enumerate through all NT connected accounts myself to discover syntax for all brokerage connections?
i.e. Get Account.All.XXXXX? (instead of using First / FirstOrDefault)
Thanks!

Comment