OPEN-SOURCE SCRIPT

Nami Bands with Future Projection [FXSMARTLAB]

The Nami Bands ( Inspired by "Nami", meaning "wave" in Japanese) are two dynamic bands around price data: an upper band and a lower band. These bands are calculated based on an Asymmetric Linear Weighted Moving Average of price and a similarly asymmetric weighted standard deviation. This weighting method emphasizes recent data without overreacting to short-term price changes, thus smoothing the bands in line with prevailing market conditions.

Advantages and Benefits of Using the Indicator
* Volatility Analysis: The bands expand and contract with market volatility, helping traders assess periods of high and low volatility. Narrow bands indicate low volatility and potential consolidation, while wide bands suggest increased volatility and potential price movement.

* Dynamic Support and Resistance Levels: By adapting to recent trends, the bands serve as dynamic support (lower band) and resistance (upper band) levels, which traders can use for entry and exit signals.

* Overbought and Oversold Conditions: When prices reach or cross the bands’ outer limits, it may signal overbought (upper band) or oversold (lower band) conditions, suggesting possible reversals or trend slowdowns.

* Trend Confirmation and Continuation: The slope of the central moving average confirms trend direction. An upward slope generally indicates a bullish trend, while a downward slope suggests a bearish trend.

* Anticipating Breakouts and Reversals: The projected bands help identify where price movements may head, allowing traders to anticipate potential breakouts or reversals based on projected support and resistance.


Indicator Parameters
  1. Source (src): The price data used for calculations, by default set to the average of high, low, and close (hlc3).
  2. Length: The period over which calculations are made, defaulted to 50 periods.
  3. Projection Length: The length for future band projection, defaulted to 20 periods.
  4. StdDev Multiplier (mult): A multiplier for the standard deviation, defaulted to 2.0.


    Internal Calculations
    1. Asymmetric Linear Weighted Moving Average of Price
    The indicator uses an Asymmetric Linear Weighted Moving Average (ALWMA) to calculate a central value for the price.
    Asymmetric Weighting: This weighting technique assigns the highest weight to the most recent value, with weights decreasing linearly as the data points become older. This structure provides a nuanced focus on recent price trends, while still reflecting historical price levels.

    2. Asymmetric Weighted Standard Deviation
    The standard deviation in this indicator is also calculated using asymmetric weighting:

    Purpose of Asymmetric Weighted Standard Deviation: Rather than aiming for high sensitivity to recent data, this standard deviation measure smooths out volatility by integrating weighted values across the length period, stabilizing the overall measurement of price variability.

    This approach yields a balanced view of volatility, capturing broader market trends without being overly reactive to short-lived changes.

    3. Upper and Lower Bands
    The upper and lower bands are created by adding and subtracting the asymmetric weighted standard deviation from the asymmetric weighted average of price. This creates a dynamic envelope that adjusts to both recent price trends and the smoothed volatility measure:

    These bands represent adaptable support and resistance levels that shift with recent market volatility.


    Future Band Projection
    The indicator provides a projection of the bands based on their current slope.

    1. Calculating the Slope of the Bands
    The slope for each band is derived from the difference between the current and previous values of each band.

    2. Projecting the Bands into the Future
    For each period into the future, up to the defined Projection Length, the bands are projected using the current slope.

    This feature offers an anticipated view of where support and resistance levels may move, providing insight for future market behavior based on current trends.




bandsBands and ChannelsCyclesprojectiontrend

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項