Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Should submitting two EnterLongLimit orders, fill me with two contracts or only one?

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

    Should submitting two EnterLongLimit orders, fill me with two contracts or only one?

    Consider this:

    Code:
    EnterLongStopLimit(1, High[2] + TicksForLimitOrders * TickSize, High[2] + TicksForStopLimitOrders * TickSize, "Long");
                            EnterLongStopLimit(1, High[2] + TicksForLimitOrders * TickSize, High[2] + TicksForStopLimitOrders * TickSize, "LongRunner");
    
                            SetProfitTarget("Long", CalculationMode.Ticks, TicksForProfit);
                            SetStopLoss("Long", CalculationMode.Ticks, TicksForStop, false);
                            SetStopLoss("LongRunner", CalculationMode.Ticks, TicksForStop, false);​
    This would only give me one order, with 1 fill. I would expect:

    1) Two contracts, one for "Long" one for "LongRunner"
    2) Profit target for "Long"
    3) Stop loss for both "Long" and "LongRunner"

    that should give me 1 contract, that I could manage myself when to exit.

    Is that assumption wrong? Why am I only getting 1 contract fill (on historical, haven't tested realtime).

    #2
    Well, you have EntriesPerDirection probably set to 1. Try setting that to 2 or more.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello pkefal,

      Entering unique orders will produce multiple positions however if you call them both at the same time like pictured that will block the second entry if you have entries per direction set to 1. You would either need to increase that or change the entry handling to unique entries.

      https://ninjatrader.com/support/help...ghtsub=entries
      https://ninjatrader.com/support/help...ghtsub=entries

      You can find a sample of scaling which uses the unique entry handling here:

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

      that should give me 1 contract, that I could manage myself when to exit.
      Keep in mind if you plan to manually exit one of the positions that may disable the strategy depending on how you intended to close that position.

      Another item to keep in mind is that when using the Set methods those need to be called before your entry to set up the orders. If you call the set methods after an entry that will generally use an incorrect old price for the targets. It should look like this:



      Code:
      SetProfitTarget("Long", CalculationMode.Ticks, TicksForProfit);
      SetStopLoss("Long", CalculationMode.Ticks, TicksForStop, false);
      SetStopLoss("LongRunner", CalculationMode.Ticks, TicksForStop, false);​
      
      EnterLongStopLimit(1, High[2] + TicksForLimitOrders * TickSize, High[2] + TicksForStopLimitOrders * TickSize, "Long");
      EnterLongStopLimit(1, High[2] + TicksForLimitOrders * TickSize, High[2] + TicksForStopLimitOrders * TickSize, "LongRunner");
      ​​

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X