Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Starting up NinjaTrader Desktop 8.1 without typing username and password every time

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

    #76
    I can kinda understand typing the password everytime, but not the inability to launch NT without an internet connection or when the login servers are down. That's why I won't update. QuantKey_Bruce has a good point here.

    Comment


      #77
      Originally posted by Leeroy_Jenkins View Post
      I can kinda understand typing the password everytime, but not the inability to launch NT without an internet connection or when the login servers are down. That's why I won't update. QuantKey_Bruce has a good point here.
      The password they are checking against is on THEIR server, so if the internet is down, or their server is down, that's the end of that. It is important for the trader to be able to check the box to say "remember me and keep me signed in" for this and many other reasons.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #78
        Yeah, that functionality has been here forever. I remember developing scripts in NT8 for 6 months without an internet connection.

        Comment


          #79
          Adding my 2c here. I dont allow 3rd party cookies and have browser addons and utilities that clear cookies and data when the browser is closed as well as when I start/reboot my laptop (which is everyday). On keying in the user id and password, NT displays a message that it doesnt recognize this device, and that I have 2 factor authentication turned on. So, I have to log back into my email account and authorize the same laptop EVERY single day!. I downgraded and went back to the older version. While a script may help a lot of user stay signed in and avoid the login issues. It wouldn't help people like me.Just sayin.. Terrible design decision by Ninja Trader. Ninja Trader must make this an optional feature for those users who need "extra security"..

          Comment


            #80

            I am sharing a working AutoHotKey v1.1.37.01​ script for automating the NinjaTrader login process.​
            Attached Files

            Comment


              #81
              FYI - simplest solution to this issue
              Create a shortcut on your desktop or taskbar and point it to your NinjaTrader.Exe file
              In the Target field type the following

              C:\Users\User\Downloads\NTLogin.exe "your password"

              Click image for larger version

