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 alifarahani, Today, 09:40 AM
      2 responses
      12 views
      0 likes
      Last Post alifarahani  
      Started by junkone, Today, 11:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by pickmyonlineclass, Today, 12:23 PM
      0 responses
      1 view
      0 likes
      Last Post pickmyonlineclass  
      Started by frankthearm, Yesterday, 09:08 AM
      12 responses
      44 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by quantismo, 04-17-2024, 05:13 PM
      5 responses
      35 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X