federalTacos5392b

Nasan Rate of Change (ROC)

**NOTE: FOR COMPARISON TRADITIONAL ROC IS PLOTTED WITH THE SAME ROC LENGTH OF 9. IT IS NOT PART OF THE INDICATOR"

The Nasan ROC indicator is smoothed version of the of the traditional ROC indicator. The Nasna ROC uses a triple pass moving average differencing strategy. A cumulative sum of the deviations obtained from the moving average differencing provides a smooth "noise free" trend and this cumulative sum of deviations is used for calculating ROC.
Let's break down the components and understand the indicator we discussed earlier:

Sequential Triple Pass Filter:
Three filters with lengths specified by length1, length2, and length3 are applied to the closing prices (close).
The filters involve calculating the cumulative sum of the differences between the closing prices and their respective moving averages.
The idea is to detrend the data and accumulate the deviations from the average over time, emphasizing longer-term trends.

Calculation of Rate of Change (ROC) of Cumulative Sum:
The Rate of Change (ROC) of the cumulative sum (rocCumulativeSum) is calculated using the ta.roc function with a specified length (rocLength).
ROC measures the percentage change in the cumulative sum over a specified period.
The ROC histogram provides insights into the momentum of the detrended series. Positive values suggest increasing momentum, while negative values suggest decreasing momentum.
Pay attention to the color of the histogram bars.
The histogram bars are colored green if the current ROC value is greater than or equal to the previous ROC value, and red otherwise.
This coloring is based on the concept that a positive ROC suggests upward momentum, while a negative ROC suggests downward momentum.

Volatility - Volume Impact:
The Average True Range (ATR) is calculated with a period of 14.
Volume strength is calculated as a factor (VCF) that considers the ratio of the simple moving average (SMA) of the current volume to the SMA of the volume over a longer period (144).
This volume factor (VCF) is then multiplied by ATR, creating a synergy with volatility and volume.
Visualization with Background Color Gradient:

A background color gradient is applied to the chart based on the calculated volume strength (f1).
The gradient color ranges from black (indicating low ATR and volume strength) to purple (indicating high ATR and volume strength). A low value indicates a ranging market with no significant price movements and it is safter to avoid signals generated from ROC histogram in these region.

Synergy of ROC and Volume Strength:

Observe how the ROC signals align with the background color gradient. For example, confirm whether positive ROC aligns with periods of high ATR and volume strength.
This synergy can provide confirmation or divergence signals, adding another layer of analysis.
版本注释:
Updated the roc calculation. The inbuilt formula cannot appropriately handle negative values so the formula is updated and roc is manually calculated . roc = (value - value n bars ago)/value n bars ago * (value n bars ago / absolute value of value n bars ago)
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?