/// <summary> /// Создать <see cref="AverageDirectionalIndex"/>. /// </summary> /// <param name="dx">Индекса направленного движения Welles Wilder.</param> /// <param name="movingAverage">Скользящая средняя.</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; }
/// <summary> /// Initialize test /// </summary> public TestIndicatorDirectionalIndex() { DataStream stream = new OHLCBarStream(new ForexSecurity("EURUSD"), BarInterval.FiveMin); _sut = new DirectionalIndex(Period, stream, TimeSpan.FromMinutes(5)); }