Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled Exception Error

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

    Unhandled Exception Error

    Hello, I just recently had a programmer create a 3rd party indicator for me. In the settings, this indicator has a text box field, where I can enter text that will show up on the chart.

    While I was testing the indicator, I made the mistake of using some special characters in the text box. Since then, I keep getting the following error whenever I scale-in with additional contracts, and sometimes also when I exit a trade.

    The error message that I keep getting now is:

    Unhandled exception: Exception has been thrown by the target of an invocation

    Screenshot attached.

    Please advise.

    i2w8am9ii2

    #2
    Hello i2w8am9ii2,

    Without more detail on how that string is used within the custom script it would be difficult to say why that may be coming up during trades. As a first step I would suggest to remove and re apply the script and ensure you use a valid string entered. If that does not help and you had previously saved a template as Default you may need to set a new default template with the updated string. This would otherwise be a situation where you want to contact that developer if the script you had created is now causing an error based on a specific use.

    Comment


      #3
      Hello Jesse, Thanks for the info. I will check with the programmer.

      i2w8am9ii2

      Comment


        #4
        Hello Jesse, I just tested removing the 3rd party indicator that I had a programmer create for me, and entered a trade then scaled-in with additional contracts, and I got the Unhandled Exception error. So it appears that it is not the 3rd party indicator that is causing the error message.

        I tested removing my simulated accounts that gave this error message, and at times that did help. But my SIM101 account always gives me an error message no matter what now.

        I am running NinjaTrader v 8.0.25.0

        I am using a Windows PC 64 bit OS

        Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz 3.70 GHz

        RAM: 128 GB

        Please advise.

        i2w8am9ii2

        Comment


          #5
          Hello i2w8am9ii2,

          If the problem no longer relates to the third party item I would suggest trying close all workspaces to try and make sure nothing else is running. If you are getting an error based on an order that may be due to something running.

          Another alternative would be to use a clean user folder to check if there are any errors. You can use the steps below to test that. If you find there are no errors you could use that clean folder to re import the items you wanted to use.
          1. Go to Help > License Key and copy and paste your License Key into a text document
          2. Exit the platform
          3. Go to (My) Documents > rename the 'NinjaTrader 8' folder to 'NinjaTrader 8.Prev'.
          4. Then re-install from the following link: https://ninjatrader.com/GetStarted
          You can switch back to the old installation by exiting the platform and then renaming NinjaTrader 8 to NinjaTrader 8.Clean, then rename NinjaTrader 8.Prev to NinjaTrader 8. The platform looks for the NinjaTrader 8 folder.

          Comment


            #6
            Thanks Jesse,

            I will try that later on when I have time.

            Question: When doing so, will I need to reinstall all the existing indicators on the charts in my workspace?

            i2w8am9ii2

            Comment


              #7
              Hello i2w8am9ii2,

              That depends on which you find works. If you see that closing the workspaces helps then you would need to use the process of elimination to open each workspace and test for the error. Then test indicators or other items applied to the workspace to better understand what relates. If you find that closing the workspaces does not help then testing a clean user folder would be next. That should not have any errors and you would need to import the items/workspaces etc again to test if the error starts happening again.

              Comment


                #8
                Hello Jesse,

                Thanks for the info.

                Question: When I go into NT8 and try to remove the 3rd party indicator that the problem initiated with, I do not see it when I go to, Tools > Remove NinjaScript Assembly...

                Could the issue possibly be resolved if I delete the .cs file in the following location:

                C:\Users\MyUserName\Documents\NinjaTrader 8\bin\Custom\Indicators

                i2w8am9ii2

                Comment


                  #9
                  Hello i2w8am9ii2,

                  Yes you can use the NinjaScript editor to remove the file in that situation. Third party items can be in the Remove NinjaScript assembly menu if they are a compiled assembly, for source code those items will appear in the NinjaScript editor.

                  Comment


                    #10
                    Hello Jesse,

                    Thanks for the info.

                    I was able to resolve the problem with the programmer.

                    i2w8am9ii2

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    606 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    353 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    560 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    561 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X