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 Shansen, 08-30-2019, 10:18 PM
    24 responses
    938 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    3 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    2 views
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Working...
    X