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 Radano, 06-10-2021, 01:40 AM
        19 responses
        605 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        4 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by aa731, Today, 02:54 AM
        0 responses
        5 views
        0 likes
        Last Post aa731
        by aa731
         
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        11 views
        0 likes
        Last Post Christopher_R  
        Working...
        X