コード例 #1
0
 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);
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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("");
            }
        }
コード例 #4
0
ファイル: ATSStrategy.cs プロジェクト: heber/FreeOQ
		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);
			}
		}
コード例 #5
0
ファイル: ATSStrategy.cs プロジェクト: heber/FreeOQ
		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);
		}
コード例 #6
0
ファイル: ATSStrategy.cs プロジェクト: heber/FreeOQ
		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("");
			}
		}