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 NullPointStrategies, Today, 05:17 AM
      0 responses
      41 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X