Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled exception: Object reference not set to an instance of an object

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

    Unhandled exception: Object reference not set to an instance of an object

    I put another plot onto one of my indicators, it compiled, and then I started to get this error when I tried to load the indicator and others which have not been altered. A couple of the indicators, which I did not alter, are already on a chart, but they are also showing this behaviour when I try to load onto another chart. I removed the indicator that I had updated, but when I try to load others, which have previously loaded ok, I still get the error message. I note from another thread that this was identified in Beta testing, but it was dealt with by emails. Is there a fix?

    Thank you.

    #2
    Hello GeorgeW,

    Thank you for your post.

    There should be a "fix" once we identify the cause. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

    Comment


      #3
      Hello PatrickH,

      I have forwarded the log and trace files.

      Thank you.

      Comment


        #4
        I just got this error. Was there a resolution of this issue?

        Comment


          #5
          Hello Nepenthean,

          NT advised that the issue was: "The errors would indicate that there's something missing in the code that has no value when plotted."

          I was able to isolate it as follows: I have found what the issue is. It is in the code to reduce the DisplayName on the chart. If I use the 2nd "get" part of the code, commented out below, it works. If I use the 1st one it doesn't. The problem seems to be in the "BarsPeriod.Value" and BarsPeriodType.Tick, which are not one of the parameters available for use in the DisplayName drop down list at the top of the editor. How do I include these in the code?

          Code:
          public override string DisplayName
          
                  {           
                          get {return Name + " " + instrumentName + " " + BarsPeriod.Value + " " + BarsPeriodType.Tick + " " + "(" + Period + ", " + minLookBackPeriod + " )";}
          //            get {return Name + " " + "(" + Period + ", " + minLookBackPeriod + " )";}
                  }
          NT advised the following: To modify the Display Name to include the bars period and bar type you could use BarsPeriod in place of BarsPeriod.Value and BarsPeriodType.Tick, in your code. This would produce an output of for example “5 minute” when applied to a 5 minute chart.

          I modified your code,

          Code:
            get {return Name + " " + instrumentName + " " + BarsPeriod.Value + " " + BarsPeriodType.Tick + " " + "(" + Period + ", " + minLookBackPeriod + " )";}
          
          To,
          
          get {return Name + " " + Instrument.MasterInstrument.Name + " " + BarsPeriod + "(" + Period + ", " + MaximumBarsLookBack + " )";}
          Please see our reference example;

          http://ninjatrader.com/support/forum...ead.php?t=4749

          Hope the above helps.

          Comment


            #6
            GeorgeW
            Do you have multiple data Streams in your indicator. I have been able to force a similar error when using an indicator that accesses multiple data streams and then adding and removing a similar data stream from my chart. Hopefully this info might put someone onto what is going on.

            J~

            Comment


              #7
              JerryWar,
              My indicator only had one data series in it. I pinned my issue down to the DisplayName override not being properly formatted. Thanks!

              Comment


                #8
                Originally posted by JerryWar View Post
                GeorgeW
                Do you have multiple data Streams in your indicator. I have been able to force a similar error when using an indicator that accesses multiple data streams and then adding and removing a similar data stream from my chart. Hopefully this info might put someone onto what is going on.

                J~
                Hello JerryWar,

                Are you already working with us on this matter? If not, can you send us a note at platformsupport[at]ninjatrader[dot]com with details on how you re-create this error?

                Comment


                  #9
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello JerryWar,

                  Are you already working with us on this matter? If not, can you send us a note at platformsupport[at]ninjatrader[dot]com with details on how you re-create this error?
                  Hello,

                  Were you able to resolve JerryWar's problem with using multi-data series and getting the same error on an indicator? I am getting the same error when I add a 15M data series to an indicator.in NT8.

                  Comment


                    #10
                    Hello GeorgeW,

                    Thank you for your response.

                    Each case may be different here. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

                    I look forward to assisting you further.

                    Comment


                      #11
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello GeorgeW,

                      Thank you for your response.

                      Each case may be different here. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

                      I look forward to assisting you further.
                      Thanks for your response, PatrickH.

                      First I will try rebuilding the NT8 version from the NT7 version, which works fine, and if I still have the problem I will get back to you.

                      Comment


                        #12
                        I have solved the issue I raised in post #9 and now have a working indicator.

                        The issue seems to have been that the tags for my ArrowUp and ArrowDown signals (which are based on several different periods) were the same "My Arrow", so when a bar which had both an ArrowUp and ArrowDown signal occurred, the indicator failed. The tags have now been changed to "My ArrowUp" and "My ArrowDown" respectively.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by DanielTynera, Today, 01:14 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post DanielTynera  
                        Started by yertle, 04-18-2024, 08:38 AM
                        9 responses
                        41 views
                        0 likes
                        Last Post yertle
                        by yertle
                         
                        Started by techgetgame, Yesterday, 11:42 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post techgetgame  
                        Started by sephichapdson, Yesterday, 11:36 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post sephichapdson  
                        Started by bortz, 11-06-2023, 08:04 AM
                        47 responses
                        1,615 views
                        0 likes
                        Last Post aligator  
                        Working...
                        X