I have spent many hours (and days), multiple times, trying to define a pullback to my computer as part of an automated system.
Despite the fact that nearly any human can look at a chart and point out the pullbacks, I have used price action, volume, range, indicators, combinations and every other dang thing I can think of, with little success.
I find a classic pullback on a chart, then find the local values with various indicators, price, volume, range, etc. and the resulting 'description' is either too specific, so I get virtually no setups, or too generic, so I get innumerable useless ones.
If anyone has accomplished this and is willing to share the details, or even hints (such as, I used such-and-such with so-and-so and it works for me) I'd really appreciate hearing whatever you're willing to post publicly, or share in a private message.