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

Closing Workspace at market close

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

    Closing Workspace at market close

    Hi,
    Is it possible to close the workspace at market close without having the confirmation of "save workspace"

    this is what I'm using
    Gui.Tools.WorkspaceOptions.CloseWorkspace("name", false, false, false);

    please let me know

    #2
    Hello PWillard,

    I am not aware of any way to close the workspace without having the dialog to save. You could potentially handle that using an addon however I don't have a specific example I could provide. You could see the following post for an explanation of how you may close a dialog.

    https://ninjatrader.com/support/foru...rs#post1052911


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      hey Jesse,
      I tried your sample code but Core.Globals.AllWindows doesn't contain the MessageBox windows when trying to close workspace individually.
      I can see the window for saving workspace while trying to close NT8 but any way to detect the "close workspace"

      Code:
                      foreach (var eachWindow in Core.Globals.AllWindows) {
                          eachWindow.Dispatcher.InvokeAsync(() => {
                              Printer("Title: " + eachWindow.Title);
                          });
                      }

      Comment


        #4
        Hello PWillard,

        In that case I am not aware of any way you could automate the individual workspaces. There is currently not a supported api for controlling the workspaces or collecting events so I am not aware of any other means to detect the closing of the workspace.


        I Look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by RubenCazorla, Today, 09:07 AM
        2 responses
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by i019945nj, 12-14-2023, 06:41 AM
        7 responses
        82 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by timmbbo, 07-05-2023, 10:21 PM
        4 responses
        158 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by tkaboris, Today, 08:01 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Lumbeezl, 01-11-2022, 06:50 PM
        31 responses
        820 views
        1 like
        Last Post NinjaTrader_Adrian  
        Working...
        X