Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator that uses drawing objects disappears after any drawing object edited

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

    Indicator that uses drawing objects disappears after any drawing object edited

    I have developed a couple of indicators that draw vertical lines at semi-regular intervals. When the property window for any drawing object is opened and then the OK button is clicked, the indicator that draws the vertical lines disappears from the chart. It is still listed in the Indicators window and if I add another indicator or edit any other indicators it is redrawn. Closing NT and opening it again also results in the indicator being redrawn. It appears as though everything is working perfectly, other than the indicator not being redrawn after the editing of any drawing object.

    I'm using NT 8.0.23.2 64-bit and no errors are reported in the Log window.

    #2
    Hello henry_aclitus,

    I've tested this but was not able to reproduce.


    If you close all open workspaces, and in a new blank workspace test the steps in this video, do you experience different behavior?
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the excellent support Chelsea. Your example script worked perfectly, which tells me it is something I've done and not a bug in NT. Do you know what happens after a user clicks on the OK button when editing a drawing objects properties? Are indicators that are plotted on the price panel removed and then redrawn? If they are redrawn then do you know how NT goes about that? Might help me narrow down where my bug is. I don't use the NT Line class, so it migh be in there. My indicator is more involved as well.

      Comment


        #4
        Hello henry_aclitus,

        Yes, when the DrawObjects window is closed the scripts are reloaded (terminated, and cloned new instances) to reflect any changes made in the DrawObjects window.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks Chelsea. The problem is with my with my custom VerticalLine, call it CustomVerticalLine. CustomVerticalLine renders text alongside each vertical line. The line stroke, brush and solid color brushes that I'm using are all null. Looks like I need to override the cloning method or something along those lines. About to look at it now thank again.

          Comment


            #6
            I overrode void CopyTo(NinjaScript ninjascript) updating the private class fields and it is working perfectly now. Thanks again.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X