OPEN-SOURCE SCRIPT

AmitN STDEV V5

Updated
Often, a trader would like to predict the range for the next certain amount of period. This is useful for doing short strangles, Iron Fy, Iron Condor strategies.

This script calculates the price range for the next 'X' number of candles on the given timeframe based on Standard Deviation formulae.
It gives this range on 1 standard deviation and 2 standard deviations.

-----------------------------------------------------------
1SD Range : Probability of expiry in that range is 68 %
2SD Range : Probability of expiry in that range is 95 %
-----------------------------------------------------------

From the settings, you can choose the "lookback" period which is used to calculate the next price prediction based on those many candles.

The range is plotted in the form of lines. It marks the range and also the difference between spot and the range-value.
Release Notes
Updated the chart image
Release Notes
Added the percentage figure to see the range percentages.
statistics

Open-source script

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer