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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      47 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X