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 Brevo, Today, 01:45 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Brevo
                  by Brevo
                   
                  Started by aussugardefender, Today, 01:07 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post aussugardefender  
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  240 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  384 views
                  1 like
                  Last Post Gavini
                  by Gavini
                   
                  Started by oviejo, Today, 12:28 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post oviejo
                  by oviejo
                   
                  Working...
                  X