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

Unhandled Exception

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

    Unhandled Exception

    I just made a strategy and named it "Aa" while another was already named "AA". Everything finished but when I tried to open the Script Analyzer, I got this message

    "Unhandled exception: An item with the same key has already been added".

    I click okay and open Builder again and cannot find the strategy in the list. So I open Analyzer again and it opens but if I try to run a backtest on any strategy at all I just get this Error

    "Unhandled exception: Object referenced not set to an instance of an object."

    Where do I go to erase this error (but save the strategy) so the platform works again?
    Last edited by smcllr; 10-02-2020, 10:59 AM.

    #2
    Hello smcllr,

    Thank you for your post.

    What I would recommend is to go to your Documents > NinjaTrader 8 > bin > Custom > strategies folder and check to see if you have two files, one named Aa.cs and one named AA.cs.

    If you do have both, temporarily drag the AA.cs file from this folder to your desktop for safekeeping, then open a NinjaScript Editor window from New > NinjaScript Editor, right click and select Compile. Once that's done, open a new Strategy Builder window and see if you can select the strategy name from the list. Then, click next, and change the strategy name to something other than Aa, then click the Compile button.

    Once complete, drag the original AA.cs back into the Documents > NinjaTrader 8 > bin > Custom > strategies folder, then click the compile button in the Strategy Builder again to compile all scripts, then test to ensure you can see both strategies.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,986 views
      0 likes
      Last Post rene69851  
      Started by Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      8 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,792 views
      0 likes
      Last Post aligator  
      Working...
      X