I thought of using something like a data series to track the number of trades for each bar and sum up the last Y bars, but since I use range bars, that won't quite do the trick. And sometimes, with range bars in a quiet market, my strategy can produce quite a number of trades within a single bar.
Any thoughts on how to accomplish this? Ultimately, what I'm trying to do is say "if there were 5 trades in the last 5 minutes, disable the strategy" or something similar to that.
Comment