Name:	autologin.png
Views:	452
Size:	25.5 KB
ID:	1318877
              Attached Files
              Last edited by Mindset; 09-21-2024, 02:30 AM.

              Comment


                #82
                This relies on a third-party download. Logging into NinjaTrader should be an inbuilt functionality. For them to provide us a "keep me logged in" checkbox should not be too much to ask - in fact, I can't believe it hasn't already been done.
                Bruce DeVault
                QuantKey Trading Vendor Services
                NinjaTrader Ecosystem Vendor - QuantKey

                Comment


                  #83
                  January Ninja eventually acknowledged this mis-step - ill-conceived, ill-considered, badly implemented followed by poor handling of customer concerns (incorrect information, muddled thinking, flawed arguments, incorrect statements, accompanied by failed rollout of log in servers etc) and stated that it would be fixed. TEN months ago and nothing. Just garbage.

                  I don’t want to use/maintain another program (AHK) for this (no disrespect).

                  I tried the first Login.exe and whilst it ‘worked’ had the click problems reported here (‘sometimes’ clicking another desktop icon launching that program & preventing pw pasting). Couldn’t figure what determined location of double-click, could probably have re-arranged desktop icons but (directed at Ninja) IT IS A TOTAL AND UNNECESSARY WASTE OF MY TIME. Still on 8.0…..

                  #ntbone - you haven’t included a .exe in your GitHub fork. I eventually managed to create one in VS but doesn’t work for me (built successfully no errors, runs terminal Window with no msg but doesn’t ’do’ anything - my bad no doubt, I’m that rare breed on here that isn’t a coder & has no interest, just wants a trading platform that works reliably and is user-friendly) - could you kindly add a compiled .exe I can try?

                  Thanks to all contributors.

                  #Ninjagarbage

                  Kind regards,

                  Comment


                    #84
                    Originally posted by QuantKey_Bruce View Post
                    This relies on a third-party download. Logging into NinjaTrader should be an inbuilt functionality. For them to provide us a "keep me logged in" checkbox should not be too much to ask - in fact, I can't believe it hasn't already been done.
                    Hi QuantKey_Bruce
                    No third party download required - it's a native windows shortcut.
                    On a side note I do NOT understand NinjaTrader's stubborn refusal to reinstate something that has been around for decades.
                    How can a computer in my home have a security issue with keeping my username and password?
                    Google,Facebook and Amazon don't seem to have an issue with this - I mean come on NT sort this out!!

                    Comment


                      #85
                      Originally posted by Mindset View Post

                      Hi QuantKey_Bruce
                      No third party download required - it's a native windows shortcut.
                      On a side note I do NOT understand NinjaTrader's stubborn refusal to reinstate something that has been around for decades.
                      How can a computer in my home have a security issue with keeping my username and password?
                      Google,Facebook and Amazon don't seem to have an issue with this - I mean come on NT sort this out!!
                      Hi there - let me be more clear. The reason I said it was a third party download, if you check the screenshot posted above that I replied to, is that it shows creating a windows shortcut to NTLogin.exe, which is not a part of either Windows or NinjaTrader. You can see this if you look in C:\Program Files\NinjaTrader 8\bin. It's a script written by an end user of NinjaTrader - a third party download. Thank you though for your comments. This has been a frustrating aspect of the otherwise good progress moving forward with NinjaTrader Desktop 8.1.
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment


                        #86
                        Whoa - you're right! My apologies. I have had it so long I did not realise I had a 3rd party app lol.
                        Thank you for correcting me.
                        Still, if NT review this message PLEASE PLEASE do something about this. I restart about 8 times a day on average and without this little time saving app it would drive me crazy.

                        Comment


                          #87
                          Originally posted by brucerobinson View Post
                          January Ninja eventually acknowledged this mis-step - ill-conceived, ill-considered, badly implemented followed by poor handling of customer concerns (incorrect information, muddled thinking, flawed arguments, incorrect statements, accompanied by failed rollout of log in servers etc) and stated that it would be fixed. TEN months ago and nothing. Just garbage.

                          I don’t want to use/maintain another program (AHK) for this (no disrespect).

                          I tried the first Login.exe and whilst it ‘worked’ had the click problems reported here (‘sometimes’ clicking another desktop icon launching that program & preventing pw pasting). Couldn’t figure what determined location of double-click, could probably have re-arranged desktop icons but (directed at Ninja) IT IS A TOTAL AND UNNECESSARY WASTE OF MY TIME. Still on 8.0…..

                          #ntbone - you haven’t included a .exe in your GitHub fork. I eventually managed to create one in VS but doesn’t work for me (built successfully no errors, runs terminal Window with no msg but doesn’t ’do’ anything - my bad no doubt, I’m that rare breed on here that isn’t a coder & has no interest, just wants a trading platform that works reliably and is user-friendly) - could you kindly add a compiled .exe I can try?

                          Thanks to all contributors.

                          #Ninjagarbage

                          Kind regards,
                          Hi QuantKey_Bruce,

                          I made some changes to the original NTLogin.exe and can send it to you, the compiled .exe or the source code. Like ntbones version mine will wait until the NT login window is ready, instead of a 5 second timer. Then it will grab the exact window handle of the NT login window, not just enter clicks or tabs arbitrarily. This should make the NT login window the focus no matter what other windows or applications you have open. Then it enters the password. Seems to work for me on my Windows Server 2019 virtual machine and my laptop running Windows 11.

                          -MJ

                          Comment


                            #88
                            Originally posted by devatechnologies View Post

                            Hi QuantKey_Bruce,

                            I made some changes to the original NTLogin.exe and can send it to you, the compiled .exe or the source code. Like ntbones version mine will wait until the NT login window is ready, instead of a 5 second timer. Then it will grab the exact window handle of the NT login window, not just enter clicks or tabs arbitrarily. This should make the NT login window the focus no matter what other windows or applications you have open. Then it enters the password. Seems to work for me on my Windows Server 2019 virtual machine and my laptop running Windows 11.

                            -MJ
                            devatechnologies Sure, I'll be happy to take a look at what you've done if you want to send me the source. My original request here was for NinjaTrader to fix this in the platform itself, but workarounds may get many users by.
                            Bruce DeVault
                            QuantKey Trading Vendor Services
                            NinjaTrader Ecosystem Vendor - QuantKey

                            Comment


                              #89
                              Originally posted by QuantKey_Bruce View Post

                              devatechnologies Sure, I'll be happy to take a look at what you've done if you want to send me the source. My original request here was for NinjaTrader to fix this in the platform itself, but workarounds may get many users by.

                              NT saves my username so the code below only enters in the password.



                              Code:
                              using System;
                              using System.Diagnostics;
                              using System.Windows.Forms;
                              using System.Runtime.InteropServices;
                              using System.Threading;
                              
                              namespace NTLogin
                              {
                                  public class Program
                                  {
                                      private const UInt32 MOUSEEVENTF_LEFTDOWN = 0x0002;
                                      private const UInt32 MOUSEEVENTF_LEFTUP = 0x0004;
                              
                                      [DllImport("user32.dll")]
                                      static extern bool SetCursorPos(int x, int y);
                              
                                      [DllImport("user32.dll")]
                                      static extern bool SetForegroundWindow(IntPtr hWnd);
                              
                                      [DllImport("user32.dll")]
                                      private static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, uint dwExtraInf);
                              
                                      [DllImport("user32.dll", SetLastError = true)]
                                      [return: MarshalAs(UnmanagedType.Bool)]
                                      static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);
                              
                                      [StructLayout(LayoutKind.Sequential)]
                                      private struct RECT
                                      {
                                          public int Left;
                                          public int Top;
                                          public int Right;
                                          public int Bottom;
                                      }
                              
                                      private static void ButtonClick(int x, int y)
                                      {
                                          SetCursorPos(x, y);
                                          mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
                                          mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
                                      }
                              
                                      [STAThread]
                                      static void Main(string[] args)
                                      {
                                          Process ninjaProc = null;
                                          bool foundNinja = false;
                                          string passwd;
                                          string ninjaExe = @"C:\Program Files\NinjaTrader 8\bin\NinjaTrader.exe";
                              
                                          // Expect exactly 1 argument (password)
                                          if (args.Length != 1)
                                          {
                                              return; // Silently exit if arguments are wrong
                                          }
                              
                                          passwd = args[0]; // Set password from the single argument
                              
                                          if (string.IsNullOrEmpty(passwd))
                                          {
                                              return; // Silently exit if password is missing
                                          }
                              
                                          RECT rctNTPosition = new RECT();
                                          Process.Start(@ninjaExe);
                              
                                          while (!foundNinja)
                                          {
                                              Process[] processlist = Process.GetProcessesByName("NinjaTrader");
                                              if (processlist.Length > 0)
                                              {
                                                  ninjaProc = processlist[0];
                                                  foundNinja = true;
                                              }
                                              System.Threading.Thread.Sleep(100);
                                          }
                              
                                          int maxRetries = 60;
                                          int retryCount = 0;
                                          bool windowReady = false;
                                          while (!windowReady && retryCount < maxRetries)
                                          {
                                              if (ninjaProc.MainWindowHandle != IntPtr.Zero && GetWindowRect(ninjaProc.MainWindowHandle, ref rctNTPosition))
                                              {
                                                  if (rctNTPosition.Right > rctNTPosition.Left && rctNTPosition.Bottom > rctNTPosition.Top)
                                                  {
                                                      windowReady = true;
                                                  }
                                              }
                                              if (!windowReady)
                                              {
                                                  System.Threading.Thread.Sleep(500);
                                                  retryCount++;
                                              }
                                          }
                              
                                          if (!windowReady)
                                          {
                                              return; // Silently exit if window isn’t ready
                                          }
                              
                                          SetForegroundWindow(ninjaProc.MainWindowHandle);
                                          GetWindowRect(ninjaProc.MainWindowHandle, ref rctNTPosition);
                                          ButtonClick(rctNTPosition.Left + 30, rctNTPosition.Top + 210);
                              
                                          Clipboard.SetText(passwd);
                                          SendKeys.SendWait("^v");
                                          SendKeys.SendWait("{ENTER}");
                                      }
                                  }
                              }​

                              Comment


                                #90
                                Hello #devatechnologies
                                Sounds like the perfect implementation (other than being built-in to the platform as it should be of course).
                                I would very much appreciate it if you would be so kind as to send me both your source code (I may learn something) and compiled .exe (eliminates potential for me to screw that up).
                                Good to know it seems to be Win11 compatible - I have 2 major migrations to make: Win10 to Win11 and NT8.0 to 8.1. Scary times ahead

                                Just in case there is any confusion - you quoted me in your post but addressed your msg to #QuantKey_Bruce...... we're different ppl in case that suggests you thought we're one and the same!

                                Kind regards,

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                663 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                376 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                110 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                575 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                580 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X