Пример #1
0
        protected override void OnBarUpdate()
        {
            #region Indicator Formula
            if (CurrentBar >= 2 * CCX_len)
            {
                CCX.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len).CCX[0]);
                _TopLineSeries.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len)._TopLineSeries[0]);
                _BotLineSeries.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len)._BotLineSeries[0]);
                _ZeroLineSeries.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len)._ZeroLineSeries[0]);
                _CCXbarWhite.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len)._CCXbarWhite[0]);
                _CCXbarBlack.Set(Jurik_CCX_custom(_BotLine, _TopLine, CCX_len)._CCXbarBlack[0]);
            }
            #endregion

            #region Panel Stabilizer
            panel_range_min.Set(-200);
            panel_range_max.Set(200);
            #endregion
        }
Пример #2
0
        protected override void OnBarUpdate()
        {
            #region Indicator formula
            PriceSeries.Set((High[0] + Low[0] + Close[0]) / 3);
            JMAValue  = JurikJMA(PriceSeries, 50, 6)[0];
            DWMAvalue = WMA(WMA(PriceSeries, CCX_len), CCX_len)[0];
            numer     = JMAValue - DWMAvalue;
            AbsNumerSeries.Set(Math.Abs(numer));
            denom     = 0.015 * SMA(AbsNumerSeries, 255)[0];
            ccx_value = (CurrentBar >= 2 * CCX_len && denom > 0.0000001) ? numer / denom : 0;
            CCX.Set(ccx_value);

            _CCXbarBlack.Set(ccx_value);
            _CCXbarWhite.Set(Math.Min(_TopLine, Math.Max(_BotLine, ccx_value)));
            _TopLineSeries.Set(_TopLine);
            _BotLineSeries.Set(_BotLine);
            _ZeroLineSeries.Set(0);
            #endregion

            #region Panel Stabilizer
            panel_range_min.Set(-200);
            panel_range_max.Set(200);
            #endregion
        }