public void SetActivePosition(LivePosition position) { if (position != null && ActiveAccount.Portfolio.HasOpenPosition(position.Ticker)) { ActivePosition = ActiveAccount.Portfolio.GetPosition <LivePosition>(position.Ticker); LiveQuoteForm.Instance.SetActiveSecurity(ActivePosition.Security); LiveTradeEntryForm.Instance.SetActiveSecurity(ActivePosition.Security); SingleSecurityIndicatorForm.Instance.SetSecurity(ActivePosition.Security); } else { ActivePosition = null; } }
protected void OnPositionChanged(LivePosition position) { PositionChanged?.Invoke(this, new OpenPositionEventArgs(position)); }
protected void OnOpenPositionUpdate(LivePosition position) { OpenPositionsUpdate?.Invoke(this, new OpenPositionEventArgs(position)); }