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 lightsun47, Today, 03:51 PM
      0 responses
      2 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      8 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      42 views
      0 likes
      Last Post futtrader  
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      13 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      8 views
      0 likes
      Last Post port119
      by port119
       
      Working...
      X