public CustomIndicatorDataPacket(CommonEnumerators.IndicatorRequestType requestDataType, List <StockEntity> stockList, List <IndicatorEntity> indicatorList)
 {
     this._categoryStockCodeDict = new Dictionary <int, List <String> >();
     base.RequestId        = RequestType.CustomIndicatorData;
     this._requestDataType = requestDataType;
     this._indicatorList   = new List <IndicatorEntity>();
     this._indicatorList.AddRange(indicatorList);
     this._stockList = stockList;
 }
 public CustomIndicatorDataPacket(CommonEnumerators.IndicatorRequestType requestDatType, List <StockEntity> stockList, List <int> customerIndicatorIdList)
 {
     this._categoryStockCodeDict = new Dictionary <int, List <String> >();
     base.RequestId        = RequestType.IndicatorData;
     this._requestDataType = requestDatType;
     this._stockList       = stockList;
     this._indicatorList   = new List <IndicatorEntity>();
     foreach (int num in customerIndicatorIdList)
     {
         IndicatorEntity indicatorEntityByCustomerId = IndicatorDataCore.GetIndicatorEntityByCustomerId(num);
         indicatorEntityByCustomerId.CustomerId = num;
         this._indicatorList.Add(indicatorEntityByCustomerId);
     }
 }
Exemple #3
0
 public IndicatorDataPacket2(CommonEnumerators.IndicatorRequestType requestDatType, List <StockEntity> stockList, List <int> customerIndicatorIdList)
 {
     base.RequestId                = RequestType.IndicatorData;
     this._requestDataType         = requestDatType;
     this._stockList               = stockList;
     this._customerIndicatorIdList = new List <int>();
     this._indicatorList           = new List <IndicatorEntity>();
     foreach (int num in customerIndicatorIdList)
     {
         IndicatorEntity indicatorEntityByCustomerId = IndicatorDataCore.GetIndicatorEntityByCustomerId(num);
         indicatorEntityByCustomerId.CustomerId = num;
         this._indicatorList.Add(indicatorEntityByCustomerId);
         this._customerIndicatorIdList.Add(num);
     }
 }
Exemple #4
0
 public BlockIndicatorDataPacket(CommonEnumerators.IndicatorRequestType requestDataType, List <String> blockCodeList, List <int> customerIndicatorIdList, BlockIndicatorParams blockParam)
 {
     base.RequestId  = RequestType.BlockQuoteSeriesData;
     this._blockList = blockCodeList;
     this._customerIndicatorIdList = new List <int>();
     this._blockParam      = blockParam;
     this._requestDataType = requestDataType;
     this._indicatorList   = new List <IndicatorEntity>();
     foreach (int num in customerIndicatorIdList)
     {
         IndicatorEntity indicatorEntityByCustomerId = IndicatorDataCore.GetIndicatorEntityByCustomerId(num);
         indicatorEntityByCustomerId.CustomerId = num;
         this._indicatorList.Add(indicatorEntityByCustomerId);
         this._customerIndicatorIdList.Add(num);
     }
 }
 public QuoteSeriesDataPacket(CommonEnumerators.IndicatorRequestType requestDatType, List <StockEntity> stockList, List <int> customerIndicatorIdList)
 {
     base.RequestId                = RequestType.QuoteSeriesData;
     base._requestDataType         = requestDatType;
     base._stockList               = stockList;
     base._customerIndicatorIdList = customerIndicatorIdList;
     if ((base._stockList.Count > 1) && (base._customerIndicatorIdList.Count > 1))
     {
         throw new Exception("行情序列不支持多个股票多个指标");
     }
     base._indicatorList = new List <IndicatorEntity>();
     foreach (int num in base._customerIndicatorIdList)
     {
         base._indicatorList.Add(IndicatorDataCore.GetIndicatorEntityByCustomerId(num, false));
         base._indicatorUnitDict[num] = DataCore.CreateInstance().GetIndicatorUnit(num);
     }
 }