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 burtoninlondon, Today, 12:38 AM
      0 responses
      5 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      13 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      13 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Working...
      X