• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 V12 indicator error when V11 was fine

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

    NT8 V12 indicator error when V11 was fine

    Like others I have upgraded to Beta version 12 of NT8.
    I have a couple of indicators that call other indicators and uses multi time frames.

    They were working fine in V11 but now I receive this error from a try/catch output around the code I have found to be the culprit. (This error comes up on a lot of the bars but I do get some results from my indicator using a 'Print' output, so it's not all errors. There are results and errors together in the output)

    15-Jul-16 3:59:55 PM System.ArgumentOutOfRangeException: 'barsAgo' needed to be between 0 and -1 but was 0
    Parameter name: barsAgo
    at NinjaTrader.NinjaScript.Series`1.IsValidDataPoint( Int32 barsAgo)
    at NinjaTrader.NinjaScript.Indicators.aAaTestsinewave .OnBarUpdate()
    This is the error in the output window without try/catch.
    Error on calling 'OnBarUpdate' method on bar 189: Object reference not set to an instance of an object.
    In the try/catch output, it says there is an out of range exception 'barsAgo'. In my code I'm calling another indicator and checking that there is a ValidDataPoint(0) and it's the current bar (0) I'm after. The error says it needs between 0 and -1, well I have 0. So I'm a bit lost on this one.

    I've been trying to sort this for a day now and am just wondering if a NT guru can shed some light on this? It's most likely something I need to update or change for V12 but as I'm a bit lost with it, knowing if it's the V12 or me would be helpful.
    I've looked through the release notes but can't see anything that I could relate to my problem. http://ninjatrader.com/support/helpG...ease_notes.htm

    Thanks in advance.
    Last edited by fling_wing; 07-16-2016, 04:15 AM.

    #2
    Hello fling_wing, and thank you for your report.

    Would it be possible to provide us with a stripped down code sample, in which you call built-in indicators as your sub-indicators, in which this behavior is reproduced on your end? This will enable us to have a complete picture of what is occurring.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica,
      Will do. Have to build something and then email you. What's the support number you would like me to add in the email?

      Comment


        #4
        Thank you, I appreciate it. Please include this number in the body of your e-mail to [email protected] : 1544893
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Email sent with indicator attached.

          Comment


            #6
            Hello fling_wing, and thank you for providing that code sample.

            After careful review, it appears the vendor of the third party indicator you are using will need to update their code, so that its sub-class does not have any initialization done outside of their indicator's OnStateChange method where State == State.Configure . I recommend they pass an instance of their indicator (retrieved with "this") down to their sub-classed indicator.

            If this advice is off base, please let them know they can contact us directly at platformsupport[at]ninjatrader[dot]com , referencing this unique ID number in the body of their e-mail :

            1537455

            Please let us know if there are any other ways we can help.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Thanks, Jessica. I'll pass this information on to the vendor.

              Out of interest. What changed within Beta 12 to make this error show up when it was all fine in Beta 11?

              Comment


                #8
                While I can not be positive without extensive testing of the third party indicator, these fixes from the release notes page for beta 12 could possibly have had an effect.

                • Strategy Wizard did not utilize secondary series for input correctly. Note: This fixed resulted in change which preventing "Plot on chart" from working correctly, which is schedule to be fixed in the next beta release (# 10090)
                • Multi-series indicator was running into deadlocks
                • Tick Replay sometimes caused SynchronizationLockException when loading indicator
                • Exception in multi-series Playback

                Generally speaking, this seems related to the way Series objects are being initialized in other objects (e.g. strategies, indicators) created by strategies.
                Jessica P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by swcooke, Today, 12:33 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by NinjaCustomer, Today, 12:10 PM
                2 responses
                8 views
                0 likes
                Last Post NinjaCustomer  
                Started by KINGKODA, Today, 11:48 AM
                0 responses
                3 views
                0 likes
                Last Post KINGKODA  
                Started by mlarocco, Today, 10:52 AM
                6 responses
                17 views
                0 likes
                Last Post mlarocco  
                Started by Eros Lima, Today, 09:45 AM
                2 responses
                7 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Working...
                X