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

DrawFibonocciCircle Issue

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

    DrawFibonocciCircle Issue

    I am trying to draw a Fibonacci circle using startTime not startBarsAgo. i can't get it to compile. I get a no overload for method. If I take out the autoscale it still won't compile. The autoscale doesn't show in intellisense when I mouse over the DrawFibonacciCircle.

    I even get a compile error if I try to use the example given in the Help:

    // Draws a fibonnaci circle
    DrawFibonacciCircle("tag1", true, 10, Low[10], 0, High[0]);

    but if I take out the auto-scale("true") it compiles fine.

    I can make it work by using bars and not time so I am not stuck but was curious what I am doing wrong with the time overload. I am running build 30.

    Here is the exact source code I am trying to compile:
    DrawFibonacciCircle("C1_" + DrawName , false, Times[BarsInProgress][0].AddMinutes(fibOffset), FibPoint2x , Times[BarsInProgress][0].AddMinutes(fibSpanMinutes).AddMinutes(fibOffset), FibPoint1x);

    any comment?
    Last edited by ct; 11-24-2015, 09:10 AM.

    #2
    Hello ct,

    Thank you for your inquiry.

    It looks like I am able to reproduce this on my end. The overloads provided do not function. The three overloads should be:

    Code:
    // first overload
    DrawFibonacciCircle(string tag, bool autoScale, bool divideTimePrice, DateTime startTime, double startY, DateTime endTime, double endY);
    
    // second overload
    DrawFibonacciCircle(string tag, bool autoScale, bool divideTimePrice, int startBarsAgo, double startY, int endBarsAgo, double endY);
    
    // third overload
    DrawFibonacciCircle(string tag, int startBarsAgo, double startY, int endBarsAgo, double endY);
    I have reported this to product management.

    Thank you for reporting this!
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      ZacharyG

      Can you keep me posted on what the estimated fix time might be? I wanted to know if I should wait or just use a work around.

      Cheers

      Comment


        #4
        Hello ct,

        You would be able to call DrawFibonacciCircle() with one of the overloads I have mentioned in my previous post.

        Unfortunately, I do not yet have a definition for the divideTimePrice boolean as of yet, but will provide it in this thread once I receive information.

        Since you are wanting to use DateTime, you'll want to use the first overload:

        Code:
        DrawFibonacciCircle(string tag, bool autoScale, bool divideTimePrice, DateTime startTime, double startY, DateTime endTime, double endY);
        It looks like the code you have provided does not have all of the arguments in that particular overload. I have highlighted the missing argument in red.

        Code:
        DrawFibonacciCircle("C1_" + DrawName, false, [COLOR="Red"][b]bool divideTimePrice[/b][/COLOR], Times[BarsInProgress][0].AddMinutes(fibOffset), FibPoint2x, Times[BarsInProgress][0].AddMinutes(fibSpanMinutes).AddMinutes(fibOffset), FibPoint1x);
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          ZacharyG

          Houston we have a problem. I can draw the fib circle fine but can't turn on/off auto-scale so my price action ends up crunched very small to fit the entire fib on the viewable area of the chart.. I can draw it by hand and it works fine but not via my indicator.

          You already gave me the answer I was just too stupid to see it. The double bool (bool, bool) fixed it.

          I'm good for now.
          Last edited by ct; 11-25-2015, 09:20 AM.

          Comment


            #6
            Hello ct,

            What is the auto scale argument for your method call set to? Setting this to false should prevent this behavior from occurring.

            Can you provide a sample script that can duplicate this behavior?
            Zachary G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            603 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            22 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            21 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X