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

Comment