Ejemplo n.º 1
0
        public void AddPoint(double val)
        {
            emaShort.AddPoint(val);
            emaLong.AddPoint(val);

            if (MACDActive)
            {
                macd = val - emaLong.EMAverage;
                if (macd > 0.0)
                {
                    macdSum.AddPoint(macd);
                }
                else
                {
                    macdSum.Reset();
                    emaLong.SetPoint(val);
                }
                emaMacdSum.AddPoint(macdSum.Sum);
            }
        }