示例#1
0
 private void Process(ProcessEngine engine)
 {
     var sma12 = new SmaCalculator(12);
     foreach(var quote in this.ProcessedQuotes)
     {
         engine.Process(quote);
     }
 }
        public EmaCalculator(int windowSize)
        {
            if (windowSize < 1)
                throw new ArgumentOutOfRangeException("windowSize", windowSize, "Window size must be greater than zero.");

            this.sma = new SmaCalculator(windowSize);
            this.multiplier = 2m / (windowSize + 1);
            Reset();
        }