Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unhandled Exception in Strategy Analyzer due to Indicator Drawing Objects

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

    Unhandled Exception in Strategy Analyzer due to Indicator Drawing Objects

    Hello,

    I'm creating a custom Indicator (let's call it "Compute Indicator") that is calling other custom Indicators (let's call these "Base Indicators") that are using inside Drawing Objects (eg. Draw.Text, Draw.VerticalLine, Draw.Region, etc) to display various information.

    Everything seems to be working properly when both the "Compute Indicator" and "Base Indicators" are added to a Chart but when I'm trying to use both (or even ONLY the "Compute Indicator") in a custom Strategy using the AddChartIndicator function I'm getting an error in the Strategy Analyzer saying: "Unhandled exception: Exception has been thrown by the target of an invocation." (see picture below)

    Click image for larger version  Name:	StrategyDrawObjectUnhandledException.png Views:	23 Size:	706.9 KB ID:	1183507

    This issue seems to be reproducible only when you have the construct: Strategy --> AddChartIndicator("Compute Indicator") --> "Compute Indicator" calls "Base Indicator"

    To simplify things, please find attached a reproducer that creates a very simple "TestStrategy" adding just one generic "TestComputeIndicator" that is calling a "TestBaseIndicator" that uses Draw.Text to display the CurrentBar every 10 bars (Line 73 in TestBaseIndicator code). If I comment out that line, then everything works properly (but of course we don't see the CurrentBar text that supposedly we would like to see).

    StrategyDrawObjectUnhandledException.zip

    Could you please help solve this issue?

    Thanks
    Last edited by cotigac978; 12-30-2021, 09:13 AM.

    #2
    Hi cotigac978, thanks for writing in.

    I am looking further into the issue and will reply here once I have more information.

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi, thanks for your patience.

      I reported the issue to our development team and it will be fixed in the next release. The tracking ID is:
      NTEIGHT-15111

      The ID will show up in the release notes when the new revision is released:


      Best regards,
      -ChrisL
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Thank you very much Chris!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by techgetgame, Yesterday, 11:42 PM
        0 responses
        8 views
        0 likes
        Last Post techgetgame  
        Started by sephichapdson, Yesterday, 11:36 PM
        0 responses
        2 views
        0 likes
        Last Post sephichapdson  
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,615 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Yesterday, 05:56 PM
        0 responses
        10 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        20 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Working...
        X