• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

fibonacci extension

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    fibonacci extension

    Hi, your known this indicator for NT8.?

    It's for NT7.

    http://www.freeindicators.com/ninjat...ion-indicator/

    #2
    Hello cocoescala,

    Thank you for writing in.

    This indicator may exist in the indicators section of our forum however the forum is undergoing changes and this section is unavailable. In the next week I suggest checking back on the forum to see if this section has been uploaded. If you are unable to find it by this time next week please reply to this thread.

    Thank you for your patience.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi, I did not find the indicator.

      when trying to convert it to nt8, do not graph the fibo extensions with this code


      #region Using declarations
      using System;
      using System.Collections;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.ComponentModel.DataAnnotations;
      using System.Diagnostics.CodeAnalysis;
      using System.Windows;
      using System.Reflection;
      using System.Windows.Media;
      using System.Xml.Serialization;
      using NinjaTrader.Cbi;
      using NinjaTrader.Data;
      using NinjaTrader.Gui;
      using NinjaTrader.Gui.Chart;
      using NinjaTrader.Gui.Tools;
      using NinjaTrader.NinjaScript.DrawingTools;
      using NinjaTrader.NinjaScript.Indicators;
      #endregion

      // This namespace holds all indicators and is required. Do not change it.
      namespace NinjaTrader.NinjaScript.Indicators
      {
      /// <summary>
      /// This indicator will automatically draw fibonacci extensions from swing highs and
      /// lows in the market.
      ///
      /// Code Written by Tyler Moore
      /// www.FreeIndicators.Com
      ///
      /// For modifications to this code or to have your own custom code written
      /// please visit www.MooreTechLLC.com
      /// </summary>
      public class AutoFibExtensions : Indicator
      {
      #region Variables
      // Wizard generated variables
      private int strength = 20; // Default setting for Strength
      // User defined variables (add any user defined variables below)
      private FibonacciExtensions fib;
      private MIN min;
      private MAX max;
      private int barsSinceHigh = -1, barsSinceLow = -1;
      private int pBarsSinceHigh = -1, pBarsSinceLow = -1;
      #endregion

      private void Initialize()
      {
      IsOverlay = true;
      }

      protected override void OnStateChange()
      {
      switch (State)
      {
      case State.SetDefaults:
      Name = "AutoFibExtensions";
      Description = "Code Written by Tyler Moore - www.FreeIndicators.Com";
      Initialize();
      break;

      case State.DataLoaded:
      OnStartUp();
      break;
      }
      }

      private void OnStartUp()
      {
      min=MIN(Low,strength);
      max=MAX(High,strength);
      }

      protected override void OnBarUpdate()
      {
      if (CurrentBar<strength)
      return;

      if (High[0]>max[1])
      {
      if (barsSinceLow<barsSinceHigh)
      pBarsSinceHigh = barsSinceHigh;
      barsSinceHigh=0;
      }
      else if (barsSinceHigh>-1)
      barsSinceHigh++;

      if (Low[0]<min[1])
      {
      if (barsSinceHigh<barsSinceLow)
      pBarsSinceLow = barsSinceLow;
      barsSinceLow=0;
      }
      else if (barsSinceLow>-1)
      barsSinceLow++;

      if (pBarsSinceLow>-1)
      pBarsSinceLow++;
      if (pBarsSinceHigh>-1)
      pBarsSinceHigh++;

      if (Math.Max(pBarsSinceHigh,pBarsSinceLow)<=0)
      return;

      if (barsSinceHigh<barsSinceLow)
      fib=Draw.FibonacciExtensions(this,"fib",IsAutoScal e,pBarsSinceHigh,High[pBarsSinceHigh],barsSinceLow,Low[barsSinceLow],barsSinceHigh,High[barsSinceHigh]);
      else
      fib=Draw.FibonacciExtensions(this,"fib",IsAutoScal e,pBarsSinceLow,Low[pBarsSinceLow],barsSinceHigh,High[barsSinceHigh],barsSinceLow,Low[barsSinceLow]);
      }

      #region Properties
      [NinjaScriptProperty]
      [Display(Description = "", GroupName = "Parameters", Order = 1)]
      public int Strength
      {
      get { return strength; }
      set { strength = Math.Max(1, value); }
      }
      #endregion
      }
      }

      #region NinjaScript generated code. Neither change nor remove.

      namespace NinjaTrader.NinjaScript.Indicators
      {
      public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
      {
      private AutoFibExtensions[] cacheAutoFibExtensions;
      public AutoFibExtensions AutoFibExtensions(int strength)
      {
      return AutoFibExtensions(Input, strength);
      }

      public AutoFibExtensions AutoFibExtensions(ISeries<double> input, int strength)
      {
      if (cacheAutoFibExtensions != null)
      for (int idx = 0; idx < cacheAutoFibExtensions.Length; idx++)
      if (cacheAutoFibExtensions[idx] != null && cacheAutoFibExtensions[idx].Strength == strength && cacheAutoFibExtensions[idx].EqualsInput(input))
      return cacheAutoFibExtensions[idx];
      return CacheIndicator<AutoFibExtensions>(new AutoFibExtensions(){ Strength = strength }, input, ref cacheAutoFibExtensions);
      }
      }
      }

      namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
      {
      public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
      {
      public Indicators.AutoFibExtensions AutoFibExtensions(int strength)
      {
      return indicator.AutoFibExtensions(Input, strength);
      }

      public Indicators.AutoFibExtensions AutoFibExtensions(ISeries<double> input , int strength)
      {
      return indicator.AutoFibExtensions(input, strength);
      }
      }
      }

      namespace NinjaTrader.NinjaScript.Strategies
      {
      public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
      {
      public Indicators.AutoFibExtensions AutoFibExtensions(int strength)
      {
      return indicator.AutoFibExtensions(Input, strength);
      }

      public Indicators.AutoFibExtensions AutoFibExtensions(ISeries<double> input , int strength)
      {
      return indicator.AutoFibExtensions(input, strength);
      }
      }
      }

      #endregion

      Comment


        #4
        Hi, a friend fix the code, this is the code for NT8:

        #region Using declarations
        using System;
        using System.Collections;
        using System.Collections.Generic;
        using System.ComponentModel;
        using System.ComponentModel.DataAnnotations;
        using System.Diagnostics.CodeAnalysis;
        using System.Windows;
        using System.Reflection;
        using System.Windows.Media;
        using System.Xml.Serialization;
        using NinjaTrader.Cbi;
        using NinjaTrader.Data;
        using NinjaTrader.Gui;
        using NinjaTrader.Gui.Chart;
        using NinjaTrader.Gui.Tools;
        using NinjaTrader.NinjaScript.DrawingTools;
        using NinjaTrader.NinjaScript.Indicators;
        #endregion

        // This namespace holds all indicators and is required. Do not change it.
        namespace NinjaTrader.NinjaScript.Indicators
        {
        /// <summary>
        /// This indicator will automatically draw fibonacci extensions from swing highs and
        /// lows in the market.
        ///
        /// Code Written by Tyler Moore
        /// www.FreeIndicators.Com
        ///
        /// For modifications to this code or to have your own custom code written
        /// please visit www.MooreTechLLC.com
        /// </summary>
        public class AutoFibExtensionsSSTEAM : Indicator
        {
        #region Variables
        // Wizard generated variables
        private int strength = 20; // Default setting for Strength
        // User defined variables (add any user defined variables below)
        private FibonacciExtensions fib;
        private MIN min;
        private MAX max;
        private int barsSinceHigh = -1, barsSinceLow = -1;
        private int pBarsSinceHigh = -1, pBarsSinceLow = -1;
        #endregion

        private void Initialize()
        {
        IsOverlay = true;
        }

        protected override void OnStateChange()
        {
        switch (State)
        {
        case State.SetDefaults:
        Name = "AutoFibExtensions - SSTEAM";
        Description = "Code Written by Tyler Moore - www.FreeIndicators.Com";
        Initialize();
        break;

        case State.DataLoaded:
        OnStartUp();
        break;
        }
        }

        private void OnStartUp()
        {
        min=MIN(Low,strength);
        max=MAX(High,strength);
        }

        protected override void OnBarUpdate()
        {
        if (CurrentBar<strength)
        return;

        if (High[0]>max[1])
        {
        if (barsSinceLow<barsSinceHigh)
        pBarsSinceHigh = barsSinceHigh;
        barsSinceHigh=0;
        }
        else if (barsSinceHigh>-1)
        barsSinceHigh++;

        if (Low[0]<min[1])
        {
        if (barsSinceHigh<barsSinceLow)
        pBarsSinceLow = barsSinceLow;
        barsSinceLow=0;
        }
        else if (barsSinceLow>-1)
        barsSinceLow++;

        if (pBarsSinceLow>-1)
        pBarsSinceLow++;
        if (pBarsSinceHigh>-1)
        pBarsSinceHigh++;

        if (Math.Max(pBarsSinceHigh,pBarsSinceLow)<=0)
        return;

        if (( pBarsSinceHigh < 0 ) || (pBarsSinceLow<0) || (barsSinceHigh<0) || (barsSinceLow<0)) {
        return;
        }

        if (barsSinceHigh<barsSinceLow)
        fib=Draw.FibonacciExtensions(this,"fib",IsAutoScal e,pBarsSinceHigh,High[pBarsSinceHigh],barsSinceLow,Low[barsSinceLow],barsSinceHigh,High[barsSinceHigh]);
        else
        fib=Draw.FibonacciExtensions(this,"fib",IsAutoScal e,pBarsSinceLow,Low[pBarsSinceLow],barsSinceHigh,High[barsSinceHigh],barsSinceLow,Low[barsSinceLow]);
        }

        #region Properties
        [NinjaScriptProperty]
        [Display(Description = "", GroupName = "Parameters", Order = 1)]
        public int Strength
        {
        get { return strength; }
        set { strength = Math.Max(1, value); }
        }
        #endregion
        }

        }

        #region NinjaScript generated code. Neither change nor remove.

        namespace NinjaTrader.NinjaScript.Indicators
        {
        public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
        {
        private AutoFibExtensionsSSTEAM[] cacheAutoFibExtensionsSSTEAM;
        public AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(int strength)
        {
        return AutoFibExtensionsSSTEAM(Input, strength);
        }

        public AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(ISeries<double> input, int strength)
        {
        if (cacheAutoFibExtensionsSSTEAM != null)
        for (int idx = 0; idx < cacheAutoFibExtensionsSSTEAM.Length; idx++)
        if (cacheAutoFibExtensionsSSTEAM[idx] != null && cacheAutoFibExtensionsSSTEAM[idx].Strength == strength && cacheAutoFibExtensionsSSTEAM[idx].EqualsInput(input))
        return cacheAutoFibExtensionsSSTEAM[idx];
        return CacheIndicator<AutoFibExtensionsSSTEAM>(new AutoFibExtensionsSSTEAM(){ Strength = strength }, input, ref cacheAutoFibExtensionsSSTEAM);
        }
        }
        }

        namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
        {
        public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
        {
        public Indicators.AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(int strength)
        {
        return indicator.AutoFibExtensionsSSTEAM(Input, strength);
        }

        public Indicators.AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(ISeries<double> input , int strength)
        {
        return indicator.AutoFibExtensionsSSTEAM(input, strength);
        }
        }
        }

        namespace NinjaTrader.NinjaScript.Strategies
        {
        public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
        {
        public Indicators.AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(int strength)
        {
        return indicator.AutoFibExtensionsSSTEAM(Input, strength);
        }

        public Indicators.AutoFibExtensionsSSTEAM AutoFibExtensionsSSTEAM(ISeries<double> input , int strength)
        {
        return indicator.AutoFibExtensionsSSTEAM(input, strength);
        }
        }
        }

        #endregion

        Comment


          #5
          Hello,

          Thank you for sharing.

          Please let us know if you need further assistance.
          Alan P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pitifak, Today, 01:01 AM
          0 responses
          3 views
          0 likes
          Last Post pitifak
          by pitifak
           
          Started by rjafcv, Yesterday, 10:40 PM
          0 responses
          4 views
          0 likes
          Last Post rjafcv
          by rjafcv
           
          Started by JAtrades, Yesterday, 07:38 PM
          0 responses
          3 views
          0 likes
          Last Post JAtrades  
          Started by bouncetherubble, Yesterday, 07:07 PM
          0 responses
          2 views
          0 likes
          Last Post bouncetherubble  
          Started by bouncetherubble, Yesterday, 06:12 PM
          0 responses
          5 views
          0 likes
          Last Post bouncetherubble  
          Working...
          X