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

"Failed to submit orders ... Object reference not set to an instance of an object

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

    "Failed to submit orders ... Object reference not set to an instance of an object

    I've been running a recent strategy and continually get "Cancel Pending" wedged up within the orders. Nothing fixes unless i shut down and rename the DB to start again.

    Does the following snippet from logs entries provide you with any obvious direction you could share?


    2021-05-07 13:54:17:357|1|32|Order='8725510a8f4f4bccb33ebd1dc b547f8d/Sim101' Name='P_LFIB3 9' New state='Filled' Instrument='NNOX' Action='Buy' Limit price=29.12 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='' Filled=1 Fill price=29.12 Error='No error' Native error=''
    2021-05-07 13:54:17:371|1|8|Execution='5b73003037274dca9c25d5 a8410e0309' Instrument='NNOX' Account='Sim101' Exchange=Default Price=29.12 Quantity=1 Market position=Long Operation=Operation_Add Order='8725510a8f4f4bccb33ebd1dcb547f8d' Time='5/7/2021 1:54 PM'
    2021-05-07 13:54:17:409|1|64|Instrument='NNOX' Account='Sim101' Average price=29.12 Quantity=1 Market position=Long Operation=Operation_Add
    2021-05-07 13:57:56:736|1|16|NinjaScript strategy 'COREtest8u/231853274' submitting order
    2021-05-07 13:57:56:736|3|32|Failed to submit orders: System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Cbi.Account.UpdateAccountItems(DateTim e now, Boolean force)
    at NinjaTrader.Cbi.Account.Submit(IEnumerable`1 orders)
    2021-05-07 14:07:38:267|1|16|NinjaScript strategy 'COREtest8u/231853274' submitting order
    2021-05-07 14:07:38:268|3|32|Failed to submit orders: System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Cbi.Account.UpdateAccountItems(DateTim e now, Boolean force)
    at NinjaTrader.Cbi.Account.Submit(IEnumerable`1 orders)
    2021-05-07 14:13:40:755|1|16|NinjaScript strategy 'COREtest8u/231853274' submitting order
    2021-05-07 14:13:40:756|3|32|Failed to submit orders: System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Cbi.Account.UpdateAccountItems(DateTim e now, Boolean force)
    at NinjaTrader.Cbi.Account.Submit(IEnumerable`1 orders)
    2021-05-07 14:15:37:537|1|16|NinjaScript strategy 'COREtest8u/231853274' submitting order
    2021-05-07 14:15:37:538|3|32|Failed to submit orders: System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Cbi.Account.UpdateAccountItems(DateTim e now, Boolean force)
    at NinjaTrader.Cbi.Account.Submit(IEnumerable`1 orders)

    Thanks

    #2
    Hello larkmail,

    Thank you for your post.

    What version of the platform are you running? This may be found under Help > About.

    We'd need a little more information to determine what may be occurring. If you can supply a reduced version of your strategy that reproduces the issue, that would be very helpful. Does this only occur when running the strategy in Simulation on real time data, or is it occurring in a live account? Does the same happen when running the strategy over Market Replay data in the Playback connection?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Version 8.0.21.1 64-bit

      Where do i send the strategy?
      I'm, currently, only using Ameritrade for data and the "as default" Sim101 account for testing. I've not attempted Market Reply or Playback but can/have run several backtests via the Strategy Analyzer that look to render fine.
      The error, obviously only occurs when letting the strategy run in real-time within the "Strategies" tab.

      Comment


        #4
        Hello larkmail,

        Thank you for your reply.

        You can either post it here if you're comfortable with sharing on the forum. If you're uncomfortable with posting that publicly, you can send it to scriptingsupport [at] ninjatrader [dot] com with 3092437 ATTN Kate W. in the subject line and a link to this post in the body of the email.

        That being said, I do note you're running a critically outdated version of the platform, so the first thing to do would be to update and then test to see if the issue persists.

        To update NinjaTrader, please follow the steps below:
        • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
        • Click on the link: https://ninjatrader.com/PlatformDirect
        • Enter your license key and press Submit
        • Select 'Download'
        • Critical: Before running the installer, ensure NinjaTrader is closed.
        Once you've updated, please test the strategy in question.

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        1 view
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        216 views
        1 like
        Last Post PaulMohn  
        Working...
        X