I try to get the unrealizedProfitLoss per instrument in the account. How can I retrieve the information? I tried to use the code from https://ninjatrader.com/support/help...ns_account.htm.
[B]foreach (Position position in myAccount.Positions)[/B] [B] {[/B] [B] Print(String.Format("Position: {0} at {1}", position.MarketPosition, position.AveragePrice, position.GetUnrealizedProfitLoss(PerformanceUnit.Currency, Close[0])));[/B] [B] }[/B]
Any ideas how I can handle this?
Kind regards
Gerik
Comment