예제 #1
0
        protected override void OnBarUpdate()
        {
            #region Indicator Formula

            UpperSeries.Set(__UpperBand);
            LowerSeries.Set(__LowerBand);
            PriceSeries.Set((High[0] + Low[0] + Close[0]) / 3);
            NormPriceSeries.Set(2 * JurikFunction_volat_norm(PriceSeries, 50)[0]);

            if (CurrentBar == 50)
            {
                for (int idx = 50 - 1; idx >= 0; idx--)
                {
                    NormPriceSeries[idx] = NormPriceSeries[0];
                }
            }

            VEL1 = CurrentBar <= 50 ? 0 : JurikVEL(NormPriceSeries, _VEL_len)[0];
            VEL1_Series.Set(VEL1);
            VEL2 = JurikVEL(VEL1_Series, 4)[0] * sqrtLen;
            VEL_blend.Set((1 - Blend) * VEL1 + Blend * VEL2);

            if (CurrentBar > 0)
            {
                phasedValue = VEL_blend[0] - PhaseShift * VEL_blend[1];
            }

            VELVELpos.Set(phasedValue > 0 ? VEL_blend[0] : 0);
            VELVELneg.Set(phasedValue < 0 ? VEL_blend[0] : 0);
            Phased_blend.Set(phasedValue);
            #endregion
        }
예제 #2
0
        protected override void OnBarUpdate()
        {
            #region Indicator Formula
            PriceSeries.Set((High[0] + Low[0] + Close[0]) / 3);
            UpperSeries.Set(__UpperBand);
            LowerSeries.Set(__LowerBand);

            RSX1 = JurikRSX(PriceSeries, _RSX_len)[0];
            RSX1_Series.Set(RSX1);
            RSX2    = JurikRSX(RSX1_Series, _RSX_len * 2)[0];
            mixture = (1 - Blend) * RSX1 + Blend * RSX2;
            RSX_blend.Set(CurrentBar < 31 ? 0 : 2 * mixture - 100);

            if (CurrentBar > 0)
            {
                phasedValue = RSX_blend[0] - PhaseShift * RSX_blend[1];
            }

            RSXRSXpos.Set(phasedValue > 0 ? RSX_blend[0] : 0);
            RSXRSXneg.Set(phasedValue < 0 ? RSX_blend[0] : 0);
            Phased_blend.Set(phasedValue);
            #endregion

            #region Panel Stabilizer
            panel_range_min.Set(-101);
            panel_range_max.Set(101);
            #endregion
        }
예제 #3
0
        protected override void OnBarUpdate()
        {
            #region Indicator Formula
            PriceSeries.Set((High[0] + Low[0] + Close[0]) / 3);
            UpperSeries.Set(__UpperBand);
            LowerSeries.Set(__LowerBand);

            RSX_fast = 2 * JurikRSX(PriceSeries, _RSX_fast_len)[0] - 100;
            RSX_slow = 2 * JurikRSX(PriceSeries, _RSX_slow_len)[0] - 100;
            mixture  = Blend * RSX_fast + (1 - Blend) * RSX_slow;
            rsxcolor = ColorShift * RSX_fast + (1 - ColorShift) * RSX_slow;

            RSX_blend.Set(CurrentBar < 31 ? 0 : mixture);
            RSX_color.Set(CurrentBar < 31 ? 0 : rsxcolor);
            RSXRSXpos.Set(rsxcolor > 0 ? RSX_blend[0] : 0);
            RSXRSXneg.Set(rsxcolor < 0 ? RSX_blend[0] : 0);
            #endregion

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