Positions
<< Click to Display Table of Contents >> Positions |
A collection of Position objects generated for the specified account
An Collection of Position objects
Account.Positions
<Account>.Positions
private Account myAccount;protected override void OnStateChange(){if (State == State.SetDefaults){// Find our Sim101 accountlock (Account.All)myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101");}if (State == State.DataLoaded){lock (myAccount.Positions){Print("Positions in State.DataLoaded:");foreach (Position position in myAccount.Positions){Print(String.Format("Position: {0} at {1}", position.MarketPosition, position.AveragePrice));}}}} |