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 Jonker, Today, 01:19 PM
        0 responses
        1 view
        0 likes
        Last Post Jonker
        by Jonker
         
        Started by futtrader, Today, 01:16 PM
        0 responses
        5 views
        0 likes
        Last Post futtrader  
        Started by Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,791 views
        0 likes
        Last Post aligator  
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        844 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,294 views
        1 like
        Last Post jgualdronc  
        Working...
        X