Exemple #1
0
 public static IDataSeries GetDataSeries(Instrument instrument, DataManager.EDataSeries series)
 {
     string suffix;
     switch (series)
     {
         case DataManager.EDataSeries.Daily:
             suffix = SUFFIX_DAILY;
             break;
         case DataManager.EDataSeries.Trade:
             suffix = SUFFIX_TRADE;
             break;
         case DataManager.EDataSeries.Quote:
             suffix = SUFFIX_QUOTE;
             break;
         case DataManager.EDataSeries.Bar:
             suffix = SUFFIX_BAR;
             break;
         case DataManager.EDataSeries.MarketDepth:
             suffix = SUFFIX_MARKET_DEPTH;
             break;
         case DataManager.EDataSeries.Fundamental:
             suffix = SUFFIX_FUNDAMENTAL;
             break;
         case DataManager.EDataSeries.CorporateAction:
             suffix = SUFFIX_CORPORATE_ACTION;
             break;
         default:
             throw new ArgumentException("Eerro: {0}" + series.ToString());
     }
     return DataManager.server.GetDataSeries(instrument.Symbol + SERIES_SEPARATOR + suffix);
 }