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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X