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

Fill or Kill

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

    Fill or Kill

    Fill or Kill - Either execute the entire order immediately or not at all.

    Can I simulate the "fill or kill" order feature in an automated script?

    A 4 contract long position is active

    The script issues an ExitLongLimit(Position.Quantity,..)

    Only 2 contracts are filled at the limit price and the other 2 are still running.

    I want to replace that with a "fill or kill" strategy.

    I want to either exit all 4 contracts at the limit price, or none at all.

    Is there a way to do this?

    #2
    I find it interesting that you're asking about "Kill or Fill" in the context of exiting your position.

    I have always understood "Kill or Fill" to be an order type designed for entering a position.

    For example, Investopedia says,
    "The purpose of a fill or kill (FOK) order is to ensure that a position is entered at a desired
    price. Without a fill or kill designation, it might take a prolonged period of time to complete
    a large order. Because such orders are typically placed for large quantities, prolonged
    execution of the order has the potential to cause significant changes to a stock's price
    and causing market disruption."

    As far as I know, neither NT7 or NT8 support this order type.

    Comment


      #3
      Hello rcsingleton,

      Thanks for your post.

      NinjaTrader 7 and NinjaTrader 8 do not support Fill or Kill orders. A Limit order may leave some contracts in open if it receives a partial fill, and market conditions do not allow the rest of the order to fill.

      If you want to guarantee your exit once the market touches the price you want to exit, you could use logic to call ExitLong() once the price touches. If consider using NinjaTrader 8, you could use Market If Touched orders instead of Limit orders which simulate this behavior on your PC. (Once NinjaTrader sees the price touches, the Market order is submitted. The order does not reside at the exchange.) These orders may incur slippage as opposed to Limit orders, however.

      Let us know if you have any additional questions.
      JimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, Yesterday, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      192 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,235 views
      0 likes
      Last Post xiinteractive  
      Working...
      X