I am assume that you want conditional probability. If we have gone B days without a C% retracement, what happens over the next E days, So for all cases that match this rule you want an average for E. I have one question ? How far back do we look for the high and low which we are used for our retracement ?. Do you want to use swing high/low and what strength. A simpler method would be retracement level from N day high and low. Remember you can't do this on backadjusted futures contracts because you can't do ratio analysis on back adjusted contracts.