Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Object reference not set to an instance of an object

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

  • NinjaTrader_JessicaP
    replied
    No 8.0.5.2 is the most recent release of NinjaTrader. I was able to use a more recent version than this to test on.

    Leave a comment:


  • dp2002
    replied
    Thanks Jessica,

    I am running 8.0.5.2 which I believe is the latest release. Is this still considered a pre-release?

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Following your steps, as well as testing with a large number of copies of your strategy with both many and no drawing objects, I was unable to see the same thing you were seeing in a pre-release copy of NinjaTrader. Please let us know if this continues into the next release so we may investigate further.

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Thank you for your report. I am testing this on my end and will return when I have more information.

    Leave a comment:


  • ic41213
    replied
    I had the same, but haven't been able to reproduce this reliably either.

    I know this isn't very helpful, but it happened somehow related to adding, editing, starting, stopping, removing multiple strategies from Strategies tab or charts.

    Leave a comment:


  • dp2002
    started a topic Object reference not set to an instance of an object

    Object reference not set to an instance of an object

    Edit on 3/29/2017: I corrected the screenshot referenced on step 5.

    The log file is reporting an error when I try to reload ninjascripts using F5. I am running two independent strategies at the same time. Both strategies use AddChartIndicator to display stochastic and MACD indicators. When reloading the scripts, on occasion, the log reports the following error for the stochastic indicator:

    Indicator 'Stochastic': Error on calling 'SetState' method: Object reference not set to an instance of an object.

    The log also reports a similar error for the MACD indicator.

    I created a simplified script to demonstrate the error (actually leveraging a test script from a previous post - see attached). The error is sporadic and may occur on the third reload attempt or it may occur on the 50th. The number of attempts required is inconsistent.

    I am running: version 8.0.5.2 64-bit of the Ninjatrader platform.

    To reproduce the problem, I performed the following steps. I have also attached the screenshots associated with most of the steps.
    1. I opened a 300 tick window for the 6E 06-17 with a specific end date (see Data Series window screenshot).
    2. I added the 'DetectDrawingObject' script twice to simulate the two independent scripts I am normally running. I kept the default input values for the first and changed the stochastic values for the second (see "Strategy Window-prior to error" screenshot).
    3. After enabling both strategies, I checked the Indicator window which correctly showed the indicators added by the strategy (refer to the "Indicator Window - prior to the error" screenshot).
    4. On the third attempt at reloading the indicator, the log reported the errors described above (refer to the screenshot of the log).
    5. After the error, the Indicator window displays two new entries for the Stochastic and MACD indicators in addition to the ones previously added. The two new indicators do not appear to be associated with the 300-tick bar (refer to "Indicator Window - after error" screenshot)
    6. I next removed the two strategies from the strategy window.
    7. The chart window still retained two panes for the MACD and Stochastic indicators, but the panes were blank(refer to "Chart Window - after removing strategies" screenshot).
    8. Returning to the Indicator window, the two new indicators that were added after the error still remained but the original Stochastic and MACD indicators were automatically removed. Attempting to manually remove the remaining indicators resulted in an error stating the indicators were added by a strategy.(refer to "Indicator Window - error attempting to remove the indicator" screenshot).


    I'm not sure what is causing the issue, but any help would be appreciated.
    Attached Files
    Last edited by dp2002; 03-29-2017, 09:50 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by UltraNIX, Today, 10:00 AM
1 response
3 views
0 likes
Last Post NinjaTrader_Jesse  
Started by stewarco, Today, 10:14 AM
0 responses
2 views
0 likes
Last Post stewarco  
Started by Newtrader101, Today, 06:36 AM
1 response
15 views
0 likes
Last Post NinjaTrader_Spencer  
Started by Rainmakersg, Today, 12:34 AM
3 responses
20 views
0 likes
Last Post NinjaTrader_Jim  
Started by guidoisot, Today, 03:09 AM
2 responses
21 views
0 likes
Last Post guidoisot  
Working...
X