Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

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

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

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

    Hello Support,

    I created a strategy using New>StrategyBuilder to provide code to add an indicator I wrote. The strategy created only adds the indicators to the chart for the strategy.

    When I execute the strategy in StrategyAnalyzer the NT log shows the above error. However the Chart shows the indicators added correctly.

    Can you please let me know what could cause this error and why it only happens when the indicator is used with statement AddChartIndicator()

    Thank you.

    #2
    Hello rayko, thanks for your post.

    This must have something to do with how the indicator is initialized. Can you share the indicator so I can test? You may Export it, then send it to me at platformsupport at ninjatrader.com, referencing "Attn ChrisL 2257674" or post it here.

    I look forward to hearing from you.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello ChrisL,

      I have sent you an export package to platformsupport at ninjatrader.com.

      Please let me know your thoughts.

      Thankyou

      Comment


        #4
        Hi rayko, thanks for sending that in.

        I could not find what was wrong with the AuTrendMosaicEntry specifically. I did find that the indicator is using too many bar brushes from this error:

        NinjaScript AuTrendMosaic: Brush series exceeds the maximum number (65535) of unique brushes. Please adjust code to use fewer brushes.

        This could very well be the cause of the problem. The indicator will need to be boiled down to its core features or use OnRender instead of adjusting the bar brushes.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi,
          I just got the same error. I just did start my NT workspace and the message occured several times. It is coming up while NT is reloading historical data in the MarketAnalyzer. There is a Column which is calculating the SMA in order to record data as historical data.
          What could cause the issue?
          Thanks,
          Klaus

          Comment


            #6
            Hi Klaus, thanks for your post.

            What error message did you get? Was it the maximum bar brush error? If the Market Analyzer script is creating brushes and running on many rows this would be the source of the problem.

            Best regards,
            -ChrisL
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Hi Chris,
              I have no brushes in the market analyzer script. It is just plain NT logic and scripts. I have a screenshot attached. Got the "Unhandled exception: Exception has been thrown by the target of an invocation" Message right after startup of my workspaces.
              Thanks,
              Klaus
              Attached Files

              Comment


                #8
                Hi Klaus, thanks for your reply.

                This could be an issue with your Windows installation. Use CCleaner to clean the windows registry first. If this does not help, you will need to do a complete reinstall of NinjaTrader and test in a new workspace.

                Below are directions for a complete reinstall:
                • Close all running applications.
                • Navigate to your Documents folder > Right click on the 'NinjaTrader 8' folder > Rename > rename the folder to 'NinjaTrader 8 OLD'. DO NOT delete this folder.
                • Uninstall NinjaTrader within Windows Control Panel.
                • Navigate to C:\ > Program File (x86) > Delete the 'NinjaTrader 8' folder if it exists
                • Reboot your PC.
                • Once these steps are completed, download and install NT8 from the link below.
                Chris L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Jon17, Today, 04:33 PM
                0 responses
                1 view
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                4 views
                0 likes
                Last Post Javierw.ok  
                Started by timmbbo, Today, 08:59 AM
                2 responses
                10 views
                0 likes
                Last Post bltdavid  
                Started by alifarahani, Today, 09:40 AM
                6 responses
                40 views
                0 likes
                Last Post alifarahani  
                Started by Waxavi, Today, 02:10 AM
                1 response
                19 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Working...
                X