• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 jleira, Today, 10:26 PM
        0 responses
        4 views
        0 likes
        Last Post jleira
        by jleira
         
        Started by wuileng, Today, 10:14 PM
        0 responses
        6 views
        0 likes
        Last Post wuileng
        by wuileng
         
        Started by mntemel, Today, 09:07 PM
        1 response
        10 views
        0 likes
        Last Post MojoJojo  
        Started by martyn73, Today, 08:22 PM
        0 responses
        10 views
        0 likes
        Last Post martyn73  
        Started by RobertoPaez, Today, 08:13 PM
        0 responses
        5 views
        0 likes
        Last Post RobertoPaez  
        Working...
        X