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 rbeckmann05, Yesterday, 06:48 PM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        10 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        15 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Working...
        X