OPEN-SOURCE SCRIPT

L&S Volatility Index Refurbished

Telah dikemas kini
█ Introduction

This is my second version of the L&S Volatility Index, hence the name "Refurbished".
The first version can be found at this link:
LS Volatility Index


The reason I released a separate version is because I rewrote the source code from scratch with the aim of both improving the indicator and staying as close as possible to the original concept.
I feel that the first version was somewhat exotic and polluted in relation to the indicator originally described by the authors.

In short, the main idea remains the same, however, the way of presenting the result has been changed, reiterating what was said.


█ CONCEPTS

The L&S Volatility Index measures the volatility of price in relation to a moving average.

The indicator was originally described by Brazilian traders Alexandre Wolwacz (Stormer) and Fábio Figueiredo (Vlad) from L&S Educação Financeira.

Basically, this indicator can be used in two ways:

1. In a mean reversion strategy, when there is an unusual distance from it;
2. In a trend following strategy, when the price is in an acceptable region.

As an indicator of volatility, the greatest utility is shown in first case.
This is because it allows identifying abnormal prices, extremely stretched in relation to an average, including market crashes.

How the calculation is done:

First, the distance of the price from a given average in percentage terms is measured.
Then, the historical average volatility is obtained.
Finally the indicator is calculated through the ratio between the distance and the historical volatility.

According to the description proposed by the creators, when the L&S Volatility Index is above 30 it means that the price is "stretched".
The closer to 100 the more stretched.
When it reaches 0, it means the price is on average.

syot kilat


█ What to look for

Basically, you should look at non-standard prices.
How to identify it?
When the oscillator is outside the Dynamic Zone and/or the Fixed Zone (above 30), it is because the price is stretched.

Nothing on the market is guaranteed.
As with the RSI, it is not because the RSI is overbought or oversold that the price will necessarily go down or up.
It is critical to know when NOT to buy, NOT to sell or NOT to do anything.
It is always important to consider the context.

syot kilat


█ Improvements

The following improvements have been implemented.
It should be noted that these improvements can be disabled, thus using the indicator in the "purest" version, the same as the one conceived by the creators.

Resources:

1. Customization of limits and zones:
syot kilat
syot kilat
syot kilat

2. Customization of the timeframe, which can be different from the current one.
syot kilat

3. Repaint option (prints the indicator in real time even if the bar has not yet closed. This produces more signals).

4. Customization of price inputs. This affects the calculation.
syot kilat

5. Customization of the reference moving average (the moving average used to calculate the price distance).
syot kilat

6. Customization of the historical volatility calculation strategy.
syot kilat

- Accumulated ATR: calculates the historical volatility based on the accumulated ATR.
- Returns: calculates the historical volatility based on the returns of the source.

Both forms of volatility calculation have their specific utilities and applications.
Therefore, it is worthwhile to have both approaches available, and one should not necessarily replace the other.
Each method has its advantages and may be more appropriate in different contexts.

The first approach, using the accumulated ATR, can be useful when you want to take into account the implied volatility of prices over time,
reflecting broader price movements and higher impact events. It can be especially relevant in scenarios where unexpected events can drastically affect prices.

The second approach, using the standard deviation of returns, is more common and traditionally used to measure historical volatility.
It considers the variability of prices relative to their average, providing a more general measure of market volatility.

Therefore, both forms of calculation have their merits and can be useful depending on the context and specific analysis needs.
Having both options available gives users flexibility in choosing the most appropriate volatility measure for the situation at hand.

* When choosing "Accumulated ATR", if the indicator becomes difficult to see, there are 3 possibilities:
a) manually adjust the Fixed Zone value;
b) disable the Fixed Zone and use only the Dynamic Zone;
c) normalize the indicator.


7. Signal line (a moving average of the oscillator).
syot kilat

8. Option to normalize the indicator or not.
syot kilat

9. Colors to facilitate direction interpretation.
Since the L&S is a volatility indicator, it does not show whether the price is rising or falling.
This can sometimes confuse the user.
That said, the idea here is to show certain colors where the price is relative to the average, making it easier to analyze.
syot kilat

10. Alert messages for automations.
syot kilat
Nota Keluaran
Short title corrected.
lsls_volatility_indexmoving_averageMoving AveragesOscillatorsstormerVolatilityvolatilityindex

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?


To contribute to my work:
⚡Bitcoin Lightning: forwardocean64@walletofsatoshi.com
🟠Bitcoin: bc1qv0j28wjsg6l8fdkphkmgfz4f55xpph893q0pdh
🔵PayPal: paypal.com/donate/?hosted_button_id=D9KRKY5HMSL9S
Juga pada:

Penafian