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

Had this error in the past

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

    Had this error in the past

    If I increase the number of Days back in the data series using the U.I.
    I get this error randomly.

    2017-07-13 10:38:46:076|3|16|Indicator 'TrpScrnVollbl': Error on calling 'SetState' method: Object reference not set to an instance of an object.
    of course the indicator does not run.

    So I then Reload NinjaScript and everything is then fine with the new Days back setting.

    Ver 8.0.7

    #2
    Hello JerryWar,

    Thank you for your post.

    In the TrpScrnVollbl indicator are you add any additional data series in the Configure state?

    Do you try to use any dynamic BarsPeriod items such as BarsPeriodType or Value in the AddDataSeries()?

    Do you set the barsToLoad overload for the AddDataSeries() call?

    I look forward to your response.

    Comment


      #3
      1) Yes
      2) BarsPeriodType.Volume
      3) No

      One thing I should add is, Previously I do not believe the error message indicated which indicator was generating the error.

      Comment


        #4
        Am I better off just using AddDataSeries( int period). I assume it will default to the Root data series
        BarsPeriod Type.

        Comment


          #5
          I changed the addDataSeries from

          AddDataSeries(BarsPeriodType.Volume, 343 )
          to:
          AddDataSeries(new BarsPeriod { BarsPeriodType = BarsPeriodType.Volume, Value = 343 });

          I have gone back n forth on several charts that use it modifying the DaysBack and it seems like it is not generating the error anymore although I will have to wait to see. It is sometimes very random.

          Comment


            #6
            Hello JerryWar,

            Thank you for your patience.

            May I test the indicator on my end?
            You can send the indicator to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

            You can export your indicator by going to Tools > Export > NinjaScript Add On > Add > select your indicator > OK > Export > name the file 'NTsupport' > Save.

            The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.

            I look forward to your response.

            Comment


              #7
              Sorry, I can't do that.

              Comment


                #8
                Patrick
                I had several crashes during the past week ( Not bad from my view). They were all from changing theDaysBack setting in the DataSeries U.I. So while I am trading I don't monkey around with the setting. However, One thing stuck out, They all occurred when reducing the daysBack. On the last one I went to my taskschedular to kill Ninja and I noticed that the Memory was just under 1 gig just about double what it is normally. I am wondering if there is something in changing that U.I setting that could cause a memory leakage. I would think when I reduced the DaysBack it should be recovering unused memory that was needed with Longer lookback.
                Just a thought.

                Comment


                  #9
                  Hello JerryWar,

                  Thank you for your feedback.

                  Based on solely an option like the Days To Load or Bars To Load in the Data Series menu, then yes, generally speaking this should not increase memory. However, changing this in code or if your NinjaScript files now need to re-calculate there is no guarantee .NET will release the memory right way. In fact the garbage collector can generally only be guaranteed to run when shutting down the application.

                  Please let me know if you have any questions.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Working...
                  X