It is interesting this thread should arise now, just as i am preparing for some presentations, in London, one this very subject.
As always, there's an alternative view about the number of times an S/R level is tested.
For example, Gannsters would say that the more times a S/R level is tested the more it is likely to be broken ... this can be verified using pattern theory ... ascending and descending triangles would be a good example.
Again, using simple astrotools, it can be easily demonstrated that support and resistance can be also determined along the time axis ... meaning, when a market has been trending along a line of S/R, it is possible to determine WHEN this may be line may be broken.
Now THAT is something that may be programmable, but the inputs are quite variable, unlike the simple inputs of regular price-based indicators.