saolof

Better Bollinger bands

saolof Mis à jour   
Bollinger bands with volume-weighted statistics (volume weighted moving averages & variance/standard deviation) to give better results during high-volume events, and also aims to provide additional information without adding clutter by coloring the bands. Intended as the first basic indicator to be thrown on a chart.

Will never annoy you by rescaling log charts due to negative lower bands (much like my previous geometric bollinger bands) , and will almost always give more realistic bounds on price movement than standard bollinger bands, particularly during high-volume events such as broken supports, earnings reports, or squeezes.

The centerline is colored green or red by a volume-weighted momentum oscillator. The bands themselves let you select color schemes such as detected market type (confirmed bull market, confirmed bear market, or volatility-dominated), volatility change (to clearly show when bands are expanding or contracting), or the same color as the centerline oscillator.
Notes de version:
v 1.1: Added a fallback to make the bands still work when volume data is missing for part of a ticker's history, such as in historical data.
Notes de version:
v1.2: Refactored source code for future open-sourcing. Added centerline oscillator options in addition to the existing momentum oscillator, including an RSI-based oscillator with hysteresis and a hybrid oscillator combining both.
Notes de version:
Added sawtooth time window (i.e. wma-like). Implemented Bessel's correction for weighted variances properly to make the variance estimate unbiased, which is mainly useful for get more consistent results when changing between time window settings or for short time settings. Time weights are reliability weights and included in the correction, while the volume weights are frequency weights and have a negligible influence on variance bias.

Also refactored internal code further.
Notes de version:
* Added a plain band color option.
* Added an "ignore volume" checkbox setting. Enabling it feeds a constant volume of 1 into the indicator instead of the actual volume.
* Added a "Linear regression" checkbox setting. Enabling it changes the centerline to be a generalized LSMA with least squares weights from the weighted moving average selected in the time window setting. Bands similarly are the average deviation from the regression line instead of from the moving average. This is useful when studying charts that have a clear trend.
* Made minor changes to the Hybrid oscillator so that it wouldn't throw an error when the indicator is set to a small number of periods, it can now be set all the way down to 2 periods.
Notes de version:
Beta release of new updated version. Minor performance improvements, refactorings, minor internal changes to some oscillators, the addition of my smooth exponential moving average as a time window option , and changed linear regression settings to include a "compromise" setting to take momentum into account without overfitting.

Putting some changes out here before I add them to the open source version.
Notes de version:
(further minor work, including deriving the correct Bessel corrections for the SEMA)
Notes de version:
(updating chart, prior update accidentally had a custom candle color scheme indicator also in the chart)
Script protégé
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?