• 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 Fan tool for NT8?

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

    Fibonacci Fan tool for NT8?

    Hi!

    I could really use the Fibonacci Fan tool for NT8. Maybe possible to make on from the existing Fib tools or is there something available already?

    #2
    This tool is not currently available in NinjaTrader 8, however, this would be possible through custom programming.
    Patrick G.NinjaTrader Customer Service

    Comment


      #3
      Allright. I'll see if I can find someone to help me. My C# skills isn't good enough.

      Comment


        #4
        Originally posted by chrille View Post
        Allright. I'll see if I can find someone to help me. My C# skills isn't good enough.
        Write in to PlatformSupport[AT]NinjaTrader[DOT]com and one of my colleagues on the NinjaScript Team should be able to provide some examples.
        Patrick G.NinjaTrader Customer Service

        Comment


          #5
          Thanks NinjaTrader_PatrickG, I'll do that!

          Comment


            #6
            Hello chrille,

            My name is Jess and I will be happy to answer any questions that come up while you develop this indicator. As a first step, I would recommend creating a "stock" indicator by visiting New -> NinjaScript Editor, right-clicking Indicator on the right, selecting "New Indicator", following along in the wizard long enough to give your Indicator a name, then clicking "Generate". I would then recommend putting bare minimum code for each of the Fibo drawing tools documented here in your OnBarUpdate method :

            Fibo Retracements
            http://ninjatrader.com/support/helpG...tracements.htm
            Code:
            
            // Draws a fibonnaci retracement
             Draw.FibonacciRetracements(this,"tag1",true,10,Low[10],0,High[0]);
            Fibo Circle
            http://ninjatrader.com/support/helpG...accicircle.htm
            Code:
            
            // Draws a Fibonacci circle
             Draw.FibonacciCircle(this,"tag1",true,10,Low[10],0,High[0]);
            Fibo Extensions
            http://ninjatrader.com/support/helpG...extensions.htm
            Code:
            
            // Draws a fibonnaci extension
             Draw.FibonacciExtensions(this,"tag1",true,4,Low[4],3,High[3],1,Low[1]);
            Fibo Time Extensions
            http://ninjatrader.com/support/helpG...extensions.htm
            Code:
            
            // Draws a fibonacci time extension object
             Draw.FibonacciTimeExtensions(this,"tag1",false,10,Low[10],0,High[0]);
            I would recommend starting off with retracements as those are going to be the kinds of Fibo fans that you are probably familiar with.

            If you would like the services of a certified NinjaScript consultant, please let us know and I will be happy to ask a more community savvy colleague to weigh in.

            Happy coding and happy trading!
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Extending IDrawObject

              Hi Jess,
              Is it possible / "officially supported by NT" to extend IDrawObject and add a new/custom function DrawGannFann? Something similar to custom bars.

              If yes, please provide links to sample code.

              Thanks in advance.

              Regards

              Vivek

              Comment


                #8
                Thank you for asking, AnkaS.

                We do now directly support creating custom drawing tools, including Fibo fans, in NinjaTrader 8. You will want to investigate this link

                http://ninjatrader.com/support/helpG...wing_tools.htm

                I am attaching a script which contains code that comes with NinjaTrader 8 and a dummied out DrawGannFann method for you to fill in
                Attached Files
                Last edited by NinjaTrader_JessicaP; 10-19-2016, 10:35 AM.
                Jessica P.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Jess.
                  Thanks for your response and dummy code.

                  However clicking on "ExampleFan.cs" leads to message "Invalid Attachment specified. If you followed a valid link, please notify the administrator".

                  Regards

                  Vivek
                  For Anka Software

                  Comment


                    #10
                    If you are on a company or public terminal it may be that your systems administrator is not allowing you to download source code files from the internet. Otherwise you may want to review your browser configuration so that you are able to download code samples from the NinjaTrader forums and other places on the internet.

                    As a convenience, I have pasted the code into a block here. You will want to save it as (My) Documents\NinjaTrader 8\bin\Custom\DrawingTools\ExampleFan.cs

                    Code:
                    //
                    // Copyright (C) 2016, NinjaTrader LLC <www.ninjatrader.com>.
                    // NinjaTrader reserves the right to modify or overwrite this NinjaScript component with each release.
                    //
                    #region Using declarations
                    using System;
                    using System.Collections.Generic;
                    using System.ComponentModel;
                    using System.ComponentModel.DataAnnotations;
                    using System.Linq;
                    using System.Windows;
                    using System.Windows.Input;
                    using System.Windows.Media;
                    using NinjaTrader.Core.FloatingPoint;
                    using NinjaTrader.Gui;
                    using NinjaTrader.Gui.Chart;
                    using NinjaTrader.Gui.Tools;
                    #endregion
                    
                    namespace NinjaTrader.NinjaScript.DrawingTools
                    {
                        // when creating a custom type converter for drawing tools it must inherit from DrawingToolsPropertyConverter to work correctly with chart anchors
                        public class ExampleFan : Gui.DrawingTools.DrawingToolPropertiesConverter
                        {
                            /// <summary>
                            /// TODO: describe your DrawGannFan method here
                            /// </summary>
                            /// <parameter name="argument">TODO: describe your arguments</parameter>
                            /// <returns>TODO: describe what DrawGannFan returns</returns>
                            public static FibonacciRetracements DrawGannFan(object argument)
                            {
                                // TODO: your code here, then return non-null
                                return null;
                            }
                    
                            public override bool GetPropertiesSupported(ITypeDescriptorContext context)
                            {
                                return true;
                            }
                    
                            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
                            {
                                // override the GetProperties method to return a property collection that hides extended lines & text alignment properties
                                // since they do not apply to fib circle / time
                                PropertyDescriptorCollection propertyDescriptorCollection = base.GetPropertiesSupported(context) ? base.GetProperties(context, value, attributes) : TypeDescriptor.GetProperties(value, attributes);
                                PropertyDescriptorCollection adjusted = new PropertyDescriptorCollection(null);
                                foreach (PropertyDescriptor property in propertyDescriptorCollection)
                                    if (property.Name != "IsExtendedLinesRight" && property.Name != "IsExtendedLinesLeft" && property.Name != "TextLocation")
                                        adjusted.Add(property);
                                return adjusted;
                            }
                        }
                    }
                    Jessica P.NinjaTrader Customer Service

                    Comment


                      #11
                      Fib Fan NT8

                      Hi there,

                      has anyone had any luck coding a custom fib fan drawing tool for ninjatrader 8?

                      Sparks01

                      Comment


                        #12
                        Hello sparks01,

                        Were you able to install, run, and use the provided ExampleFan.cs in this thread? If any obstacles came up with extending this custom fibo fan, please let us know so we may assist further.
                        Jessica P.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by rickyblah12, Today, 08:17 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post rickyblah12  
                        Started by mrlucky1x, Today, 08:07 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post mrlucky1x  
                        Started by uday12, Today, 07:21 PM
                        0 responses
                        3 views
                        0 likes
                        Last Post uday12
                        by uday12
                         
                        Started by voltlon, Today, 05:18 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post voltlon
                        by voltlon
                         
                        Started by Bobisam, Today, 04:57 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post Bobisam
                        by Bobisam
                         
                        Working...
                        X