/** * Constructor. * @param price the price * @param timeFrame the time frame */ public DPOIndicator(IIndicator <decimal> price, int timeFrame) : base(price) { _timeFrame = timeFrame; _timeShift = timeFrame / 2 + 1; _price = price; _sma = new SMAIndicator(price, timeFrame); }
/** * Constructor. * @param series the time series * @param timeFrame the time frame (normally 20) */ public CCIIndicator(ITimeSeries series, int timeFrame) : base(series) { _typicalPriceInd = new TypicalPriceIndicator(series); _smaInd = new SMAIndicator(_typicalPriceInd, timeFrame); _meanDeviationInd = new MeanDeviationIndicator(_typicalPriceInd, timeFrame); _timeFrame = timeFrame; }
/** * Constructor. * @param price the price * @param shortSmaTimeFrame the time frame for the short SMA (usually 7) * @param longSmaTimeFrame the time frame for the long SMA (usually 65) */ public RAVIIndicator(IIndicator <decimal> price, int shortSmaTimeFrame, int longSmaTimeFrame) : base(price) { _shortSma = new SMAIndicator(price, shortSmaTimeFrame); _longSma = new SMAIndicator(price, longSmaTimeFrame); }
/** * Constructor. * * @param indicator (normally {@link MedianPriceIndicator}) * @param timeFrameSma1 (normally 5) * @param timeFrameSma2 (normally 34) */ public AwesomeOscillatorIndicator(IIndicator <decimal> indicator, int timeFrameSma1, int timeFrameSma2) : base(indicator) { _sma5 = new SMAIndicator(indicator, timeFrameSma1); _sma34 = new SMAIndicator(indicator, timeFrameSma2); }
public AccelerationDecelerationIndicator(ITimeSeries series, int timeFrameSma1, int timeFrameSma2) : base(series) { _awesome = new AwesomeOscillatorIndicator(new MedianPriceIndicator(series), timeFrameSma1, timeFrameSma2); _sma5 = new SMAIndicator(_awesome, timeFrameSma1); }