Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Disable popup messages for rejected orders changes

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

    #46
    Any update on disabling these pop ups in V8?

    Please add my vote as well

    Comment


      #47
      JoseFRS, no changes have been implemented regarding pop-up messages. I'll add your vote to SFT-671.

      Comment


        #48
        Hi all, I started programming some strategies on ninjatrader and i'm seriously flabbergasted that i have to stumble upon an issue that already exists since 2007 on this platform (based on the starting date of the thread ).


        "Deciding on features for future releases is not a simple black and white decision. There are many factors involved including but not limited to:
        • Demand which is measured by objective user requests and subjective discretion on the part of our Product Management team.
        • Feasibility
        • Developer bandwidth
        • Current projects in the queue
        • Economics"

        Imo, this argumentation for not implementing this feature is ridiculous. This feature, if you can already call it a feature, is just adding a simple boolean property at the setDefaults and checking it when the software wants to trigger a popup from a strategy. This isn't rocket science, and 5 minutes of work for a junior developer or an intern.

        if (State == State.SetDefaults)
        {
        this.IsUnmanaged = true;
        this.DisablePopupWindows = true;
        }

        For your legal concerns, you can add a popup at the startup of a strategy in which the user should consent and is aware the strategy will not popup any messages.

        On top of that, all information and messages can already be found in the log...




        For everybody who is interested, here is a snippet to kill those messages from code, just call the static "searchAndKill()"


        namespace NinjaTrader.Custom.Strategies.PBRStrategy.OrderMan ager
        {
        using NinjaTrader.NinjaScript.Strategies;
        using System.Runtime.InteropServices;
        using HWND = System.IntPtr;

        public static class OpenWindowGetter
        {
        public static IDictionary<HWND, string> GetOpenWindows()
        {
        HWND shellWindow = GetShellWindow();
        Dictionary<HWND, string> windows = new Dictionary<HWND, string>();

        EnumWindows(delegate (HWND hWnd, int lParam)
        {
        if (hWnd == shellWindow) return true;
        if (!IsWindowVisible(hWnd)) return true;

        int length = GetWindowTextLength(hWnd);
        if (length == 0) return true;

        StringBuilder builder = new StringBuilder(length);
        GetWindowText(hWnd, builder, length + 1);

        windows[hWnd] = builder.ToString();
        return true;

        }, 0);

        return windows;
        }

        private delegate bool EnumWindowsProc(HWND hWnd, int lParam);

        [DllImport("USER32.DLL")]
        private static extern bool EnumWindows(EnumWindowsProc enumFunc, int lParam);

        [DllImport("USER32.DLL")]
        private static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);

        [DllImport("USER32.DLL")]
        private static extern int GetWindowTextLength(HWND hWnd);

        [DllImport("USER32.DLL")]
        private static extern bool IsWindowVisible(HWND hWnd);

        [DllImport("USER32.DLL")]
        private static extern IntPtr GetShellWindow();
        }

        public class WindowKiller
        {
        [DllImport("user32.dll")]

        public static extern int SendMessage(int hWnd, uint Msg, int wParam, int lParam);

        public const int WM_SYSCOMMAND = 0x0112;

        public const int SC_CLOSE = 0xF060;

        public static void SearchAndKill()
        {
        foreach (KeyValuePair<IntPtr, string> window in OpenWindowGetter.GetOpenWindows())
        {
        IntPtr handle = window.Key;
        string title = window.Value;

        if (title.Contains("Error"))
        {
        SendMessage(handle.ToInt32(), WM_SYSCOMMAND, SC_CLOSE, 0);
        }
        }
        }
        }
        }










        Comment


          #49
          I agree, it is absolutely ridiculous that this issue of unwanted error popups has not been addressed!

          Comment


            #50
            Please add my vote, there are many scenarios where these dialogs occur where there is no risk to the user if they don't see them. It's just noise.

            Comment


              #51
              Hello carnitron,

              Thank you for your response.

              I've added a vote to this request (SFT-671) on your behalf.

              Thank you for your feedback!
              Zachary S.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by f.saeidi, Today, 11:02 AM
              1 response
              1 view
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by geotrades1, Today, 10:02 AM
              4 responses
              12 views
              0 likes
              Last Post geotrades1  
              Started by rajendrasubedi2023, Today, 09:50 AM
              3 responses
              15 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by lorem, Today, 09:18 AM
              2 responses
              11 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by geddyisodin, Today, 05:20 AM
              4 responses
              30 views
              0 likes
              Last Post geddyisodin  
              Working...
              X