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 TraderG23, 12-08-2023, 07:56 AM
        9 responses
        382 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Yesterday, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X