Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Order Fill Process & Timing

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

    Order Fill Process & Timing

    I have a strategy that will get in a position, then reverse directions if the market moves against it. I had a situation occur today where the strategy entered long, the market moved against the position and the strategy sold the position. The market moved so fast that the sell order was not complete before it entered a sell short position. The initial position was still active and the trade did not take place because the sell short would have placed the account above the buying power limit.

    Is there a setting I am missing to prevent this or is there a way to have the strategy pause while it waits for confirmation of the fill so it can avoid this in the future?

    #2
    Hello cpabiz20k,

    Thank you for your post.

    OnExecutionUpdate can be used to wait for an order to fill/cancel/change. Below is a pertinent reference sample that waits for the entry order to fill in OnExecutionUpdate, and after it does a protective stop and profit target order are submitted:

    https://ninjatrader.com/support/help...and_onexec.htm

    If you have any questions on this material, please let me know.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AveryFlynn, Today, 04:57 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Max238, Today, 01:28 AM
    4 responses
    37 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by r68cervera, Today, 05:29 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by timko, Today, 06:45 AM
    2 responses
    14 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X