Dynamic Zone of Bollinger Band Stops Line [Loxx]Dynamic Zone of Bollinger Band Stops Line is a Bollinger Band indicator with Dynamic Zones. This indicator serves as both a trend indicator and a dynamic stop-loss indicator.
What are Bollinger Bands?
A Bollinger Band is a technical analysis tool defined by a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average (SMA) of a security's price, but which can be adjusted to user preferences.
Bollinger Bands were developed and copyrighted by famous technical trader John Bollinger, designed to discover opportunities that give investors a higher probability of properly identifying when an asset is oversold or overbought.
What are Dynamic Zones?
As explained in "Stocks & Commodities V15:7 (306-310): Dynamic Zones by Leo Zamansky, Ph .D., and David Stendahl"
Most indicators use a fixed zone for buy and sell signals. Here’ s a concept based on zones that are responsive to past levels of the indicator.
One approach to active investing employs the use of oscillators to exploit tradable market trends. This investing style follows a very simple form of logic: Enter the market only when an oscillator has moved far above or below traditional trading lev- els. However, these oscillator- driven systems lack the ability to evolve with the market because they use fixed buy and sell zones. Traders typically use one set of buy and sell zones for a bull market and substantially different zones for a bear market. And therein lies the problem.
Once traders begin introducing their market opinions into trading equations, by changing the zones, they negate the system’s mechanical nature. The objective is to have a system automatically define its own buy and sell zones and thereby profitably trade in any market — bull or bear. Dynamic zones offer a solution to the problem of fixed buy and sell zones for any oscillator-driven system.
An indicator’s extreme levels can be quantified using statistical methods. These extreme levels are calculated for a certain period and serve as the buy and sell zones for a trading system. The repetition of this statistical process for every value of the indicator creates values that become the dynamic zones. The zones are calculated in such a way that the probability of the indicator value rising above, or falling below, the dynamic zones is equal to a given probability input set by the trader.
To better understand dynamic zones, let's first describe them mathematically and then explain their use. The dynamic zones definition:
Find V such that:
For dynamic zone buy: P{X <= V}=P1
For dynamic zone sell: P{X >= V}=P2
where P1 and P2 are the probabilities set by the trader, X is the value of the indicator for the selected period and V represents the value of the dynamic zone.
The probability input P1 and P2 can be adjusted by the trader to encompass as much or as little data as the trader would like. The smaller the probability, the fewer data values above and below the dynamic zones. This translates into a wider range between the buy and sell zones. If a 10% probability is used for P1 and P2, only those data values that make up the top 10% and bottom 10% for an indicator are used in the construction of the zones. Of the values, 80% will fall between the two extreme levels. Because dynamic zone levels are penetrated so infrequently, when this happens, traders know that the market has truly moved into overbought or oversold territory.
Calculating the Dynamic Zones
The algorithm for the dynamic zones is a series of steps. First, decide the value of the lookback period t. Next, decide the value of the probability Pbuy for buy zone and value of the probability Psell for the sell zone.
For i=1, to the last lookback period, build the distribution f(x) of the price during the lookback period i. Then find the value Vi1 such that the probability of the price less than or equal to Vi1 during the lookback period i is equal to Pbuy. Find the value Vi2 such that the probability of the price greater or equal to Vi2 during the lookback period i is equal to Psell. The sequence of Vi1 for all periods gives the buy zone. The sequence of Vi2 for all periods gives the sell zone.
In the algorithm description, we have: Build the distribution f(x) of the price during the lookback period i. The distribution here is empirical namely, how many times a given value of x appeared during the lookback period. The problem is to find such x that the probability of a price being greater or equal to x will be equal to a probability selected by the user. Probability is the area under the distribution curve. The task is to find such value of x that the area under the distribution curve to the right of x will be equal to the probability selected by the user. That x is the dynamic zone.
Included
Bar coloring
Signals
Alerts
3 types of signal smoothing
Bbands
Adaptive Jurik Filter Volatility Bands [Loxx]Adaptive Jurik Filter Volatility Bands uses Jurik Volty and Adaptive, Double Jurik Filter Moving Average (AJFMA) to derive Jurik Filter smoothed volatility channels around an Adaptive Jurik Filter Moving Average. Bands are placed at 1, 2, and 3 deviations from the core basline.
What is Jurik Volty?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Ideally, you would like a filtered signal to be both smooth and lag-free. Lag causes delays in your trades, and increasing lag in your indicators typically result in lower profits. In other words, late comers get what's left on the table after the feast has already begun.
That's why investors, banks and institutions worldwide ask for the Jurik Research Moving Average ( JMA ). You may apply it just as you would any other popular moving average. However, JMA's improved timing and smoothness will astound you.
What is adaptive Jurik volatility?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is an adaptive cycle, and what is Ehlers Autocorrelation Periodogram Algorithm?
From his Ehlers' book Cycle Analytics for Traders Advanced Technical Trading Concepts by John F. Ehlers , 2013, page 135:
"Adaptive filters can have several different meanings. For example, Perry Kaufman’s adaptive moving average ( KAMA ) and Tushar Chande’s variable index dynamic average ( VIDYA ) adapt to changes in volatility . By definition, these filters are reactive to price changes, and therefore they close the barn door after the horse is gone.The adaptive filters discussed in this chapter are the familiar Stochastic , relative strength index ( RSI ), commodity channel index ( CCI ), and band-pass filter.The key parameter in each case is the look-back period used to calculate the indicator. This look-back period is commonly a fixed value. However, since the measured cycle period is changing, it makes sense to adapt these indicators to the measured cycle period. When tradable market cycles are observed, they tend to persist for a short while.Therefore, by tuning the indicators to the measure cycle period they are optimized for current conditions and can even have predictive characteristics.
The dominant cycle period is measured using the Autocorrelation Periodogram Algorithm. That dominant cycle dynamically sets the look-back period for the indicators. I employ my own streamlined computation for the indicators that provide smoother and easier to interpret outputs than traditional methods. Further, the indicator codes have been modified to remove the effects of spectral dilation.This basically creates a whole new set of indicators for your trading arsenal."
Included
- UI options to shut off colors and bands
Keltner Channel Width Oscillator (KingThies)Definition
The Keltner Channel Width oscillator is a technical analysis indicator derived originally from the same relationship the Bollinger Band Width indicator takes on Bollinger Bands.
Similar to the Bollinger Bands, Kelts measure volatility in relation to price, and factor in various range calculations to create three bands around the price of a given stock or digital asset. The Middle Line is typically a 20 Day Exponential Moving Average while the upper and lower bands highlight price at different range variations around its basis. Keltner Channel Width serve as a way to quantitatively measure the width between the Upper and Lower Bands and identify opportunities for entires and exits, based on the relative range price is experiencing that day.
Calculation
Kelt Channel Width = (Upper Band - Lower Band) / Middle Band
More on Keltner Channels
Keltner channel was first described by a Chicago grain trader called Chester W. Keltner in his 1960 book How to Make Money in Commodities. Though Keltner claimed no ownership of the original idea and simply called it the ten-day moving average trading rule, his name was applied by those who heard of this concept through his books.
Similarly to the Bollinger Bands, Keltner channel is a technical analysis tool based on three parallel lines. In fact, the Keltner indicator consists of a central moving average in addition to channel lines spread above and below it. The central line represents a 10-day simple moving average of what Chester W. Keltner called typical price. The typical price is defined as the average of the high, low and close. The distance between the central line and the upper, or lower line, is equivalent to the simple moving average of the preceding 10 days' trading ranges.
One way to interpret the Keltner Channel would be to consider the price breakouts outside of the channel. A trader would track price movement and consider any close above the upper line as a strong buy signal. Equivalently, any close below the lower line would be considered a strong sell signal. The trader would follow the trend emphasized by the indicator while complementing his analysis with the use of other indicators as well. However, the breakout method only works well when the market moves from a range-bound setting to an established trend. In a trend-less configuration, the Keltner Channel is better used as an overbought/oversold indicator. Thus, as the price breaks out below the lower band, a trader waits for the next close inside the Keltner Channel and considers this price behavior as an oversold situation indicating a potential buy signal. Similarly, as the price breaks out above the upper band, the trader waits for the next close inside the Keltner Channel and considers this price action as an overbought situation indicating a potential sell signal. By waiting for the price to close within the Channel, the trader avoids getting caught in a real upside or downside breakout.
BBands ChannelsBased on the Bollinger Bands system. This shows outer channels to the bollinger bands .
Logarithmic Bollinger BandsLogarithmic Bollinger Bands
Published by Eric Thies on January 14, 2022
Summary
In this script I have taken the standard Bollinger band pinescript and made efforts to eliminate the behavior experienced in periods of high volatility in which we see the bands disappear completely off the chart by adding exponential plotting and logarithmic sourcing to the tool.
This tool will also show periods of Bearish and Bullish Expansion for users to see when volatility is running high in the market.
More On Bollinger Bands
Bollinger Bands consist of a center line representing the moving average of a security’s price over a certain period, and two additional parallel lines (called the upper and lower trading bands) one of which is just the moving average plus k-times the standard deviation over the selected time frame, and the other being the moving average minus k-times the standard deviation over that same timeframe. This technique has been developed in the 1980’s by John Bollinger, who lately registered the terms “Bollinger Bands” as a U.S. trademark in 2011. Technical analysts typically use 20 periods and k = 2 as default settings to build Bollinger Bands, while they can choose a simple or exponential moving average. Bollinger Bands provide a relative definition of high and low prices of a security. When the security is trading within the upper band, the price is considered high, while it is considered low when the security is trading within the lower band.
There is no general consensus on the use of Bollinger Bands among traders. Some traders see a buy signal when the price hits the lower Bollinger Band and close their position when the price hits the moving average. Some others buy when the price crosses over the upper band and sell when the price crosses below the lower band. We can see here two opposing interpretations based on different rationales, depending whether we are in a reversal or continuation pattern. Another interesting feature of the Bollinger Bands is that they give an indication of the volatility levels; a widening gap between the upper and lower bands indicates an increasing volatility, while a narrowing band indicates a decreasing volatility. Moreover, when the bands have an almost flat slope (parallel to the x-axis) the price will generally oscillate between the bands as if trading through a channel.
// © 2022 KINGTHIES THIS SOURCE CODE IS SUBJECT TO TERMS OF MOZILLA PUBLIC LICENSE 2.0 (MOZILLA.ORG/MPL/2.0)
//@version=5
//## !<---------------- © KINGTHIES --------------------->
indicator('Logarithmic Bollinger Bands (kingthies)',shorttitle='LogBands_KT',overlay=true)
// { BBANDS
src = math.log(input(close,title="Source"))
lenX = input(20,title='lenX')
highlights = input(false,title="Highlight Bear and Bull Expansions?")
mult = 2
bbandBasis = ta.sma(src,lenX)
dev = 2 * ta.stdev(src, 20)
upperBB = bbandBasis + dev
lowerBB = bbandBasis - dev
bbw = (upperBB-lowerBB)/bbandBasis
bbr = (src - lowerBB)/(upperBB - lowerBB)
// }
// { BBAND EXPANSIONS
bullExp= ta.rising(upperBB,1) and ta.falling(lowerBB,1) and ta.rising(bbandBasis,1) and ta.rising(bbw,1) and ta.rising(bbr,1)
bearExp= ta.rising(upperBB,1) and ta.falling(lowerBB,1) and ta.falling(bbandBasis,1) and ta.rising(bbw,1) and ta.falling(bbr,1)
// }
// { COLORS
greenBG = color.rgb(9,121,105,75), redBG = color.rgb(136,8,8,75)
bullCol = highlights and bullExp ? greenBG : na, bearCol = highlights and bearExp ? redBG : na
// }
// { INDICATOR PLOTTING
lowBB=plot(math.exp(lowerBB),title='Low Band',color=color.aqua),plot(math.exp(bbandBasis),title='BBand Basis',color=color.red),
highBB=plot(math.exp(upperBB),title='High Band',color=color.aqua),fill(lowBB,highBB,title='Band Fill Color',color=color.rgb(0,128,128,75))
bgcolor(bullCol,title='Bullish Expansion Highlights'),bgcolor(bearCol,title='Bearish Expansion Highlights')
// }
2 Multi-Timeframe Bollinger BandsThis is two separate Bollinger bands in one study. Customizable middle BB line type ( SMA , EMA , VWMA ), legnth, colors, and deviations provided at .5 increments.
Someone else has a very similar Bollinger Band study but the code was hidden, so I figured I would remake as a learning challenge since I'm new to pinescript and this is the best way to learn it imo.
There will be updates to this script in the future but for now it serves its purpose lol. Publishing this version early as I wanted to give some friends access to it
In terms of usage, I like 4h 50 SMA alot . Having two sets of Bollinger bands is nice so you can turn one off or swap between time frames and such. In terms of techniques using both bbands, I haven't really played with it too much yet but simple things like 1h 50sma bbands expanding past the 4h 50sma bbands probably indicate an exaggerated move in that specific time frame, etc etc.
Hope this helps!
Bollinger Bands Clouds - BB CloudsBollinger Bands Clouds provides Bollinger Bands of different timeframes in a chart.
It actually shows BB from a new angles.
This indicator can show three BB from different timeframes simultaneously.
The idea is to be able to combine different levels of BB from other timeframes in one chart
Each cloud is a Bollinger band whose time frame is a multiple of the current chart time frame. If this multiplier is set to 1, its Bollinger bands will be drawn for the current time frame and will be no different from normal Bollinger bands.
This indicator can be suitable for fractal perspective.
Multipliers can be changed from within the indicator settings:
settings -> mult1, mult2 and mult3
For a dark theme, enable the Dark Theme option from the indicator settings.
Bollinger Band Volatility Spread VisualizerThis indicator was created to see the total dollar (or whatever currency pair) amount spread between the upper and lower Bollinger Bands. This knowledge of knowing this spread can be used to indicate upcoming periods of high volatility in a market. The fundamental idea behind predicting periods of high volatility is backed up by the idea that periods of low volatility are followed by periods of high volatility and vice versa.
Based on this knowledge, the numerical spread of the Bollinger Bands, as shown in the indicator, we can deduce that when the value is super low, we can expect a period of high volatility AKA: big move incoming.
This indicator is not fully finished because this was my first time coding in Pinescript and I wanted to post the basic indicator first.
My future plans for improving this indicator include:
Adding customization as an option to choose your personal BBands settings that this indicator is based off of
Potentially converting this indicator as a TradingView Strategy where a signal would go off when the spread reaches a certain threshold
3MAs & BB, Time-Res, Low-VolTriple MAs with EMA/SMA option, and specific timeframe options.
Very customizable.
Bollinger Bands
If BollingerBand Width is lowest in 100 bars it fills background.
Kozlod - Simple BB Strategy - XBTUSD - 1 minuteReally nice performance for simple BB on XBTUSD Bitmex 1 minute chart.
BB length = 55, BB mult = 4.
No SL or PT used.
Amazingly performance for the last week, 92% profitable. Tested on entire May percent profitable become 80%, still not bad.
And remember:
Past performance does not guarantee future results.
McNicholl Moving AverageThis type of moving average was originally developed by Dennis McNicholl (Futures Magazine, (October, 1998): "Better Bollinger Bands"). A kind of TEMA. He used it as a centerline of the new bands, called Better Bollinger Bands or DEnvelope. The Better Bollinger Bands is a modification of the well-known Bollinger Bands that has a better response for changes in volatility.
BBand width bgcolorSimple backround colouring based upon input criteria.
Published by request of a TV user.
Sorry if this is duplicate, but I couldn't see any other scripts on TV.
VWMA + SMA BBollinger + RSI Strategy (ChartArt) mod by BiO618This is a script I remade from the original ChartArt's "CA_RSI_Bolling_Strat".
I added a VWMA following the SMA basis curve.
BBand was made with the SMA curve, +2DS.
The point of adding VWMA to the script is to get a fast correlation between price change and volume change.
How to interpret it:
Since 3-Intervals-VWMA = (P1*V1 + P2*V2 + P3*V3) / (V1+V2+V3)
As the volume grows, VWMA get smaller.
If the price goes to the upper band, and the VWMA follows it, Price grew more than Volume, and a correction would happen soon.
If the price goes to the lower band, and the VWMA follows it, Price dipped with a lot of Volume, and a continuation of trend would be expected.
If the price goes to the upper band, and the VWMA stays close to SMA, Price grew with a correspondient Volume, and the continuation of trend would be expected.
If the price goes to the lower band, and the VWMA stays close to SMA, Price dipped with low Volume, a correction would happen soon.
Remember that NO INDICATOR is flawless, support your interpretation with other indicators like RSI and MACD.
Hope you enjoy it!
φ!
Gunbot - Bbands - UnlockedThis is a repost, the first version was locked and I am unable to unlock it. So I'm simply publishing it anew.
Original Post
Original Description
This is more of a test run than anything. Gunbot approximation courtesy of Vosechu and the original can be found here.
Bollinger Bands with Squeeze highlightingHighlights on the bands when bandwidth is below a specified number and when bands are at lowest point in last 180 periods.
[Alerts] - Moving Average Cross and/or Bbands botThis is the alert script for :
We've included the basic alert syntax for Autoview automation. You can learn more about the syntax here: autoview.with.pink and you can watch this video here: www.youtube.com
These settings are set, by default, to the lowest contracts allowed by Bitmex (at the time of this posting) to avoid a spam account.
You can learn more about Autoview here:
autoview.with.pink
Get your invite and join us in slack here:
slack.with.pink
3BBands (3 Spirolinas)The script combines 3 single Bollinger bands into one script for easy plotting and range modification. It can be used for analyzing a market with multiple time frames and ranges using Fibonacci series as the range.