示例#1
0
 public MarketOrderCache(BarItemType barType, Guid sessionId, Guid cacheId)
     : base(CacheModeOption.Write)
 {
     this.identityCode = sessionId.ToString();
     this.barType      = barType;
     this.cacheId      = cacheId;
     this.cacheMode    = CacheModeOption.Write;
 }
示例#2
0
 public StrategyCache(object signalInstance, Guid cacheId)
     : base(CacheModeOption.Write)
 {
     this.barType        = ((IStrategy)signalInstance).BarType;
     this.identityCode   = ((IStrategy)signalInstance).IdentityCode;
     this.cacheId        = cacheId;
     this.signalInstance = signalInstance;
     this.cacheMode      = CacheModeOption.Write;
 }
示例#3
0
        public MarketOrderCache(BarItemType barType, string identityCode, Guid cacheId)
            : base(CacheModeOption.Read)
        {
            this.identityCode = identityCode;
            this.barType      = barType;
            this.cacheId      = cacheId;
            this.cacheMode    = CacheModeOption.Read;


            this.Initialize(identityCode, barType, cacheId, CacheTypeOption.Orders);
            this.cacheIndex = CreateIndex();
        }
示例#4
0
        public StrategyCache(string identityCode, BarItemType barType, Guid cacheId)
            : base(CacheModeOption.Read)
        {
            this.identityCode = identityCode;
            this.barType      = barType;
            this.cacheId      = cacheId;
            this.cacheMode    = CacheModeOption.Read;


            this.Initialize(identityCode, barType, cacheId, CacheTypeOption.Strategy);
            this.cacheIndex = CreateIndex();
        }
示例#5
0
        public IndicatorCache(string identityCode, BarItemType barType, Guid cacheId)
            : base(CacheModeOption.Read)
        {
            this.identityCode = identityCode;
            this.barType      = barType;
            this.cacheId      = cacheId;
            this.cacheMode    = CacheModeOption.Read;

            this.Initialize(identityCode, barType, cacheId, CacheTypeOption.Indicator);
            this.cacheIndex = this.CreateIndex();
            this.charting   = CreateIndicatorCharting();
        }
示例#6
0
        public PricebarCache(BarItemType barType, Guid cacheId, CacheModeOption cacheMode = CacheModeOption.Write)
            : base(cacheMode)
        {
            this.barType   = barType;
            this.cacheId   = cacheId;
            this.cacheMode = CacheModeOption.Read;

            if (cacheMode == CacheModeOption.Read || cacheMode == CacheModeOption.ReadWrite)
            {
                this.Initialize("ohlc", barType, cacheId, CacheTypeOption.Pricebar);
                this.cacheIndex = CreateIndex();
            }
        }
示例#7
0
 public TimeKeyedCacheBase(CacheModeOption cacheMode)
 {
     this.cacheMode = cacheMode;
 }
示例#8
0
 public SequenceKeyedCacheBase(CacheModeOption cacheMode)
 {
     this.cacheMode = cacheMode;
 }