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 helpwanted, Today, 03:06 AM
        1 response
        14 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X