Esempio n. 1
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionChaikinVolatility;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameChaikinVolatility;
                IsSuspendedWhileInactive = true;
                MAPeriod  = 10;
                ROCPeriod = 10;

                AddPlot(Brushes.Crimson, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameChaikinVolatility);
            }
            else if (State == State.DataLoaded)
            {
                ema = EMA(Range(), MAPeriod);
            }
        }
Esempio n. 2
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionROC;
                Name        = "GIRocHedger";
                IsSuspendedWhileInactive = true;
                Period = 8;

                AddLine(Brushes.DarkGray, 0, NinjaTrader.Custom.Resource.NinjaScriptIndicatorZeroLine);
                AddPlot(Brushes.Red, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameROC);
            }
            else if (State == State.DataLoaded)
            {
                baseEMA = EMA(Period);
            }
        }
Esempio n. 3
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionDEMA;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameDEMA;
                IsSuspendedWhileInactive = true;
                IsOverlay = true;
                Period    = 14;

                AddPlot(Brushes.Goldenrod, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameDEMA);
            }
            else if (State == State.DataLoaded)
            {
                ema    = EMA(Inputs[0], Period);
                emaEma = EMA(ema, Period);
            }
        }
Esempio n. 4
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionTRIX;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameTRIX;
                IsSuspendedWhileInactive = true;
                Period       = 14;
                SignalPeriod = 3;

                AddPlot(Brushes.DimGray, NinjaTrader.Custom.Resource.NinjaScriptIndicatorDefault);
                AddPlot(Brushes.Crimson, NinjaTrader.Custom.Resource.TRIXSignal);
                AddLine(Brushes.DarkGray, 0, NinjaTrader.Custom.Resource.NinjaScriptIndicatorZeroLine);
            }
            else if (State == State.DataLoaded)
            {
                emaTriple  = EMA(EMA(EMA(Inputs[0], Period), Period), Period);
                emaDefault = EMA(Default, SignalPeriod);
            }
        }
Esempio n. 5
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionPPO;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNamePPO;
                IsSuspendedWhileInactive = true;
                Fast   = 12;
                Slow   = 26;
                Smooth = 9;

                AddPlot(Brushes.DimGray, NinjaTrader.Custom.Resource.NinjaScriptIndicatorDefault);
                AddPlot(Brushes.Crimson, NinjaTrader.Custom.Resource.PPOSmoothed);
                AddLine(Brushes.DarkGray, 0, NinjaTrader.Custom.Resource.NinjaScriptIndicatorZeroLine);
            }
            else if (State == State.DataLoaded)
            {
                emaFast = EMA(Fast);
                emaSlow = EMA(Slow);
            }
        }
Esempio n. 6
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionAPZ;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameAPZ;
                IsSuspendedWhileInactive = true;
                IsOverlay = true;
                BandPct   = 2;
                Period    = 20;

                AddPlot(Brushes.Crimson, NinjaTrader.Custom.Resource.NinjaScriptIndicatorLower);
                AddPlot(Brushes.Crimson, NinjaTrader.Custom.Resource.NinjaScriptIndicatorUpper);
            }
            else if (State == State.DataLoaded)
            {
                emaEMA    = EMA(EMA(newPeriod), newPeriod);
                emaRange  = EMA(Range(), Period);
                newPeriod = 0;
            }
        }
Esempio n. 7
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionPFE;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNamePFE;
                IsSuspendedWhileInactive = true;
                Period = 14;
                Smooth = 10;

                AddPlot(Brushes.DodgerBlue, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNamePFE);
                AddLine(Brushes.DarkGray, 0, NinjaTrader.Custom.Resource.PFEZero);
            }

            else if (State == State.DataLoaded)
            {
                div             = new Series <double>(this);
                pfeSeries       = new Series <double>(this);
                singlePfeSeries = new Series <double>(this);
                ema             = EMA(pfeSeries, Smooth);
            }
        }
Esempio n. 8
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionPriceOscillator;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNamePriceOscillator;
                Fast        = 12;
                IsSuspendedWhileInactive = true;
                Slow   = 26;
                Smooth = 9;

                AddLine(Brushes.DarkGray, 0, NinjaTrader.Custom.Resource.NinjaScriptIndicatorZeroLine);
                AddPlot(Brushes.Goldenrod, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNamePriceOscillator);
            }
            else if (State == State.DataLoaded)
            {
                smoothEma = new Series <double>(this);
                emaFast   = EMA(Fast);
                emaSlow   = EMA(Slow);
                emaSmooth = EMA(smoothEma, Smooth);
            }
        }
Esempio n. 9
0
        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDescriptionRIND;
                Name        = NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameRIND;
                IsOverlay   = false;
                IsSuspendedWhileInactive = true;
                PeriodQ = 3;
                Smooth  = 10;

                AddPlot(Brushes.DarkCyan, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameRIND);
            }

            else if (State == State.DataLoaded)
            {
                stochRange = new Series <double>(this);
                val1       = new Series <double>(this);
                ema        = EMA(stochRange, Smooth);
                min        = MIN(val1, PeriodQ);
                max        = MAX(val1, PeriodQ);
            }
        }