Announcement

Collapse
No announcement yet.

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 Hwop38, 05-04-2026, 07:02 PM
                  0 responses
                  161 views
                  0 likes
                  Last Post Hwop38
                  by Hwop38
                   
                  Started by CaptainJack, 04-24-2026, 11:07 PM
                  0 responses
                  309 views
                  0 likes
                  Last Post CaptainJack  
                  Started by Mindset, 04-21-2026, 06:46 AM
                  0 responses
                  245 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by M4ndoo, 04-20-2026, 05:21 PM
                  0 responses
                  349 views
                  0 likes
                  Last Post M4ndoo
                  by M4ndoo
                   
                  Started by M4ndoo, 04-19-2026, 05:54 PM
                  0 responses
                  179 views
                  0 likes
                  Last Post M4ndoo
                  by M4ndoo
                   
                  Working...
                  X