I am looking to create logic that will prevent my strategy from entering trades if I exited a position within a certain number of bars. In the picture attached, the strategy takes an entry immediately after closing a profitable position. I want to implement a "No Trade" rule where once I close a position in profit, the strategy does not trade for a certain number of bars.
I attempted to do this using a condition for entry of:
> BarsSinceExitExecution(0,@"End Rotation",0) > 7 = True
But the strategy never executes any trades when this is a condition.
I attempted to create a bool variable that is only true if BarsSinceExit() is greater than 7, but I run in to the same problem. The strategy does not ever enter trades with this condition in the code.
I've added a picture to illustrate what my goal is, and I've attached both the current version of the strategy and the version that includes the BarsSinceExit bool variable to show you what I thought might work.

Comment