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 junkone, 04-21-2024, 07:17 AM
      9 responses
      67 views
      0 likes
      Last Post jeronymite  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      18 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Today, 09:46 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by wzgy0920, Today, 09:53 PM
      0 responses
      10 views
      0 likes
      Last Post wzgy0920  
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X