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

    Hi
    I am just simply trying to place a Fibonachi Extension EUR/USD, but get following error:
    11/12/2008 22:38:17 Default Error on calling the 'OnBarUpdate' method for indicator 'MyZigZag' on bar 0: MyZigZag.DrawFibonacciExtensions: anchor1BarsAgo out of valid range 0 through 0, was 38.

    My Code:
    DrawFibonacciExtensions("tag1", true, 38, 1.3305, 31, 1.334, 28, 1.3309);

    Please help

    #2
    Hi Ironleg,

    Welcome to the NinjaTrader Support Forums. Please see this tip: http://www.ninjatrader-support2.com/...ead.php?t=3170
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Hi Ironleg,

      Welcome to the NinjaTrader Support Forums. Please see this tip: http://www.ninjatrader-support2.com/...ead.php?t=3170

      Thank you very much!

      Comment


        #4
        Your method seems to be executed on bar0, which doesn't make sense I guess.

        Regards
        Ralph

        Comment


          #5
          Originally posted by Ralph View Post
          Your method seems to be executed on bar0, which doesn't make sense I guess.

          Regards
          Ralph
          It does... look at the link above, when you reload the script it will call this method on every OnBarUpdate from the start, but from the start I don't have enough bars, so if I do something like this

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

          DrawFobo();
          }

          It will not throw an error, I just need no less than 42 bars drawn in the case of the method in my first post
          Last edited by Ironleg; 12-12-2008, 10:15 AM.

          Comment


            #6
            I didn't notice Josh's link (time is due for the holidays). Sorry, and welcome too to the forum.

            Regards
            Ralph

            Comment


              #7
              Originally posted by Ralph View Post
              I didn't notice Josh's link (time is due for the holidays). Sorry, and welcome too to the forum.

              Regards
              Ralph
              Thank you, I am new to NinjaTrader, but being a .Net C# developer, love it so far very very much

              Here is another question:

              Is it possible to access drawn objects like FiboExtension for it's levels via name or id?

              Comment


                #8
                We do not support accessing draw objects through NinjaScript. If you want to remember it's values you should store calculations that determine them for use later on.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  We do not support accessing draw objects through NinjaScript. If you want to remember it's values you should store calculations that determine them for use later on.
                  it's a pity... it would've been a killer feature, not only in regards of Fibs, but for all objects on the chart, will have to find a work around.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by andrewtrades, Today, 04:57 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post andrewtrades  
                  Started by chbruno, Today, 04:10 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post chbruno
                  by chbruno
                   
                  Started by josh18955, 03-25-2023, 11:16 AM
                  6 responses
                  436 views
                  0 likes
                  Last Post Delerium  
                  Started by FAQtrader, Today, 03:35 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post FAQtrader  
                  Started by rocketman7, Today, 09:41 AM
                  5 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X