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 mattbsea, Today, 05:44 PM
        0 responses
        4 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        31 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,282 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        20 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Working...
        X