protected override void OnSetPortfolio(Account.PortfolioVM portfVm) { OptionalLegs = from l in portfVm.Legs select l.Symbol; ChangePositionSetting settings = (ChangePositionSetting)portfVm.StrategySetting; this.CloseLeg = settings.CloseLeg; this.CloseLegSide = settings.CloseLegSide; this.TriggerCondition = settings.TriggerCondition; this.Threshold = settings.Threshold; }
protected override void OnSetPortfolio(Account.PortfolioVM portfVm) { ScalperSetting settings = (ScalperSetting)portfVm.StrategySetting; this.Threshold = settings.Threshold; this.PriceTick = settings.PriceTick; this.CaseGE4Tick = settings.CaseGE4Tick; this.CaseLE2Tick = settings.CaseLE2Tick; this.CaseLE3Tick = settings.CaseLE3Tick; this.CaseNoChange = settings.CaseNoChange; this.StopLossCloseMethod = settings.StopLossCloseMethod; this.RetryTimes = settings.RetryTimes; this.OpenTimeout = settings.OpenTimeout; }
protected virtual void OnSetPortfolio(Account.PortfolioVM portfVm) { }
protected override void OnSetPortfolio(Account.PortfolioVM portfVm) { OptionalLegs = from l in portfVm.Legs select l.Symbol; }