Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedAverageTrueRange"/> class using the specified name and period.
 /// </summary>
 /// <param name="name">The name of this indicator</param>
 /// <param name="period">The period of the NATR</param>
 public NormalizedAverageTrueRange(string name, int period) :
     base(name)
 {
     _period = period;
     _tr     = new TrueRange(name + "_TR");
     _atr    = new AverageTrueRange(name + "_ATR", period, MovingAverageType.Simple);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UltimateOscillator"/> class using the specified parameters
 /// </summary>
 /// <param name="name">The name of this indicator</param>
 /// <param name="period1">The first period</param>
 /// <param name="period2">The second period</param>
 /// <param name="period3">The third period</param>
 public UltimateOscillator(string name, int period1, int period2, int period3)
     : base(name)
 {
     _period             = Math.Max(Math.Max(period1, period2), period3);
     _trueRange          = new TrueRange(name + "_TR");
     _sumBuyingPressure1 = new Sum(name + "_BP1", period1);
     _sumBuyingPressure2 = new Sum(name + "_BP2", period2);
     _sumBuyingPressure3 = new Sum(name + "_BP3", period3);
     _sumTrueRange1      = new Sum(name + "_TR1", period1);
     _sumTrueRange2      = new Sum(name + "_TR2", period2);
     _sumTrueRange3      = new Sum(name + "_TR3", period3);
 }
Esempio n. 3
0
        public Interfaces.Indicators.TrueRange TrueRange(DataStream stream, TimeSpan barSize)
        {
            var nmodule = new TrueRange(stream, barSize);

            return(_manager.Subscribe <TrueRange>(nmodule));
        }
Esempio n. 4
0
        public Interfaces.Indicators.TrueRange TrueRange(DataStream stream)
        {
            var nmodule = new TrueRange(stream, _manager.Agent.TimeFrame);

            return(_manager.Subscribe <TrueRange>(nmodule));
        }