Hello!
I think I found a rare/broker-specific bug when it somes to programmatically setting the AccountSelector with the DesiredAccount property.
I'm using the NT Continuum connection for connection to Oanda. In the Control Center, my account name appears as
[UserId]!Oanda![MyAcctNbr].
When I get the account name using selector.SelectedAccount.Name it only returns the account number portion. And when I try to put this back into the selector.DesiredAccount property, it can't find it.
It works fine with temp accounts. Also, if I hard code the value passed into DesiredAccount, it works fine.
// WORKS: selector.DesiredAccount = "Sim101"; // WORKS: selector.DesiredAccount = "[UserId]!Oanda![MyAcctNbr]"; // DOES NOT WORK: string accountName = selector.SelectedAccount.Name; selector.DesiredAccount = accountName; // accountName="[MyAcctNbr]";
Comment