OPEN-SOURCE SCRIPT

L&S Volatility Index Refurbished

已更新
█ 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.

快照


█ 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.

快照


█ 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:
快照
快照
快照

2. Customization of the timeframe, which can be different from the current one.
快照

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.
快照

5. Customization of the reference moving average (the moving average used to calculate the price distance).
快照

6. Customization of the historical volatility calculation strategy.
快照

- 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).
快照

8. Option to normalize the indicator or not.
快照

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.
快照

10. Alert messages for automations.
快照
發布通知
Short title corrected.
lsls_volatility_indexmoving_averageMoving AveragesOscillatorsstormerVolatilityvolatilityindex

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


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

免責聲明