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

RealtimeErrorHandling.IgnoreAllErrors

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

    RealtimeErrorHandling.IgnoreAllErrors

    Hello,

    I configured my strategy with RealtimeErrorHandling.IgnoreAllErrors.
    I am handling order rejected in OnOrderUpdate.
    The problem is that I receive popup messages of rejected order.
    How can I disable those popup messages?

    It's even getting worse if I run 20 strategies at same time?

    Sincerely,Kobi

    #2
    Hello levikNT,

    Thank you for the question.

    This is currently expected that the rejection error is still displayed as there was a rejection, only the strategy ignores this and the platform still reacts. There is currently no option to disable this error specifically so I will need to put in a feature request here. Vote added to SFT-671.

    You may be able to use a separate addon to control this on your own by observing when new windows are created, and checking if the new window is the error window and then closing it. I don't have any kind of sample of that concept specifically, however, we did previously have a question of finding a button in the control center and clicking it. This may be able to be used in a similar way to close an error window.

    The code below specifically finds the control center window and clicks the X. If you instead used the OnWindowCreated override from an addon and observed the created windows, you may be able to determine it is an error window and just close it from that scope. Most windows have automation ID's for controls, this may be one way to determine it is an error window.

    This is not something I will be able to directly post a sample for, I don't believe this would be a good item to have freely available on the forum for direct download as auto closing errors could pose a fairly large problem if it goes unmonitored. If you wanted to give this a try I believe this would likely be a path toward that goal.

    Code:
    ControlCenter cc = NinjaTrader.Core.Globals.AllWindows.First(t => t is ControlCenter) as ControlCenter;
    if (cc != null)
    {
        cc.Dispatcher.InvokeAsync(() =>
        {
            System.Windows.Controls.Button closeButton = cc.FindFirst("NTWindowButtonClose") as System.Windows.Controls.Button;
            if (closeButton != null) {
                System.Windows.Automation.Peers.ButtonAutomationPeer peer = new System.Windows.Automation.Peers.ButtonAutomationPeer(closeButton);
                System.Windows.Automation.Provider.IInvokeProvider invokeProv = peer.GetPattern(System.Windows.Automation.Peers.PatternInterface.Invoke) as System.Windows.Automation.Provider.IInvokeProvider;
                if (invokeProv != null) invokeProv.Invoke();
            }
        });
    }



    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 04-01-2019, 10:21 AM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I am having the same problem. Please add my vote for SFT-671.

      Comment


        #4
        Automation to me is in a different class of development than chart indicators or live trader assistance....because automation should be robust enough to run for days without intervention, perhaps only logging, and have strong self-healing / recovery features....that is to be able to manage the worst conditions without failing.

        (It is like the background / batch processing that some of us (older guys) used to create for nightly financial / banking system back ends. No one is there. These systems run at night while we are sleeping.)

        Having lots of popups when there is no one to see them does not make any sense at all.

        Actually a lot of popups would probably make a Windows operation system unstable due to resource problems.

        I suggest order/execution error alerts have an option of going to a new type of Event Handler, that the developer can manage.

        So, there could be an option.... Error Popup or Error Event Handler (no popup).

        A vote for SFT-671.

        Others also?


        Comment


          #5
          I am having the same problem. Please add my vote for SFT-671.

          Comment


            #6
            Please add my vote for SFT-671

            Comment


              #7
              Hello,

              I just wanted to post a quick note that we have collected the votes in this thread to this point. Any new users who would like to add a vote to SFT-671 please either reply here or send an email to platformsupport[at]ninjatrader.com and include the feature request ID. If you reply here past this point I will not be commenting back for each vote but please know the votes will be added.



              JesseNinjaTrader Customer Service

              Comment


                #8
                Add vote to SFT-671.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by algospoke, Today, 06:40 PM
                0 responses
                4 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                7 views
                0 likes
                Last Post maybeimnotrader  
                Started by quantismo, Today, 05:13 PM
                0 responses
                6 views
                0 likes
                Last Post quantismo  
                Started by AttiM, 02-14-2024, 05:20 PM
                8 responses
                168 views
                0 likes
                Last Post jeronymite  
                Started by cre8able, Today, 04:22 PM
                0 responses
                9 views
                0 likes
                Last Post cre8able  
                Working...
                X