fluxchart

Bollinger Bands (Nadaraya Smoothed) | Flux Charts

fluxchart 已更新   
Ticker: SPY , Timeframe: 1m, Indicator settings: default
General Purpose
This script is an upgrade to the classic Bollinger Bands. The idea behind Bollinger bands is the detection of price movements outside of a stock's typical fluctuations. Bollinger Bands use a moving average over period n plus/minus the standard deviation over period n times a multiplier. When price closes above or below either band this can be considered an abnormal movement. This script allows for the classic Bollinger Band interpretation while de-noising or "smoothing" the bands.

Efficacy
Ticker: SPY , Timeframe: 1m, Indicator settings: Standard Dev: 2; Level 1 : off; Level 2: off; labels: off
Upper Band Key:
Blue: Bollinger No smoothing
Orange: Bollinger SMA smoothing period of 10
Purple: Bollinger EMA smoothing period of 10
Red: Nadaraya Smoothed Bollinger bandwidth of 6
Here we chose periods so that each would have a similar offset from the original Bollinger's. Notice that the Red Band has a much smoother result while on average having a similar fit to the other smoothing techniques. Increasing the EMA's or SMA's period would result in them being smoother however the offset would increase making them less accurate to the original data.
Ticker: SPY , Timeframe: 1m, Indicator settings: Standard Dev: 2; Level 1: off; Level 2: off; labels: off
Upper Band Key:
Blue: Bollinger No smoothing
Orange: Bollinger SMA smoothing period of 20
Purple: Bollinger EMA smoothing period of 20
Red: Nadaraya Smoothed Bollinger bandwidth of 6

This makes the Nadaraya estimator a particularly efficacious technique in this use case as it achieves a superior smoothness to fit ratio.

How to Use
This indicator is not intended to be used on its own. Its use case is to identify outlier movements and periods of consolidation. The Smoothing Factor when lowered results in a more reactive but noisy graph. This setting is also known as the "bandwidth" ; it essentially raises the amplitude of the kernel function causing a greater weighting to recent data similar to lowering the period of a SMA or EMA. The repaint smoothing simply draws on the Bollinger's each chart update. Typically repaint would be used for processing and displaying discrete data however currently it's simply another way to display the Bollinger Bands.

What makes this script unique.
Since Bollinger bands use standard deviation they have excess noise. By noise we mean minute fluctuations which most traders will not find useful in their strategies. The Nadaraya-Watson estimator, as used, is essentially a weighted average akin to an ema. A gaussian kernel is placed at the candlestick of interest. That candlestick's value will have the highest weight. From that point the other candlesticks' values effect on the average will decrease with the slope of the kernel function. This creates a localized mean of the Bollinger Bands allowing for reduced noise with minimal distortion of the original Bollinger data.

版本注释:
Added option to change source used to calculate labels.

Get Access to Flux Charts indicators: www.fluxcharts.com/?via=tv

Join our community: discord.gg/fluxcharts
开源脚本

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

免责声明

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

想在图表上使用此脚本?