示例#1
0
 protected StrategyBase(string name, string description)
 {
     this.metaStrategyBase = (MetaStrategyBase)null;
     this.name             = name;
     this.description      = description;
     this.isEnabled        = true;
     this.isActive         = true;
     this.ReportManager    = StrategyComponentManager.GetComponent("getcom", (object)this) as ReportManager;
     this.MarketManager    = StrategyComponentManager.GetComponent("getcom", (object)this) as MarketManager;
     this.portfolio        = PortfolioManager.Portfolios[name];
     if (this.portfolio == null)
     {
         this.portfolio = new Portfolio(name);
     }
     this.tester             = new LiveTester(this.portfolio);
     this.stops              = new StopList();
     this.triggers           = new TriggerList();
     this.marketDataProvider = (IMarketDataProvider)null;
     this.executionProvider  = (IExecutionProvider)null;
     this.newsProvider       = (INewsProvider)null;
     this.executionService   = (IExecutionService)null;
     this.orders             = new OrderTable();
     this.global             = new Hashtable();
     this.activeInstruments  = new InstrumentList();
     this.barSliceManager    = new BarSliceManager();
     this.componentTypeList  = new List <ComponentType>();
     this.componentTypeList.Add(ComponentType.MarketManager);
     this.componentTypeList.Add(ComponentType.ReportManager);
     this.activeStops = new Dictionary <Instrument, List <StopBase> >();
     this.portfolios  = new Dictionary <Instrument, Portfolio>();
     this.testers     = new Dictionary <Instrument, LiveTester>();
     this.statisticsPerInstrumentEnabled = false;
 }
示例#2
0
 protected StrategyBase(string name, string description)
 {
     this.metaStrategyBase = null;
     this.name             = name;
     this.description      = description;
     this.isEnabled        = true;
     this.isActive         = true;
     this.ReportManager    = (StrategyComponentManager.GetComponent("{5E7810DC-C9C1-427f-8CD9-1DFFE26E59B5}", this) as ReportManager);
     this.MarketManager    = (StrategyComponentManager.GetComponent("{849E4CFE-C19E-4d1e-899D-0BB26DB12AAD}", this) as MarketManager);
     this.portfolio        = PortfolioManager.Portfolios[name];
     if (this.portfolio == null)
     {
         this.portfolio = new Portfolio(name);
     }
     this.tester             = new LiveTester(this.portfolio);
     this.stops              = new StopList();
     this.triggers           = new TriggerList();
     this.marketDataProvider = null;
     this.executionProvider  = null;
     this.newsProvider       = null;
     this.executionService   = null;
     this.orders             = new OrderTable();
     this.global             = new Hashtable();
     this.activeInstruments  = new InstrumentList();
     this.barSliceManager    = new BarSliceManager();
     this.componentTypeList  = new List <ComponentType>();
     this.componentTypeList.Add(ComponentType.MarketManager);
     this.componentTypeList.Add(ComponentType.ReportManager);
     this.activeStops = new Dictionary <Instrument, List <StopBase> >();
     this.portfolios  = new Dictionary <Instrument, Portfolio>();
     this.testers     = new Dictionary <Instrument, LiveTester>();
     this.statisticsPerInstrumentEnabled = false;
 }
示例#3
0
 public ProviderDispatcher(MetaStrategyBase metaStrategyBase)
 {
     this.metaStrategyBase = metaStrategyBase;
     this.providers        = new ListDictionary();
 }
示例#4
0
 internal void Close()
 {
     StrategyComponentManager.ClearComponentCache(this);
     this.metaStrategyBase = null;
 }
示例#5
0
 public MarketDataDispatcher(MetaStrategyBase metaStrategyBase)
 {
     this.metaStrategyBase = metaStrategyBase;
     this.requests         = new Dictionary <IMarketDataProvider, Dictionary <Instrument, List <string> > >();
 }
 public OrderProcessor(MetaStrategyBase metaStrategyBase)
 {
     this.metaStrategyBase = metaStrategyBase;
     this.providers        = new List <IExecutionProvider>();
 }
示例#7
0
 public ExecutionServiceDispatcher(MetaStrategyBase metaStrategyBase)
 {
     this.metaStrategyBase  = metaStrategyBase;
     this.services          = new ListDictionary();
     this.orderServicePairs = new Dictionary <string, OrderServicePair>();
 }
示例#8
0
 public ServiceDispatcher(MetaStrategyBase metaStrategyBase)
 {
     this.metaStrategyBase = metaStrategyBase;
     this.services         = new ListDictionary();
 }
示例#9
0
 internal void VgOXd6ZUI()
 {
     StrategyComponentManager.ClearComponentCache((object)this);
     this.metaStrategyBase = (MetaStrategyBase)null;
 }