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 Shansen, 08-30-2019, 10:18 PM
        24 responses
        938 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        3 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        2 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Working...
        X