Exemple #1
0
        public static IIndicatorEngine GetIndicator(Enumerations.IndicatorTypeEnum indicatorType, Logger logger)
        {
            switch (indicatorType)
            {
            case Enumerations.IndicatorTypeEnum.Macd:
                return(new MacdIndicator(logger));

            case Enumerations.IndicatorTypeEnum.Volume:
                return(new VolumeIndicator(logger));

            case Enumerations.IndicatorTypeEnum.CloseOpenCrossing:
                return(new CloseOpenCrossIndicator(logger));

            case Enumerations.IndicatorTypeEnum.Stocastic:
                return(new Stocastic.Stocastic(logger));

            default:
                return(null);
            }
        }
Exemple #2
0
 public IIndicatorEngine GetIndicator(Enumerations.IndicatorTypeEnum indicatorType, Logger logger)
 {
     return(IndicatorFactory.GetIndicator(indicatorType, logger));
 }
Exemple #3
0
 public static IQueryable <Indicator> FilterByType(this IQueryable <Indicator> indicators, Enumerations.IndicatorTypeEnum type)
 {
     return(indicators.Where(x => x.IndicatorType == type));
 }