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 jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,290 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        9 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        62 views
        0 likes
        Last Post halgo_boulder  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        8 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        25 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X