protected override void InitExecuteContext() { if (IsSimple) { return; } m_sma = new SMA { Context = Context, Period = Period }; m_k = 2D / (1D + Period); m_lastResult = 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 }; }
protected override void InitExecuteContext() { if (IsSimple) { return; } m_sma = new SMA { Context = Context, Period = Period }; m_stDev = new StDev { Context = Context, Period = Period }; }
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); } } }
protected override void ClearExecuteContext() { m_sma = null; m_stDev = null; }
protected override void ClearExecuteContext() { m_sma = null; m_lastResult = 0; }
protected override void ClearExecuteContext() { m_source = null; m_smaValues = null; m_smaHandler = null; }