OPEN-SOURCE SCRIPT

Advanced Volatility-Adjusted Momentum Index

Advanced Volatility-Adjusted Momentum Index (AVAMI)

The AVAMI is a powerful and versatile trading index which enhances the traditional momentum readings by introducing a volatility adjustment. This results in a more nuanced interpretation of market momentum, considering not only the rate of price changes but also the inherent volatility of the asset.

Settings and Parameters:

Momentum Length: This parameter sets the number of periods used to calculate the momentum, which is essentially the rate of change of the asset's price. A shorter length value means the momentum calculation will be more sensitive to recent price changes. Conversely, a longer length will yield a smoother and more stabilized momentum value, thereby reducing the impact of short-term price fluctuations.

Volatility Length: This parameter is responsible for determining the number of periods to be considered in the calculation of standard deviation of returns, which acts as the volatility measure. A shorter length will result in a more reactive volatility measure, while a longer length will produce a more stable, but less sensitive measure of volatility.

Smoothing Length: This parameter sets the number of periods used to apply a moving average smoothing to the AVAMI and its signal line. The purpose of this is to minimize the impact of volatile periods and to make the indicator's lines smoother and easier to interpret.

Lookback Period for Scaling: This is the number of periods used when rescaling the AVAMI values. The rescaling process is necessary to ensure that the AVAMI values remain within a consistent and interpretable range over time.

Overbought and Oversold Levels: These levels are thresholds at which the asset is considered overbought (potentially overvalued) or oversold (potentially undervalued), respectively. For instance, if the AVAMI exceeds the overbought level, traders may consider it as a possible selling opportunity, anticipating a price correction. Conversely, if the AVAMI falls below the oversold level, it could be seen as a buying opportunity, with the expectation of a price bounce.

Mid Level: This level represents the middle ground between the overbought and oversold levels. Crossing the mid-level line from below can be perceived as an increasing bullish momentum, and vice versa.

Show Divergences and Hidden Divergences: These checkboxes give traders the option to display regular and hidden divergences between the AVAMI and the asset's price. Divergences are crucial market structures that often signal potential price reversals.

Index Logic:

The AVAMI index begins with the calculation of a simple rate of change momentum indicator. This raw momentum is then adjusted by the standard deviation of log returns, which acts as a measure of market volatility. This adjustment process ensures that the resulting momentum index encapsulates not only the speed of price changes but also the market's volatility context.

The raw AVAMI is then smoothed using a moving average, and a signal line is generated as an exponential moving average (EMA) of this smoothed AVAMI. This signal line serves as a trigger for potential trading signals when crossed by the AVAMI.

The script also includes an algorithm to identify 'fractals', which are distinct price patterns that often act as potential market reversal points. These fractals are utilized to spot both regular and hidden divergences between the asset's price and the AVAMI.

Application and Strategy Concepts:

The AVAMI is a versatile tool that can be integrated into various trading strategies. Traders can utilize the overbought and oversold levels to identify potential reversal points. The AVAMI crossing the mid-level line can signify a change in market momentum. Additionally, the identification of regular and hidden divergences can serve as potential trading signals:

Regular Divergence: This happens when the asset's price records a new high/low, but the AVAMI fails to follow suit, suggesting a possible trend reversal. For instance, if the asset's price forms a higher high but the AVAMI forms a lower high, it's a regular bearish divergence, indicating potential price downturn.

Hidden Divergence: This is observed when the price forms a lower high/higher low, but the AVAMI forms a higher high/lower low, suggesting the continuation of the prevailing trend. For example, if the price forms a lower low during a downtrend, but the AVAMI forms a higher low, it's a hidden bullish divergence, signaling the potential continuation of the downtrend.

As with any trading tool, the AVAMI should not be used in isolation but in conjunction with other technical analysis tools and within the context of a well-defined trading plan.
indexMoving AveragesOscillatorsVolatility

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности