Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit orders not executed NT8

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

    Limit orders not executed NT8

    Hello,

    I would like to know how NT8 manages limit orders not executed when a strategy is running.

    Is there any way of sending a market order after N seconds when a limit order has been touched but has not been filled?

    I know that this was not possible with NT7, perhaps is different with NT8?

    If the answer is negative, what is easiest way of solving this thru NinjaScript?

    Thank you.

    #2
    Hello Plaket,

    Thanks for opening the thread.

    Orders that are not submitted through a strategy and are submitted manually will only follow the simple order placement rules and will be filled by the broker.

    In the circumstance that a limit order is touched and not filled, this is very possible under the considering slippage. The price could be met but by the time the order with the broker gets processed, the price may have already changed.

    There is not any way within NinjaTrader 8 to place a market order a certain number of seconds after a limit order has been touched but not filled. This is more of a customized behavior that belongs in a NinjaScript strategy.

    This strategy would be possible by...

    a) Defining logic to use a 1 second primary data series to enter into the market. The primary data series is the data series that the strategy gets attached to. A strategy can then be written to detect when the price has met the limit order, and if so many bars occur after the limit price is met, you can call ExitShort() or ExitLong() to place a market order to exit the position.

    b) Creating a strategy with intrabar granularity to utilize a 1 second data series so the strategy can take action on each second even if the primary data series is not a 1 second data series. You could then also use OnOrderUpdate() to detect when the order has become accepted and working. When this status is reached, you know the order is working with the broker. With the limit order working, you can then start checking if the limit price is ever reached in OnBarUpdate() for the iteration of the 1 second data series. You can then submit a market order similarly to a)

    Scenario a) is a more simplistic approach that can be loosely defined in the Strategy Builder to make a simple strategy.

    Scenario b) would be a more advanced approach and would require some programming background to accomplish or might be best left to a NinjaScript Consultant to write for you. If you would like, I can have our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request. If that is the case, please write in to platformsupport[at]ninjatrader[dot]com with the thread URL and the text "Attention Jim."

    Resources for Scenario a)

    Please see the video here: https://www.screencast.com/t/GbQyCz2SGvG

    Resources for Scenario b)

    Please see the documentation for Multi Series strategies and utilizing OnOrderUpdate()

    Multi Series NinjaScripts - http://ninjatrader.com/support/helpG...nstruments.htm

    OnOrderUpdate() - http://www.ninjatrader.com/support/h...=OnOrderUpdate

    Using OnOrderUpdate() and OnExecution() for Protective Orders sample — http://ninjatrader.com/support/forum...ead.php?t=7499

    Using additional data series, Intrabar backtesting example - http://ninjatrader.com/support/forum...ead.php?t=6652

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    59 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    74 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X