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 PaulMohn, Today, 12:36 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    19 views
    0 likes
    Last Post RookieTrader  
    Working...
    X