Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EntriesPerDirection question..

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

    EntriesPerDirection question..

    Hi,

    Is "EntriesPerDirection" calculated on the basis of BarsInProgress.. or Position?

    As I've mentioned before, I'm running multi-symbol, multi-timeframe. But I'm also adding multiple copies of the *same* symbol... and I'd like to enter on each of them separately, on their own BarsnProgress.

    I think I just answered my own question. But basically, I assume "EntriesPerDirection" should be set equal to the maximum number of "copies" of the same symbol I might have.

    #2
    heech,

    The behavior is dependent on your EntryHandling setting.

    "Sets the manner in how entry orders are handled. If set to "EntryHandling.AllEntries", NinjaScript will process all order entry methods until the maximum allowable entries set by the EntriesPerDirection property has been reached while in an open position. If set to "EntryHandling.UniqueEntries", NinjaScript will process order entry methods until the maximum allowable entries set by the EntriesPerDirection property per each uniquely named entry."

    So your idea is part right. It is not necessarily based on symbol, but could be based on entry signal name.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      heech,

      The behavior is dependent on your EntryHandling setting.

      "Sets the manner in how entry orders are handled. If set to "EntryHandling.AllEntries", NinjaScript will process all order entry methods until the maximum allowable entries set by the EntriesPerDirection property has been reached while in an open position. If set to "EntryHandling.UniqueEntries", NinjaScript will process order entry methods until the maximum allowable entries set by the EntriesPerDirection property per each uniquely named entry."

      So your idea is part right. It is not necessarily based on symbol, but could be based on entry signal name.
      Crap, too bad. I had an order bumped back to me with that error message, and I hoped it was just me forgetting to set MaxEntriesPerDirection. Now I'm baffled what caused the original order to be rejected.

      You wouldn't believe the various race conditions/bugs I've found in my code in the last few days, Josh. I'm running with 63 different positions (over 45 symbols), and placing about 60 trades (90k shares) a day.

      Comment


        #4
        Josh,

        Problem popped up again, and I'm baffled. I have:
        Entries per direction, 1.
        Entry handling: UniqueEntries.

        3/27/2009 8:06:51 AM Entered internal PlaceOrder() method at 3/27/2009 8:06:51 AM: Action=Buy OrderType=Market Quantity=1,700 LimitPrice=0 StopPrice=0 SignalName='STI|62' FromEntrySignal=''
        3/27/2009 8:06:51 AM Ignored PlaceOrder() method at 3/27/2009 8:06:51 AM: Action=Buy OrderType=Market Quantity=1,700 LimitPrice=0 StopPrice=0 SignalName='STI|62' FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'
        I have confirmed there have been no orders with SignalName "STI|62", just by looking in the orders tab (and my own output). There *were* exits this morning that pointed to EntrySignal "STI|62", but I can't imagine why that would be the issue.

        Comment


          #5
          Please provide the complete trace/logs around this order.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Josh View Post
            Please provide the complete trace/logs around this order.
            Josh,

            Well, now I'm really baffled. I can't find any mention of this event in the trace or logs. I find find other events right around it (there was an order for CMA a few seconds before), but nothing at the time referenced by the "internal PlaceOrder" method.

            Is it reasonable that orders "ignored" due to EntriesPerDirection don't show up in log/trace files? Or is something else going on?

            This isn't one of my debugging messages! This is coming from traceorders being turned on.

            Comment


              #7
              Ignored orders will not show up. The purpose of evaluating the trace/logs is to see what positions were open around that time frame.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Josh View Post
                Ignored orders will not show up. The purpose of evaluating the trace/logs is to see what positions were open around that time frame.
                That's going to be a long read... I have 80+ different positions...

                I don't have a problem sending it to you. Email?

                Comment


                  #9
                  support [at] ninjatrader [dot] com with Attn Josh and mention of this thread. If it is extremely cluttered please provide timestamps and relevant information to filter it. Thanks.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  558 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  324 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  545 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X