Probability Function calculates the probability of a data point (price) falling within a certain number of standard deviations away from the mean.
So for example, setting the parameter to 2 standard deviations will calculate the probability of price staying within a 2-standard-deviations-channel away from the mean (or moving average). This description is exactly what are...which makes it a direct application of this indicator, and are used by many traders.
The indicator's formula is an approximation of the integral of the standard normal distribution function. It uses one parameter called "Standard deviation multiple" (SDM). An input of 1 stdev yields 68%, 2 stdevs yields 95%, 3 stdevs yields approx 99.7%, and so on eventually converging to 100%...and it makes sense the bigger the stdev channel, the more likely price will stay within it.
Enjoy and hit the like button!
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.