Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders getting ignored with Exceeded entry signals limit ...

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

    Orders getting ignored with Exceeded entry signals limit ...

    Hello,

    I am trying to understand exactly how the EntriesPerDirection and EntryHandling properties of a strategy works. I have a very simple strategy that only places one order at a time based on some external signal. The method I use is either EnterShortStopMarket or EnterLongStopMarket. Once the order is filled, I place an opposite order using the ExitLongStopMarket or ExitShortStopMarket as a Stop loss order initially and then use the ChangeOrder method to move the stop based on the price movement. I do this in the OnBarUpdate event handler.

    After running this strategy for a while on the Sim101 account, I started seeing silent failures. The call to EnterShortStopMarket or EnterLongStopMarket would not do anything nor will it show any error in the logs. I have a Print statement that confirmed that the proper method(s) was being called. I subsequently enabled the TraceOrder property and was able to see in the trace that the Enter orders were being ignored with the message "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection". As far as I know there are no other open or pending orders. If I disable the strategy, remove it, add it and enable it, then it starts working properly again. Is there something that needs to be reset/cleared after a certain amount of time. I also saw the same behavior when using Playback data, however this issue started showing up much earlier than with Sim 101.

    On researching this I saw one other post in the forum that suggests setting the EntriesPerDirection to an arbitrarily high number. https://forum.ninjatrader.com/forum/ninjatrader-8/strategy-development/1179448-entry-handling-and-grid-strategy-troubleshoot?p=1179495#post1179495

    I wanted to get other opinions on whether setting the EntriesPerDirection to a high number is an acceptable approach. Also, would love to see if NT folks have any explanation for this behavior.

    Thanks


    Attached Files

    #2
    Hello ntram,

    Thank you for your post.

    EntriesPerDirection should not be an arbitrary number; it determines how many entries you may have per direction while you have an active position. If you set this to a higher number, it will allow your strategy to set multiple entries, and the way you described your strategy is that it places one order at a time. Unless you want it to continuously submit entries up to the maximum EntriesPerDirection when your entry conditions are true, you should not modify the EntriesPerDirection property.As suggested in the last post of the thread you linked, you should add print statements to understand your strategy's behavior. This will help you to know when an order is submitted and could help to understand why your strategy is getting to a point where an entry signal is being ignored due to EntryHandling and EntriesPerDirection. Typically, this means there is already an active position for the max EntriesPerDirection. When you are seeing the calls to EnterShortStopMarket and EnterLongStopMarket that don't appear to be doing anything, I suggest checking the Strategies tab of the Control Center to see if it shows the strategy in an open position. You can also add prints to your script that print out position information to confirm this. For more details on using prints to debug a script:


    Please let us know if we may be of further assistance.

    Comment


      #3
      Hello Emily,

      Thank you very much for your response. Now that i understand what these properties are, i can figure out ways to work around them. Just out of curiosity (even though you recommended against it) I set the value to 100 and did not see the issue. I think there is some hidden bug but at this point, I don't have the motivation to try to repro it.

      Thank you.

      Comment


        #4
        I am experiencing this issue as well and have added print statements to confirm and the strategy is NOT taking a position yet still rejecting based on "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties".

        Comment


          #5
          Originally posted by Lance El Camino View Post
          I am experiencing this issue as well and have added print statements to confirm and the strategy is NOT taking a position yet still rejecting based on "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties".
          Hello Lance El Camino,

          Thank you for your note.

          What do you have EntryHandling and EntriesPerDirection set to in your strategy settings? On the Strategies tab of the Control Center, what is shown for "Strategy Position" and "Account Position" when the strategy is enabled?

          I look forward to your reply.

          Comment


            #6
            Thanks for the quick response. I have 1 Entry Per Direction and "All Entries" for Entry Handling. When strategy is enabled both Position and Acct Position have a "-".

            Comment


              #7
              Originally posted by Lance El Camino View Post
              Thanks for the quick response. I have 1 Entry Per Direction and "All Entries" for Entry Handling. When strategy is enabled both Position and Acct Position have a "-".
              Please send me your diagnostic files so I may further investigate. You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default. Please include "ATTN Emily C" in the subject line along with a link to this forum thread in the body. Please also advise approximately when was the last time you observed​ the "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties" message so I may review that part of your files.

              I look forward to assisting you further.

              Comment


                #8
                Click image for larger version

Name:	image.png
Views:	352
Size:	15.1 KB
ID:	1270835​If this helps, I notice the orders being rejected only after this has occurred on one of the entrances. It's an anomalous situation where if the conditions are true on the previous bar, a ShortStopLimit order is set to the Low of that previous bar. On this occurrence the price moves many ticks down within the first second of the new bar so the StopLimit doesn't set in time and now is above the market. It seems to affect the subsequent orders once this error occurs. I have it set to RealtimeErrorHandling.StopCancelCloseIgnoreRejects so the strategy will continue. It then proceeds to take most trades but then rejects a small amount based on the "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties" error.

                Comment


                  #9
                  Originally posted by Lance El Camino View Post
                  Click image for larger version

Name:	image.png
Views:	352
Size:	15.1 KB
ID:	1270835​If this helps, I notice the orders being rejected only after this has occurred on one of the entrances. It's an anomalous situation where if the conditions are true on the previous bar, a ShortStopLimit order is set to the Low of that previous bar. On this occurrence the price moves many ticks down within the first second of the new bar so the StopLimit doesn't set in time and now is above the market. It seems to affect the subsequent orders once this error occurs. I have it set to RealtimeErrorHandling.StopCancelCloseIgnoreRejects so the strategy will continue. It then proceeds to take most trades but then rejects a small amount based on the "Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties" error.
                  Hello Lance El Camino,

                  Thank you for your reply.

                  That error may or may not be related, though I will not be able to tell until I review your log and trace files. Please send me your diagnostic files via email per the steps in my previous reply so I may further investigate.

                  I look forward to assisting you further.

                  Comment


                    #10
                    Okay thanks. NT crashed so I lost all the data. I'll run the replay again and send it when finished.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Yesterday, 05:17 AM
                    0 responses
                    53 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    130 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    70 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    44 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    49 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X