OPEN-SOURCE SCRIPT

Asymmetric volatility

Atualizado
The "Asymmetric Volatility" indicator is designed to visualize the differences in volatility between upward and downward price movements of a selected instrument. It operates on the principle of analyzing price movements over a specified time period, with particular focus on the symmetrical evaluation of both price rises and falls.

User Parameters:

- Length: This parameter specifies the number of bars (candles) used to calculate the average volatility. The larger the value, the longer the time period, and the smoother the volatility data will be.

- Source: This represents the input data for the indicator calculations. By default, the close value of each bar is used, but the user can choose another data source (such as open, high, low, or any custom value).

Operational Algorithm:

1. Movement Calculation:
- UpMoves: Computed as the positive difference between the current bar value and the previous bar value, if it is greater than zero.
- DownMoves: Computed as the positive difference between the previous bar value and the current bar value, if it is greater than zero.

2. Volatility Calculation:
- UpVolatility: This is the arithmetic mean of the UpMoves values over the specified period.
- DownVolatility: This is the arithmetic mean of the DownMoves values over the specified period.

3. Graphical Representation:
- The indicator displays two plots: upward and downward volatility, represented by green and red lines, respectively.
- The background color changes based on which volatility is dominant: a green background indicates that upward volatility prevails, while a red background indicates downward volatility.

The indicator allows traders to quickly assess in which direction the market is more volatile at the moment, which can be useful for making trading decisions and evaluating the current market situation.
Notas de Lançamento
Some refactoring
Notas de Lançamento
some refactoring. Added the ability to smooth McGinley Dynamic. Added the ability to normalize volatility to percentages.
riskmangementStandard DeviationstatisticsVolatilityvolatilty

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal