public ATSStrategy(string name, string description) : base(name, description) { this.ATSCrossComponent = StrategyComponentManager.GetComponent("componentname", this) as ATSCrossComponent; this.ATSComponent = StrategyComponentManager.GetComponent("componentname", this) as ATSComponent; this.csNiLdTRqH = new Dictionary <Instrument, ATSComponent>(); this.componentTypeList.Add(ComponentType.ATSComponent); this.componentTypeList.Add(ComponentType.ATSCrossComponent); }
protected override void OnInit() { this.csNiLdTRqH.Clear(); this.klBiFcxZsD = Activator.CreateInstance(this.RaPiDqI6k4.GetType()) as ATSCrossComponent; this.klBiFcxZsD.StrategyBase = (StrategyBase)this; this.SetProxyProperties((object)this.klBiFcxZsD, (object)this.RaPiDqI6k4); this.klBiFcxZsD.Init(); foreach (Instrument instrument in (FIXGroupList)this.marketManager.Instruments) { this.activeInstruments.Add(instrument); ATSComponent atsComponent = Activator.CreateInstance(this.IR0iPwP5Kr.GetType()) as ATSComponent; atsComponent.StrategyBase = (StrategyBase)this; atsComponent.Instrument = instrument; this.SetProxyProperties((object)atsComponent, (object)this.IR0iPwP5Kr); atsComponent.Init(); this.csNiLdTRqH.Add(instrument, atsComponent); } }
public override void SetComponent(ComponentType type, IComponentBase component) { switch (type) { case ComponentType.ATSComponent: this.ATSComponent = component as ATSComponent; break; case ComponentType.ATSCrossComponent: this.ATSCrossComponent = component as ATSCrossComponent; break; case ComponentType.MarketManager: this.MarketManager = component as MarketManager; break; case ComponentType.ReportManager: this.ReportManager = component as ReportManager; break; default: throw new InvalidOperationException(""); } }
protected override void OnInit() { this.csNiLdTRqH.Clear(); this.klBiFcxZsD = Activator.CreateInstance(this.RaPiDqI6k4.GetType()) as ATSCrossComponent; this.klBiFcxZsD.StrategyBase = (StrategyBase)this; this.SetProxyProperties((object)this.klBiFcxZsD, (object)this.RaPiDqI6k4); this.klBiFcxZsD.Init(); foreach (Instrument instrument in (FIXGroupList) this.marketManager.Instruments) { this.activeInstruments.Add(instrument); ATSComponent atsComponent = Activator.CreateInstance(this.IR0iPwP5Kr.GetType()) as ATSComponent; atsComponent.StrategyBase = (StrategyBase)this; atsComponent.Instrument = instrument; this.SetProxyProperties((object)atsComponent, (object)this.IR0iPwP5Kr); atsComponent.Init(); this.csNiLdTRqH.Add(instrument, atsComponent); } }
public ATSStrategy(string name, string description) : base(name, description) { this.ATSCrossComponent = StrategyComponentManager.GetComponent("componentname", this) as ATSCrossComponent; this.ATSComponent = StrategyComponentManager.GetComponent("componentname", this) as ATSComponent; this.csNiLdTRqH = new Dictionary<Instrument, ATSComponent>(); this.componentTypeList.Add(ComponentType.ATSComponent); this.componentTypeList.Add(ComponentType.ATSCrossComponent); }