• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to change order

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

    Unable to change order

    I am experimenting with using a trailing stop on my strategy. While in a position the strategy threw an error and closed down with the message "Cannot change order 'nnnnn' because current order values already match'. It appears that the strategy generated a change on the stop at the same price. I have seen this previously when moving profit target limits explicitly, but in this case my strategy took no programmatic action.

    1. Why does this minor mistake cause such a catastrophic consequence? It would make sense to simply reject the change order rather than close the position and terminate the entire strategy.
    2. What can I do to avoid this error since my strategy took no explicit action?


    #2
    Hello aworldnervelink.

    Thanks for your post.

    Strategies will disable when an order error is encountered. This is in an effort to prevent having the strategy getting left in an unwanted position when an order error is received. Orders submitted with Set methods also update based on the Calculate mode, and the order change to the same price may have occurred from this functionality. Testing with Trace Orders enabled can help to see where the orginal Change ORder came from.

    TraceOrders - https://ninjatrader.com/support/help...aceorders2.htm

    To prevent the strategy from being deactivated, you can set the strategy's RealtimeErrorHandling property to IgnoreAllErrors. With this property set, you can then trap the order error OnOrderUpdate if you would like to have the strategy attempt a different action. I have attached a demonstration script to demonstrate trapping another case of an unable to change order error.

    RealtimeErrorHandling - https://ninjatrader.com/support/help...orhandling.htm

    OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

    We also have a feature request tracking interest to have NinjaTrader silently ignore these specific errors since the error itself may not be consequential. The ticket ID is SFT-3667 and I have added a vote on your behalf. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.

    Feature Request Disclaimer.

    We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing.

    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm


    We look forward to assisting.
    Attached Files
    Last edited by NinjaTrader_Jim; 06-10-2020, 08:33 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      I tried RealtimeErrorHandling = StopCancelCloseIgnoreRejects and this did not work - my strategy still closed.

      Currently running with IgnoreAllErrors and this seems to be working. I was alerted by several warning dialogs with audio, but the strategy did not close and the trailing stop is moving.

      Comment


        #4
        Hello aworldnervelink,

        Thanks for the catch. This is correct that IgnoreAllErrors would need to be used to trap the Change Order fails. I've corrected my post.

        Let us know if there is anything else we can do to help.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ezrakoper, Today, 03:05 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by asmmbillah, Today, 02:23 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by steveg, Today, 02:44 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Heath  
        Started by BatBart, Today, 01:24 PM
        1 response
        12 views
        0 likes
        Last Post Jonsey529  
        Started by lightsun47, Today, 12:33 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X