Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GatorOscillator"/>.
 /// </summary>
 public GatorOscillator()
 {
     _alligator = new Alligator();
     Histogram1 = new GatorHistogram(_alligator.Jaw, _alligator.Lips, false);
     Histogram2 = new GatorHistogram(_alligator.Lips, _alligator.Teeth, true);
     InnerIndicators.Add(Histogram1);
     InnerIndicators.Add(Histogram2);
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Envelope"/>.
        /// </summary>
        public Envelope(LengthIndicator <decimal> ma)
        {
            InnerIndicators.Add(Middle = ma);
            InnerIndicators.Add(Upper  = (LengthIndicator <decimal>)ma.Clone());
            InnerIndicators.Add(Lower  = (LengthIndicator <decimal>)ma.Clone());

            Upper.Name = "Upper";
            Lower.Name = "Lower";
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StochasticOscillator"/>.
        /// </summary>
        public StochasticOscillator()
        {
            InnerIndicators.Add(K = new StochasticK());
            InnerIndicators.Add(D = new SimpleMovingAverage {
                Length = 3
            });

            Mode = ComplexIndicatorModes.Sequence;
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BollingerBands"/>.
 /// </summary>
 /// <param name="ma">Moving Average.</param>
 public BollingerBands(LengthIndicator <decimal> ma)
 {
     InnerIndicators.Add(MovingAverage = ma);
     InnerIndicators.Add(UpBand        = new BollingerBand(MovingAverage, _dev)
     {
         Name = "UpBand"
     });
     InnerIndicators.Add(LowBand = new BollingerBand(MovingAverage, _dev)
     {
         Name = "LowBand"
     });
     Width = 2;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AverageDirectionalIndex"/>.
        /// </summary>
        /// <param name="dx">Welles Wilder Directional Movement Index.</param>
        /// <param name="movingAverage">Moving Average.</param>
        public AverageDirectionalIndex(DirectionalIndex dx, LengthIndicator <decimal> movingAverage)
        {
            if (dx == null)
            {
                throw new ArgumentNullException("dx");
            }

            if (movingAverage == null)
            {
                throw new ArgumentNullException("movingAverage");
            }

            InnerIndicators.Add(Dx            = dx);
            InnerIndicators.Add(MovingAverage = movingAverage);
            Mode = ComplexIndicatorModes.Sequence;
        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Ichimoku"/>.
        /// </summary>
        /// <param name="tenkan">Tenkan line.</param>
        /// <param name="kijun">Kijun line.</param>
        public Ichimoku(IchimokuLine tenkan, IchimokuLine kijun)
        {
            if (tenkan == null)
            {
                throw new ArgumentNullException(nameof(tenkan));
            }

            if (kijun == null)
            {
                throw new ArgumentNullException(nameof(kijun));
            }

            InnerIndicators.Add(Tenkan  = tenkan);
            InnerIndicators.Add(Kijun   = kijun);
            InnerIndicators.Add(SenkouA = new IchimokuSenkouALine(Tenkan, Kijun));
            InnerIndicators.Add(SenkouB = new IchimokuSenkouBLine(Kijun)
            {
                Length = 52
            });
            InnerIndicators.Add(Chinkou = new IchimokuChinkouLine {
                Length = kijun.Length
            });
        }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DirectionalIndex"/>.
 /// </summary>
 public DirectionalIndex()
 {
     InnerIndicators.Add(Plus  = new DiPlus());
     InnerIndicators.Add(Minus = new DiMinus());
 }