Announcement

Collapse
No announcement yet.

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.

    Comment


      #3
      Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      71 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X