Ejemplo n.º 1
0
		internal static void Update(DateTime date) {
			__cToday = date.Date;
			__cSymbolList.Clear();
			__cMitakeQuoteInformations.Clear();

			AbstractExchange cExchange = ProductManager.Manager.GetExchange(__sExchangeName);
			cExchange.Update(date); //更新交易所商品屬性資訊

			cExchange.UpdateTime = DateTime.Today.AddDays(-2);  //設定為兩天前(強迫更新)
			cExchange.Clear();  //如果要更新則全部清除

			//新增上櫃指數(Mitake股票清單內沒有這支指數需要自行新增)
			cExchange.AddProduct(MitakeSymbolManager.GetIndexSymbolInformation(9998));

			//新增上市指數(Mitake股票清單內沒有這支指數需要自行新增)
			cExchange.AddProduct(MitakeSymbolManager.GetIndexSymbolInformation(9999));
		}
Ejemplo n.º 2
0
        /// <summary>
        ///   取得陣列內的MitakeIndex類別資料
        /// </summary>
        /// <param name="serial">股票流水號</param>
        /// <returns>返回值: MitakeIndex類別</returns>
        internal MitakeIndex GetIndex(int serial)
        {
            MitakeIndex cMitakeIndex = null;

            if (!__cIndexs.TryGetValue(serial, out cMitakeIndex))
            {
                Product cProduct = MitakeSymbolManager.GetIndexSymbolInformation(serial);

                cMitakeIndex        = new MitakeIndex();
                cMitakeIndex.Serial = serial;

                if (cProduct != null)
                {
                    cMitakeIndex.SymbolId   = cProduct.SymbolId;
                    cMitakeIndex.SymbolName = cProduct.SymbolName;
                }

                lock (__cIndexs) {
                    __cIndexs.Add(serial, cMitakeIndex);
                }
            }
            return(cMitakeIndex);
        }