Exemple #1
0
        private SMACore(BarItemType barItemType, int barCount, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted=null)
            : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
        {
            this.barCount = barCount;
            this.maxBarIndex = barCount - 1;

            this.identityCode = CreateIdentityCode(barCount);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #2
0
 public static StochasticsCore CreateInstance(BarItemType barItemType, int periods, int smoothedPercentKPeriods, int smoothedPercentDPeriods, PriceChangeCore priceChangeCore, HighsAndLowsCore highsAndLowsCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new StochasticsCore(barItemType, periods, smoothedPercentKPeriods, smoothedPercentDPeriods, priceChangeCore, highsAndLowsCore, onCalculationCompleted));
 }
Exemple #3
0
        private void Init(BarItemType barItemType, int periods, PriceChangeCore priceChangeCore, HighsAndLowsCore highsAndLowsCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
        {
            this.barCount    = periods;
            this.maxBarIndex = barCount - 1;
            this.percentDSmoothingConstant = (double)2 / (smoothedPercentDPeriods + 1);

            this.AddDependency(barItemType, highsAndLowsCore);
            this.AddDependency(barItemType, priceChangeCore);

            this.highsAndLows = highsAndLowsCore;
            this.priceChange  = priceChangeCore;

            this.identityCode = CreateIdentityCode(periods);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #4
0
 //Full stochastics
 private StochasticsCore(BarItemType barItemType, int periods, int smoothedPercentKPeriods, int smoothedPercentDPeriods, PriceChangeCore priceChangeCore, HighsAndLowsCore highsAndLowsCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
     : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
 {
     this.smoothedPercentK        = true;
     this.smoothedPercentKPeriods = smoothedPercentKPeriods;
     this.smoothedPercentDPeriods = smoothedPercentDPeriods;
     Init(barItemType, periods, priceChangeCore, highsAndLowsCore, onCalculationCompleted);
 }
Exemple #5
0
 public static ATRCore CreateInstance(BarItemType barItemType, int periods, TrueRangeCore trueRangeCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new ATRCore(barItemType, periods, trueRangeCore, onCalculationCompleted));
 }
Exemple #6
0
        private ATRCore(BarItemType barItemType, int periods, TrueRangeCore trueRangeCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
            : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
        {
            this.barCount    = periods;
            this.maxBarIndex = periods - 1;

            this.AddDependency(barItemType, trueRangeCore);

            this.trueRangeCore = trueRangeCore;

            this.identityCode = CreateIdentityCode(periods);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #7
0
        private ADXCore(BarItemType barItemType, int periods, DirectionalMovementIndexCore directionalMovementIndexCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
            : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
        {
            this.barCount    = periods;
            this.maxBarIndex = periods - 1;

            this.AddDependency(barItemType, directionalMovementIndexCore);

            this.dxCore = directionalMovementIndexCore;

            this.identityCode = CreateIdentityCode(periods);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #8
0
 public static HighsAndLowsCore CreateInstance(BarItemType barItemType, int periods, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new HighsAndLowsCore(barItemType, periods, onCalculationCompleted));
 }
Exemple #9
0
 public static MACDCore CreateInstance(BarItemType barItemType, EMACore fastEMACore, EMACore slowEMACore, int signalLinePeriod, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new MACDCore(barItemType, fastEMACore, slowEMACore, signalLinePeriod, onCalculationCompleted));
 }
Exemple #10
0
 public static RSICore CreateInstance(BarItemType barItemType, int periods, PriceChangeCore priceChangeCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new RSICore(barItemType, periods, priceChangeCore, onCalculationCompleted));
 }
Exemple #11
0
        private MACDCore(BarItemType barItemType, EMACore fastEMACore, EMACore slowEMACore, int signalLinePeriod, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
            : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
        {
            this.barCount                    = slowEMACore.Period;
            this.maxBarIndex                 = barCount - 1;
            this.signalLinePeriod            = signalLinePeriod;
            this.signalLineSmoothingConstant = (double)2 / (signalLinePeriod + 1);

            this.AddDependency(barItemType, fastEMACore);
            this.AddDependency(barItemType, slowEMACore);

            this.fastEMA = fastEMACore;
            this.slowEMA = slowEMACore;

            this.identityCode = CreateIdentityCode(fastEMA.Period, slowEMA.Period, signalLinePeriod);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #12
0
 public static DirectionalMovementIndexCore CreateInstance(BarItemType barItemType, int periods, TrueRangeCore trueRangeCore, DirectionalMovementCore directionalMovementCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new DirectionalMovementIndexCore(barItemType, periods, trueRangeCore, directionalMovementCore, onCalculationCompleted));
 }
Exemple #13
0
 public static DirectionalMovementCore CreateInstance(BarItemType barItemType, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new DirectionalMovementCore(barItemType, onCalculationCompleted));
 }
Exemple #14
0
 public static CCICore CreateInstance(BarItemType barItemType, int barCount, TPMACore tpmaCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new CCICore(barItemType, barCount, tpmaCore, onCalculationCompleted));
 }
Exemple #15
0
        private BollingerBandsCore(BarItemType barItemType, int barCount, SMACore smaCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null, double stdMultiplier = 2)
            : base(DISPLAY_NAME, SHORT_NAME, DESCRIPTION, barItemType)
        {
            this.barCount      = barCount;
            this.maxBarIndex   = barCount - 1;
            this.stdMultiplier = stdMultiplier;

            this.AddDependency(barItemType, smaCore);

            this.smaCore = smaCore;

            this.identityCode = CreateIdentityCode(barCount);

            if (onCalculationCompleted != null)
            {
                this.Calculated += onCalculationCompleted;
            }
        }
Exemple #16
0
 public static PriceChangeCore CreateInstance(BarItemType barItemType, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new PriceChangeCore(barItemType, onCalculationCompleted));
 }
Exemple #17
0
 public static BollingerBandsCore CreateInstance(BarItemType barItemType, int barCount, SMACore smaCore, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null, double stdMultiplier = 2)
 {
     return(new BollingerBandsCore(barItemType, barCount, smaCore, onCalculationCompleted, stdMultiplier));
 }
Exemple #18
0
 public static SMACore CreateInstance(BarItemType barItemType, int barCount, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted=null)
 {
     return new SMACore(barItemType, barCount, onCalculationCompleted);
 }
Exemple #19
0
 public static IchimokuCloudCore CreateInstance(BarItemType barItemType, IndicatorDelegates.CalculationCompletedHandler onCalculationCompleted = null)
 {
     return(new IchimokuCloudCore(barItemType, onCalculationCompleted));
 }