Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Objects in a strategy do not go away when strategy is removed

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

    Draw Objects in a strategy do not go away when strategy is removed

    I have a strategy that draws a V line where a trade is entered. Once drawn, that V line stays forever, or at least until the Data Series is updated. If the strategy is removed, they remain, if the chart is F5-ed, they remain. The only time they are removed is if I change the Data Series Period.

    Is this a possible oversight? It is quite annoying.

    #2
    Hi Snaphook,

    Drawing objects associated with a strategy should normally be removed when the strategy is removed / disabled. This is what I'm seeing happen here. Attached is the script I'm using to check this on my side. If you can share the script you're using, I'm happy to take a look.
    Attached Files
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I found the problem. It was in Dispose() from Toolbar Buttons. Adding RemoveDrawObjects(); to that section resolved the issue.

      Thanks

      Comment


        #4
        Glad to hear. Thanks for the follow- up, snaphook.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        565 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X