Example #1
0
        //缓存数据变动事件
        public override void EventHandler_DataCacheChange(object sender, DataCache_Event e)
        {
            CacheInfo <Data_Quote> pCacheInfo = (CacheInfo <Data_Quote>)e.CacheInfo;

            if (pCacheInfo.Data.QuoteTimeType == typeTimeFrequency.real)
            {
                if (pCacheInfo.Data.GetStockName() == "50ETF")
                {
                    this.SetData(pCacheInfo, typeTimeFrequency.m5, typeTimeFrequency.m5);
                    this.SetData(pCacheInfo, typeTimeFrequency.m15, typeTimeFrequency.m5);
                    this.SetData(pCacheInfo, typeTimeFrequency.m30, typeTimeFrequency.m5);
                    this.SetData(pCacheInfo, typeTimeFrequency.m60, typeTimeFrequency.m5);
                    this.SetData(pCacheInfo, typeTimeFrequency.m120, typeTimeFrequency.m5);
                    this.SetData(pCacheInfo, typeTimeFrequency.day, typeTimeFrequency.m5);
                    //this.SetData(pCacheInfo, typeTimeFrequency.week, typeTimeFrequency.m5);
                }
            }
        }
        //缓存数据检查对象初始事件
        public virtual void EventHandler_DataCacheChecksInitial(object sender, DataCache_Event e)
        {
            //提取数据缓存对象、及检查对象集
            IDataCache poDataCache = e.DataCache;

            if (poDataCache != null)
            {
                IDataChecks poDataChecks_Cache = poDataCache.DataChecks;
                if (poDataChecks_Cache == null)
                {
                    poDataChecks_Cache = new DataChecks_Quote(poDataCache.ID, poDataCache, null, _msger);
                }

                //初始检查集
                bool bResult = poDataCache.InitDataChecks(poDataChecks_Cache);
                bResult = bResult && this.InitDataCheck(poDataChecks_Cache, poDataCache.DataCache_Set.Time_Frequency);
            }
        }
 //缓存数据变动事件
 public virtual void EventHandler_DataCacheChange(object sender, DataCache_Event e)
 {
 }
Example #4
0
 //缓存数据初始装载事件--载入数据
 public override void EventHandler_DataCacheLoad(object sender, DataCache_Event e)
 {
     //载入缓存数据
     int nNums = this.DataCacheLoad(e.DataCache, DateTime.MinValue);
 }