Beispiel #1
0
 public BollingerBandWidthIndicator(BollingerBandsUpperIndicator bbu, BollingerBandsMiddleIndicator bbm, BollingerBandsLowerIndicator bbl)
     : base(bbm.TimeSeries)
 {
     _bbu = bbu;
     _bbm = bbm;
     _bbl = bbl;
 }
Beispiel #2
0
        /**
         * Constructor.
         * @param indicator an indicator (usually close price)
         * @param timeFrame the time frame
         * @param k the K multiplier (usually 2.0)
         */
        public PercentBIndicator(IIndicator <decimal> indicator, int timeFrame, decimal k)
            : base(indicator)
        {
            _indicator = indicator;
            BollingerBandsMiddleIndicator bbm = new BollingerBandsMiddleIndicator(new SMAIndicator(indicator, timeFrame));
            StandardDeviationIndicator    sd  = new StandardDeviationIndicator(indicator, timeFrame);

            _bbu = new BollingerBandsUpperIndicator(bbm, sd, k);
            _bbl = new BollingerBandsLowerIndicator(bbm, sd, k);
        }