Example #1
0
        public async Task TestSmaOscAsync()
        {
            var candles = await ImportCandlesAsync();

            var indicator = new SimpleMovingAverageOscillator(candles, 10, 30);
            var result    = indicator[candles.Count - 1];

            Assert.IsTrue(2.82m.IsApproximatelyEquals(result.Value));
        }
Example #2
0
        public async Task TestSmaOscAsync()
        {
            var equity = await ImportEquityAsync();

            var indicator = new SimpleMovingAverageOscillator(equity, 10, 30);
            var result    = indicator.ComputeByIndex(equity.Count - 1);

            Assert.IsTrue(2.82m.IsApproximatelyEquals(result.Osc.Value));
        }
 public SimpleMovingAverageOscillatorTrend(IList <decimal> closes, int periodCount1, int periodCount2)
     : base(closes)
 {
     _smaOsc = new SimpleMovingAverageOscillator(closes, periodCount1, periodCount2);
 }
 public SimpleMovingAverageOscillatorTrend(Equity equity, int periodCount1, int periodCount2)
     : base(equity, periodCount1, periodCount2)
 {
     _smaOscillator = new SimpleMovingAverageOscillator(equity, periodCount1, periodCount2);
 }