Esempio n. 1
0
        protected override void InitExecuteContext()
        {
            if (IsSimple)
            {
                return;
            }

            m_sma = new SMA {
                Context = Context, Period = Period
            };
            m_k          = 2D / (1D + Period);
            m_lastResult = 0;
        }
Esempio n. 2
0
        protected override void InitExecuteContext()
        {
            if (IsSimple)
            {
                return;
            }

            m_source     = new ShrinkedList <double>(Period);
            m_smaValues  = new ShrinkedList <double>(Period);
            m_smaHandler = new SMA {
                Context = Context, Period = Period
            };
        }
Esempio n. 3
0
        protected override void InitExecuteContext()
        {
            if (IsSimple)
            {
                return;
            }

            m_sma = new SMA {
                Context = Context, Period = Period
            };
            m_stDev = new StDev {
                Context = Context, Period = Period
            };
        }
Esempio n. 4
0
        protected override void InitExecuteContext()
        {
            if (IsSimple)
            {
                return;
            }

            m_sma = new SMA {
                Context = Context, Period = Period
            };
            if (Shift > 0)
            {
                m_queue = new Queue <double>(Shift + 1);
                for (var i = 0; i < Shift; i++)
                {
                    m_queue.Enqueue(m_executeContext.Source);
                }
            }
        }
Esempio n. 5
0
 protected override void ClearExecuteContext()
 {
     m_sma   = null;
     m_stDev = null;
 }
Esempio n. 6
0
 protected override void ClearExecuteContext()
 {
     m_sma        = null;
     m_lastResult = 0;
 }
Esempio n. 7
0
 protected override void ClearExecuteContext()
 {
     m_source     = null;
     m_smaValues  = null;
     m_smaHandler = null;
 }