Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to use NinjaScript to edit drawing objects on ALL charts at the same time?

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

    How to use NinjaScript to edit drawing objects on ALL charts at the same time?

    Hello,

    I have written an indicator that puts a button on the current window's main toolbar. The button hides all chart objects, but I need it to do this for ALL charts. Currently, regardless of which tab is visible, it only does it for the chart that contains the indicator.

    Is there a way to apply changes to drawing objects to ALL charts at the same time?

    Here's the code:

    Code:
    foreach (DrawingTool draw in DrawObjects) //DrawingTool
                    {
                        if (draw.IsUserDrawn)
                        {
                            draw.IsVisible = false;
                            ChartControl.InvalidateVisual();
                            ForceRefresh();
                        }
                    }
    Thanks,

    Adam
    Last edited by armybender; 07-18-2016, 08:12 PM. Reason: Changed icon

    #2
    Hello armybender,

    Thank you for writing in and welcome to the NinjaTrader Support Forum!

    I'm looking into this further and will return with my findings.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Zachary,

      Thank you, I look forward to your response.

      Adam

      Comment


        #4
        Hello armybender,

        Thank you for your patience on this matter.

        Please take a look at the attached indicator for one solution to changing visibility of drawn objects on multiple chart tabs.

        Please, let us know if we may be of further assistance.
        Attached Files
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,406 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        98 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        160 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        9 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X