Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Handling Rejected Orders

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

    Handling Rejected Orders

    If you create an order:

    Code:
    longEntryOrder = SubmitOrder(0,OrderAction.Buy,OrderType.Stop,contracts2,0,entryPrice - TickSize,"","Long");
    And it does not fill because the market price has not triggered it, do you need to cancel longEntryOrder before sending a new longEntryOrder? Or will the new longEntryOrder replace the old?


    If you need to cancel it (which I have been up till now). What happens if longEntryOrder is rejected because the market has moved fast enough that the Buy/Stop price is below the Bid? Do I need to send a CancelOrder for longEntryOrder? Or does the rejection effectively cancel it for you?


    I'm using unmanaged orders and TakeNoAction on RealtimeErrorHandling.


    Thanks

    #2
    With unmanaged strategy you will have to manage the cancellations / modifcations manually. If you SubmitOrder() again without cancelling, then you would have two orders. It's good practice to check for null states of your order objects before submitting so that you don't run into this.

    If you want to modify this order to a different price level, use ChangeOrder() rather than cancel and resubmit.

    A rejected order is no long active, so you don't need to send cancel order commands to it.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    85 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    47 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    67 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X