"Lock (Account.All)
account = Account.All.FirstOrDefault(a => a.Name == account.Name);"
The problem with this approach is that if account hasn't been assigned, the account.Name does not exist (creating an error message). And, if it has been assigned, we don't need this line.
I have also tried:
"accountSelector = Window.GetWindow(ChartControl.Parent).FindFirst("C hartTraderControlAccountSelector") as NinjaTrader.Gui.Tools.AccountSelector;"
But this cannot be executed within DataLoaded. Trust me, I have done a lot of experimenting and research to find a solution, without success.
So, if you advise that it be placed in the DataLoaded area and feel you have a solution, please share.
Thanks.
Comment