Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to make window workspace specific

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

    How to make window workspace specific

    I have an ind that creates an external NTWindow like in the SetIndicatorValueFromAddonWindowExample on the forum. The window works great, but it is not workspace specific. So when I switch workspaces, the window is still present vs being hidden with other workspace windows.

    What needs to change to make the window workspace specific?

    I don't want the window to be persisted, just be workspace specific.

    #2
    Hi aslane, thanks for your post.

    The addon needs to inherit IWorkspacePersistence and implement the overrides. I attached my test script here for reference.

    Best regards,
    -ChrisL
    Attached Files
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      That makes the window workspace aware. However, the window is save/restored with the workspace, which is a problem even in the sample, as the window is restored, but not connected to the ind.

      I would like for the window to not be saved. I tried commenting out the contents of Save/Restore, but that did not matter.

      Any ideas?

      Comment


        #4
        Hi aslane, thanks for your reply.

        My apologies, I did not see that the entire window spawn behavior relies on the button being clicked. The window would need to be launched from the button to create the proper context on each launch (because it assigns the indicator instance in the Click event).

        Best regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        192 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,234 views
        0 likes
        Last Post xiinteractive  
        Working...
        X