• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 07: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,
    http://ninjatrader.com/support/helpG...ryhandling.htm

    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 FabianoTrader, Today, 04:00 PM
      2 responses
      11 views
      0 likes
      Last Post FabianoTrader  
      Started by FabianoTrader, Today, 03:53 PM
      0 responses
      4 views
      0 likes
      Last Post FabianoTrader  
      Started by swcooke, Today, 11:18 AM
      2 responses
      8 views
      0 likes
      Last Post swcooke
      by swcooke
       
      Started by pjsmith, Today, 01:56 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by JasonH, Yesterday, 11:03 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X