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

How can I encode an entry that, if not filled, is canceled?

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

    How can I encode an entry that, if not filled, is canceled?

    Hi,

    I'm using EnterLong(quantity) to enter in a position but the problem is that if quantity is 10, sometimes Ninjatrader takes 6 position at one price and the other 4 contracts at other prices. Is there a way to be sure that if my position is taken, all the contracts (quantity) will be at the same price?

    Thank you

    #2
    Hello lju45,

    Thanks for writing in.

    Partial fills are not dictated by code. Something you could do is use EnterLongLimit() instead of EnterLong() in your script. Limit orders will fill at the limit price or better, which may reduce partial fills at different price levels compared to what would be seen with a market order or stop market order.

    See this help guide documentation for more information about EnterLongLimit(): https://ninjatrader.com/support/help...rlonglimit.htm

    Please let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      thank you,

      As always, very helpful. I thank you for the excellent attention you gave us in the forum.

      All the best!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ghoul, Today, 06:02 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      44 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      20 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      180 views
      0 likes
      Last Post jeronymite  
      Started by DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      13 views
      0 likes
      Last Post DanielSanMartin  
      Working...
      X