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 DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      12 views
      0 likes
      Last Post DanielSanMartin  
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      12 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      11 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by nandhumca, Today, 03:41 PM
      0 responses
      7 views
      0 likes
      Last Post nandhumca  
      Started by The_Sec, Today, 03:37 PM
      0 responses
      3 views
      0 likes
      Last Post The_Sec
      by The_Sec
       
      Working...
      X