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

Error popup message box when trying to backtest

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

    Error popup message box when trying to backtest

    When I run a backtest I immediately a pop-up message box with

    "Error on running backtest: Object reference not set to an instance of an object."

    Usually, when I get an error in backtesting it doesn't show a message box, it just outputs the error to the Log tab in Control Center, and it will usually say where it happened, like on OnBarUpdate() or something.

    But this is happening immediately when I run the backtest and there's no indication where in the code this is happening. There seems to be a deeper problem. I put try/catch statements all around code and none of them are firing.

    If I have an object set to null that I try to use, the error is just displayed in the Log, not a message box popup. I think it's something outside of my strategy code.

    Has anybody else experienced this?

    I am running with NT 7.0.1.30

    I have restarted NT and reboot my machine and I still get the same result.

    See attached screenshots.
    Attached Files

    #2
    Hello shodson,

    This error indicates you are using a null value.

    Something is not set and is being checked in a condition or is having its value used in some way.

    This error will disable your script.

    This error only appears when running this script, correct?
    If you backtest the SampleMACrossOver does the error appear?

    Is the script a script written by you or one that you have imported?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    6 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X