Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

DrawFibonacciExtensions error

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

    DrawFibonacciExtensions error

    I've used the built-in

    DrawFibonacciExtensions

    command in an indicator.

    Code:
    [FONT=Courier New][SIZE=2]
    [SIZE=2][FONT=Courier New]DrawFibonacciExtensions([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"tag1"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], GetBar(endDateTime), HighestHigh[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]], GetBar(endDateTime), LowestLow[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]], GetBar(endDateTime), LowestLow[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]]);[/SIZE][/FONT]
     
    [/SIZE][/FONT]
    However, it's plotting as if it's a retracement. (The plots that are drawn are only 0% to 100%) Do I need to set anchor points differently?

    Other than customizing my own levels for plotting lines, is there a manner to select custom levels using this built-in function?

    thanks,

    kz

    #2
    Not sure what you mean. It works just like the drawing tool on the chart. You have 3 anchor points and by default you get a 0-100% fib lines.

    Unfortunately you cannot programmatically customize these levels.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      Please see attached screenshot which shows Retracements produced by the DrawFibonacciExtensions even though it appears to match what would be produced using DrawFibonacciRetracements.


      I've begun to add my own plots for extension levels that should be shown.

      Kirk
      Attached Files

      Comment


        #4
        If you open a chart and use the drawing tool the end of Fib Ext looks like that and that is what you are seeing on your screenshot. Not exactly sure what you are trying to go after.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I'm trying to get values other than 0-100


          I'm led to believe that Fib Retracements occur 0 to 100( .236, .382, .5, .618, etc.)

          and Fib Extensions occur 100 and beyond (i.e. 1.5, 1.618, 2, 2.618, etc.)

          this built-in command for FibExtensions doesn't work since the results are identical to FibRetracements
          Last edited by zeller4; 06-24-2009, 05:29 PM.

          Comment


            #6
            zeller, for a quick view I would doublecheck the entered anchor points, you do for example High > Low > Low, where I think it has to be High > Low > High in your first DrawExtenstion call.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thank you Bertrand,

              That works now. It doesn't appear to be using any custom levels I used in settng my drawing tool. So it appears to be pulling levels from some defaults in the built-in.

              What code would allow me to change certain default levels that I'd like the built-in function to show or not show. In other words, is there a manner to turn on or off certain levels?

              Thanks,

              Kirk

              Comment


                #8
                Kirk, great this works now - unfortunately you would need use the default set levels, or just use your custom code if you need this set differently.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Balage0922, Today, 07:38 AM
                0 responses
                2 views
                0 likes
                Last Post Balage0922  
                Started by JoMoon2024, Today, 06:56 AM
                0 responses
                6 views
                0 likes
                Last Post JoMoon2024  
                Started by Haiasi, 04-25-2024, 06:53 PM
                2 responses
                19 views
                0 likes
                Last Post Massinisa  
                Started by Creamers, Today, 05:32 AM
                0 responses
                6 views
                0 likes
                Last Post Creamers  
                Started by Segwin, 05-07-2018, 02:15 PM
                12 responses
                1,786 views
                0 likes
                Last Post Leafcutter  
                Working...
                X