is a basic and commonly used type of predictive analysis.
if you choose lower periods then it will be more sensitive. I choose 34 as it's one of fibonnaci number.
If you find my works useful, please consider a donation
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
tw = high - max(open, close)
bw = min(open, close) - low
body = abs(close - open)
_rate(cond) => 0.5 * (tw + bw + (cond ? 2 * body : 0)) / (tw + bw + body)
uprate = _rate(open <= close)
downrate = _rate(open >= close)
and add precision=0 to study() to avoid big numbers (see AAPL)