I don't know if this is a bug or something else but I am having difficulty in isolating positions so they are only displaying if the specific account is selected in ' accountSelector.SelectedAccount' field.
Take for example the AddOn Framework example. If i update the OnPositionUpdate method with the following code,
// This method is fired as a position changes private void OnPositionUpdate(object sender, PositionEventArgs e) { try { Dispatcher.InvokeAsync(() => { if (e.Position.Instrument != Instrument) return; outputBox.Text = string.Format("Time: {1}{0}Selected Acc: {2}", Environment.NewLine, DateTime.Now, accountSelector.SelectedAccount.Name); }); } catch (Exception error) { Dispatcher.InvokeAsync(() => { // It is important to protect NinjaTrader from any unhandled exceptions that may arise from your code outputBox.Text = "AddOnFramework - OnPositionUpdate Exception: " + error.ToString(); }); } }
Please can someone assist, thanks.
The video link explains hopefully what is happening.:http://recordit.co/vCKDFjQS5k
Comment