I am coding for a couple of events to occur within X bars of each other. Right now, I have booleans called Cond1 and Cond2 that are set to true when the conditions are met. I start counting bars at that time and reset them to false once X number of bars have elapsed. When both are true at the same time, I allow a trade entry.
Does anyone have a less cumbersome way to do the same thing?