Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RealtimeErrorHandling does not work

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

    RealtimeErrorHandling does not work

    I'm replaying data with the Playback connection and have setup a strategy with RealtimeErrorHandling set to IgnoreAllErrors. I still get a dialog box with an error.

    To reproduce, create a new strategy and change RealtimeErrorHandling to ignore all errors. Place the following in OnBarUpdate():

    Code:
     
     EnterLongStopLimit(Close[0] - TickSize * 5, Close[0] - TickSize * 5);

    #2
    Hello,

    There may be a bit of confusion on what this property actually accomplishes. Setting RealTimeErrorHandling.IgnoreAllErrors will specifically ignore rejection messages coming from your brokerage.

    In the example of your code snippet, you could expect two error messages when that line runs. One will be a local error that says "Buy stop limit orders can't be placed below the market." Since that one was generated locally, IgnoreAllErrors will not affect it. There would be a second error that read "Strategy submitted an order which generated the following error: 'Order Rejected' if you did not have IgnoreAllOrders set, because that message came from the server side (the brokerage).

    Just to make sure that everything is working as expected, are you seeing this error when trading to a live account, or on Sim101? If you are trading to a live account, do you see both errors I mentioned, or only the first?
    Dave I.NinjaTrader Product Management

    Comment


      #3
      I'm just trading on Sim101/Playback.

      How do I prevent that error dialog from popping up? Sometimes the market moves faster than the order can get submitted and it causes this error. I would like to take care of all rejection and error handling myself.

      Comment


        #4
        Originally posted by wbennettjr View Post
        I'm just trading on Sim101/Playback.

        How do I prevent that error dialog from popping up? Sometimes the market moves faster than the order can get submitted and it causes this error. I would like to take care of all rejection and error handling myself.
        The alert message cannot be suppressed if you have an order rejected. This is design. We would not want an end user to start receiving rejections without being notified.

        The option you mentioned will prevent the strategy from being disabled and will allow you to handle your own rejection logic - but the rejection message will be presented to the end user from the core.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Thanks for the information.

          This seems crazy to me. I can understand the behavior if the user is interacting with the UI and placing orders. I'm creating automated strategies to trade. If the market starts going crazy when I'm trading 100 instruments, I do not want to have to try to close 50 or 100 dialog boxes or more when I'm trying to stop the strategies or whatever. It seems it would be better to let the strategies decide if they want to show a dialog (which probably should be never). Dialog boxes popping up for many running strategies are going to eat up memory and other resources and interfere with performing timely manual cleanup.

          I would like to have that considered as a feature request: Add a property to allow strategies to decide if a dialog should be shown on order rejections. Can also provide the option in the strategy configuration so the user can override if desired.

          Comment


            #6
            We are tracking a similar suggestion already, so I've added your vote and a note about your specific suggestion to SFT-671.
            Dave I.NinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ttrader23, 05-08-2024, 09:04 AM
            9 responses
            42 views
            0 likes
            Last Post ttrader23  
            Started by ZeroKuhl, Yesterday, 04:31 PM
            8 responses
            43 views
            0 likes
            Last Post ZeroKuhl  
            Started by reynoldsn, Today, 07:04 PM
            0 responses
            8 views
            0 likes
            Last Post reynoldsn  
            Started by puapwr, Today, 06:09 PM
            0 responses
            4 views
            0 likes
            Last Post puapwr
            by puapwr
             
            Started by franciscog21, Today, 05:27 PM
            0 responses
            13 views
            0 likes
            Last Post franciscog21  
            Working...
            X