Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The right way to share data between drawing tool and indicator.

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

    The right way to share data between drawing tool and indicator.

    I want to mark up the chart with my custom drawing tool and then have my custom indicator do things with the stuff that I've drawn on the chart.

    Solution #1 - use files

    I can have the drawing tools write data to the disk and have the indicator load the data.

    But then I'll have to deal with knowing when updates have happened.

    Solution #2 - static variables?

    Haven't tried this but it seems that I can have my custom drawing tool have a static variable with a list of all the things it's drawn then access this from the indicator by including the namespace from the drawing tool.

    For this I would have to make sure that both the drawing tool and the chart are installed.

    Solution # 3 - maybe there's a way to get a list of all the objects drawn in the chart?

    Is there a right way to do this?

    #2
    Hello ntdev,

    Welecome to the NInjaTrader support forum.

    The #3 would be the correct way, We have an example of working with the drawing objects in the following page: https://ninjatrader.com/support/help...ub=drawobjects

    Depending on what data is needed you would either gather the default property values from the object or cast to the correct type and get its custom properties.

    I look forward to being of further assistance.

    Comment


      #3
      THANK YOU!

      That's exactly what I needed.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      663 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      376 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X