Value At Risk Channel [AstrideUnicorn]

AstrideUnicorn Premium Mis à jour   
The Value at Risk Channel (VaR Channel) is a trading indicator designed to help traders control the level of risk exposure in their positions. The user can select a time period and a probability value, and the indicator will plot the upper and lower limits that the price can reach during the selected time period with the given probability.


The indicator is based on the Value at Risk (VaR) calculation. VaR is an important metric in risk management that quantifies the degree of potential financial loss within a position, portfolio or company over a specific period of time. It is widely used by financial institutions like banks and investment companies to forecast the extent and likelihood of potential losses in their portfolios.

We use the so-called “historical method” to compute VaR. The algorithm looks at the history of past returns and creates a histogram that represents the statistical distribution of past returns. Assuming that the returns follow a normal distribution, one can assign a probability to each value of return. The probability of a specific return value is determined by the distribution percentile to which it belongs.


Let’s assume you want to plot the upper and lower limits that price will reach within 4 hours with 5% probability. To do this, go to the indicator Settings tab and set the Timeframe parameter to "4 hours'' and the Probability parameter to 5.0.

You can use the indicator to set your Stop-Loss at the price level where it will trigger with low probability. And what's more, you can measure and control the probability of triggering.

You can also see how likely it is that the price will reach your Take-Profit within a specific period of time. For example, you expect your target level to be reached within a week. To determine this probability, set the Timeframe parameter to "1 week" and adjust the Probability parameter so that the upper or lower limit of your VaR channel is close to your Take-Profit level. The resulting Probability parameter value will show the probability of reaching your target in the expected time.

The indicator can be a useful tool for measuring and managing risk, as well as for developing and fine-tuning trading strategies. If you find other uses for the indicator, feel free to share them in the comments!


Timeframe - sets the time period, during which the price can reach the upper or lower bound of the VaR channel with the probability, set by the Probability parameter.
Probability - specifies the probability with which the price can reach the upper or lower bound of the VaR channel during the time period specified by the Timeframe parameter.
Window - specifies the length of history (number of historical bars) used for VaR calculation.
Notes de version: Increased the default width of the indicator lines.

Our premium trading indicators:

Join our Discord community:
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?