Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why the second order is never executed?

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

    Why the second order is never executed?

    I'm trying to open positions on multiple (two in this case) instruments from the same strategy with this code:

    EnterShort(0, vol_X, name_1);
    EnterShort(1, vol_Y, name_2);

    But only the first operation is executed (BarsInProgress == 0) and the second one is ignored.

    If I switch the order, again only the first one is executed (BarsInProgress == 1).

    Am I missing any restriction or doing something wrong?
    Last edited by manugarc; 10-05-2016, 08:58 AM.

    #2
    Hello Manugarc,

    Thank you for your note.

    Have you set EntriesPerDirection to a value greater than 1?

    For example, https://ninjatrader.com/support/help...rdirection.htm

    Or have you set EntryHandling = UniqueEntries?

    For example,


    If you’d like to send a copy of your code so we can look into what might be going on, please do so.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      {shame} So obvious. I was "sure" that limit was applied to each instrument, not to the total positions.

      Thank you Alan.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      656 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      371 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      579 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X