Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    Comment


      #3
      THANK YOU!

      That's exactly what I needed.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by agclub, 04-21-2024, 08:57 PM
      5 responses
      32 views
      0 likes
      Last Post agclub
      by agclub
       
      Started by ESHunter, Today, 08:06 PM
      2 responses
      16 views
      0 likes
      Last Post ESHunter  
      Started by ETFVoyageur, 05-07-2024, 07:05 PM
      19 responses
      150 views
      0 likes
      Last Post ETFVoyageur  
      Started by ETFVoyageur, Yesterday, 10:13 PM
      3 responses
      26 views
      0 likes
      Last Post ETFVoyageur  
      Started by ETFVoyageur, Yesterday, 12:52 AM
      3 responses
      33 views
      0 likes
      Last Post ETFVoyageur  
      Working...
      X