Price Prediction With Rolling Volatility [TradeDots]

The "Price Prediction With Rolling Volatility" is a trading indicator that estimates future price ranges based on the volatility of price movements within a user-defined rolling window.


This indicator utilizes 3 types of user-provided data to conduct its calculations: the length of the rolling window, the number of bars projecting into the future, and a maximum of three sets of standard deviations.

Firstly, the rolling window. The algorithm amasses close prices from the number of bars determined by the value in the rolling window, aggregating them into an array. It then calculates their standard deviations in order to forecast the prospective minimum and maximum price values.

Subsequently, a loop is initiated running into the number of bars into the future, as dictated by the second parameter, to calculate the maximum price change in both the positive and negative direction.

The third parameter introduces a series of standard deviation values into the forecasting model, enabling users to dictate the volatility or confidence level of the results. A larger standard deviation correlates with a wider predicted range, thereby enhancing the probability factor.


The purpose of the indicator is to provide traders with an understanding of the potential future movement of the price, demarcating maximum and minimum expected outcomes. For instance, if an asset demonstrates a substantial spike beyond the forecasted range, there's a significantly high probability of that price being rejected and reversed.

However, this indicator should not be the sole basis for your trading decisions. The range merely reflects the volatility within the rolling window and may overlook significant historical price movements. As with any trading strategies, synergize this with other indicators for a more comprehensive and reliable analysis.

Note: In instances where the number of predicted bars is exceedingly high, the lines may become scattered, presumably due to inherent limitations on the TradingView platform. Consequently, when applying three SD in your indicator, it is advised to limit the predicted bars to fewer than 80.


Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?