Bands
Mean Reversion w/ Bollinger BandsThis is a more advanced version of my original mean reversion script.
It employs the famous Bollinger Bands.
This robot will buy when price falls below the lower Bollinger Band, and sell when price moves above the upper Bollinger Band.
I've only tested it on the S&P 500, though you could try it out on other assets to see the backtest performance.
During the recent COVID-19 bear market drop, it produced several buy signals on the S&P which I followed, and made some nice gains so far.
I still think this would make a better investing strategy (buy undervalued / sell over-valued), rather than a trading strategy.
I use this robot for my long term portfolio.
kaitan Bands
Reference: 200 section kaitan Bands
参考:200区間のkaitan Bands
Changing the Bollinger Band's midline from SMA to EMA is not so good in terms of the standard deviation calculation formula, and it was hard to say that EMABB is an index that can be used by the author in different calculation formulas.
This time, when I came up with the deviation, I came up with a method of weighting the latest deviation like EMA instead of the average and neglecting past deviations, so I made it.
The variation in the calculation result seems to be difficult to handle, so the finished product is the one with smoothed EMA deviation.
ボリンジャーバンドの中線をSMAからEMA変更にするのは標準偏差の計算式上いまいちで、EMABBは作者によって計算式もばらばらで使える指標とは言い難かった。
今回、偏差から求めるときに平均ではなくてEMAのように最新の偏差を重くし過去の偏差を軽視する方法を考え付きましたので、作ってみました。
単純に計算結果のばらつきが大きく扱いづらそうなので、EMA偏差をスムージングしたものを完成品としました。
VWAP Daily AnchorAnchored daily VWAP with adjustable standard deviation bands - intended for intraday scalping.
Anchored VWAP is useful because not matter what timeframe you look at it on, it will look the same, unlike normal VWAP indicators. This means there's nothing left to interpretation.
BTC Mayer Multiple BandsIntroduced by Trace Mayer as a way to gauge the current price of Bitcoin against its long range historical price movements (200 day moving average), the Mayer Multiple highlights when Bitcoin is overbought or oversold in the context of longer time frames.
It's worth noting that as the market becomes larger and less volatile, the peaks are becoming less exaggerated. This is because a 200 day moving average baseline is a static yardstick against an ever growing, more stable, Bitcoin market. We should recalibrate what constitutes the overbought/oversold extremes on this chart accordingly.
Idea by CryptoKea. Original author:
Volume Footprints for BTCUSDt (Binance)Identifies where relevant volume is (was). Recommended for 10m 15m timeframes.
Underworld Hunter + Base ZoneUnderworld Hunter + Base Zone is designed to keep traders out of ranging markets by establishing a "dead zone" between the bands where price may be choppy or trends may be short lived. The original Underworld Hunter from @greenmask9 adapted Bollinger Bands by changing the basis from SMA to the EMA of the EMA of the EMA. This version now allows the user to select which moving average they would like to utilize for the calculation.
If price is outside of the upper bands, price may be bullish. If price is outside the lower bands, price may be bearish.
If price is within the green or red areas of the bands, a trend may be forming.
The system also plots when RSI has become over extended above the thresholds selected (70/20 is the default).
MA Period is the length/period the moving average is calculated with
MA Mode is the type of moving average that will be utilized in the basis calculation
The "Standard MA Calculation" Option changes the basis to calculate the moving average selected in MA Mode only once, instead of 3 times
Deviation 1 and Deviation 2 determine how far the dead zone bands will be from the basis
RSI Period is the length/period the RSI function is calculated with
RSI Extended - High Cutoff is the level RSI must reach to be marked as over extended. Most traders refer to this zone as "Overbought"
RSI Extended - Low Cutoff is the level RSI must reach to be marked as over extended. Most traders refer to this zone as "Oversold"
As many NNFx traders know, overbought and oversold essentially do not exist, though the zones can still be utilized
The remaining options are utilized for specific moving average calculations and are set to what is typically considered as "standard" for their values.
There are many options available for this code. The code has not been optimized but merely compiled. Settings should be adjusted for the instrument(s) you are trading.
Adapted from user @greenmask9
Multiple MA Options Credits to @Fractured and @lejmer
Bits and Pieces from @AlexGrover, @Montyjus, and @Jiehonglim
As always, trade at your own risk.
[e2] Bitcoin Halving Key & AvwapThis indicator shows a Key Level Support & Resistance level and VWAP that reset on your choice of the Bitcoin's halving date.
Optional Key Calculation Mode:
- Start with first (2012) or second (2016) halving date.
- Start with first and reset on the second (Halving to halving mode)
- Start with every next halving simultaneously (Halving + halving mode)
Labels show the Market Capitalization, total minted Bitcoins and Bitcoin's close price on the halving's date.
A maximum of 5 bands calculated using a factor of the anchored VWAP's standard deviation can be displayed.
Note
- The script is designed for Bitcoin markets only.
- Estimated 3rd halving, script will be updated when next halving occurs.
Bitcoin Margin Call Envelopes [saraphig & alexgrover]Bitcoin is the most well known digital currency, and allow two parties to make a transaction without the need of a central entity, this is why cryptocurrencies are said to be decentralized, there is no central unit in the transaction network, this can be achieved thanks to cryptography. Bitcoin is also the most traded cryptocurrency and has the largest market capitalization, this make it one of the most liquid cryptocurrency.
There has been tons of academic research studying the profitability of Bitcoin as well as its role as a safe heaven asset, with all giving mixed conclusions, some says that Bitcoin is to risky to be considered as an hedging instrument while others highlight similarities between Bitcoin and gold thus showing evidence on the usefulness of Bitcoin acting as an hedging instrument. Yet Bitcoin seems to attract more short term speculative investors rather than other ones that would use Bitcoin as an hedging instrument.
Once introduced, cryptocurrencies where of course heavily analyzed by technical analyst, and technical indicators where used by retail as well as institutional investors in order to forecast the future trends of bitcoin. I never really liked the idea of designing indicators that specifically worked for only one type of market and ever less on only one symbol. Yet the user @saraphig posted in Feb 20 an indicator called " Margin Call MovingAverage " who calculate liquidation price by using a volume weighted moving average. It took my attention and we decided to work together on a relatively more complete version that would include resistances levels.
I believe the proposed indicator might result useful to some users, the code also show a way to restrict the use of an indicator to only one symbol (line 9 to 16).
The Indicator
The indicator only work on BTCUSD, if you use another symbol you should see the following message:
The indicator plot 6 extremities, with 3 upper (resistance) extremities and 3 lower (support) extremities, each one based on the isolated margin mode liquidation price formula:
UPlp = MA/Leverage × (Leverage+1-(Leverage*0.005))
for upper extremities and:
DNlp = MA × Leverage/(Leverage+1-(Leverage*0.005))
for lower extremities.
Length control the period of the moving averages, with higher values of length increasing the probability of the price crossing an extremity. The Leverage's settings control how far away their associated extremities are from the price, with lower values of Leverage making the extremity farther away from the price, Leverage 3 control Up3 and Dn3, Leverage 2 control Up2 and Dn2, Leverage 1 control Up1 and Dn1, @saraphig recommend values for Leverage of either : 25, 20, 15, 10 ,5.
You can select 3 different types of moving average, the default moving average is the volume weighted moving average (VWMA), you can also choose a simple moving average (SMA) and the Kaufman adaptive moving average (KAMA).
Based on my understanding (which could be wrong) the original indicator aim to highlight points where margin calls might have occurred, hence the name of the indicator.
If you want a more "DSP" like description then i would say that each extremity represent a low-pass filter with a passband greater than 1 for upper extremities and lower than 1 for lower extremities, unlike bands indicators made by adding/subtracting a volatility indicator from another moving average this allow to conserve the original shape of the moving average, the downside of it being the inability to show properly on different scales.
here length = 200, on a 1h tf, each extremities are able to detect short-terms tops and bottoms. The extremity become wider when using lower time-frames.
You would then need to increase the Leverages settings, i recommend a time frame of 1h.
Conclusion
I'am not comfortable enough to make a conclusion, as i don't know the indicator that well, however i liked the original indicator posted by @saraphig and was curious about the idea behind it, studying the effect of margin calls on market liquidity as well as making indicators based on it might result a source of inspiration for other traders.
A big thanks to @saraphig who shared a lot of information about the original indicator and allowed me to post this one. I don't exclude working with him/her in the future, i invite you to follow him/her:
www.tradingview.com
Thx for reading and have a nice weekend! :3
Zero Lag Keltner ChannelsThis is Keltner Channelz (KC) with Zero Lag Moving Average (ZLMA as base). It is smoother and has less lag than the original (EMA/SMA) variant.
It also can be used as a trend indicator and trend confirmation indicator. The upper and lower bands are green if it is an up trend, and red if a down trend. If both have the same color it is a stronger trend.
Anchored VWAP w/ Stdev and VWMA CloudThis is a fun little project that allows you to anchor the Volume Weighed Average Price (VWAP) to a specific day and plot up to 4 standard deviations up or down.
I've also added a Volume Weighted Moving Average (VWMA) plot and accompanying cloud to more easily visualize how volume-based momentum affects trends.
Typically, you'll see price respecting the VWMA Cloud and can expect price bounces off of the VWAP standard deviations.
When setting the initial anchor point, it's best to select a day with high volume and volatility.
This idea is not 100% original, but I couldn't find 1) a public script combining the ideas and 2) the correct plotting of the standard deviation via accumulation.
Happy Trading!
FAQ
Why is your script Protected?
Users like to take my open-source code and charge to use it without my permission.
How do I use this to trade?
Add it to your chart and see what stacks up with your current setup. I trade Forex, so what looks bad on my charts might look golden on yours.
How long have you been doing this?
I've been coding for about 8 years and actively trading for 2 years. My degree is in Robotics Engineering and I became obsessed with investing at 22.
How do you trade?
Hurst + SNR + MESA MAMA + ATR + LSTM + Pure Grid. You can't completely code this setup using Pinescript, but if you learn C++ or Python you're there!
Are your returns good?
I average 0.68% every weekday or 22.65% monthly, using the method above.
Can you build my indicator or strategy?
Absolutely! If it hasn't been done before and it improves our community, then consider it done.
But can you build an indicator or strategy for me and only me?
Citing the house rules, I cannot solicit for any purpose. So saying "PM me" would be a grievous violation of said rules, obviously.
Enhanced Exponential Deviation Bands - Vitali ApirineEverybody has heard of Bollinger banding right? Well, if you are looking for those, you have come to the wrong place. This is something very similar though! These are "Enhanced Exponential Deviation Bands" in the overlay panel employing PSv4.0, originally devised by Vitali Apirine for an article in TASC - July of 2019 Traders Tips. This indicator is freely available for all members to use.
The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section if you do have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members, I may implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
NoScoobies Bollinger BandsBollinger Bands strategy that I am trying out, however I can't get my strategy.close to work. Looking for help.
Minkowski Distance Period Linear Regression BandsHello, this script was created by using Linear Regression Bands Function with variable Function Minkowski Distance Adaptive Period.
Function Linear Regression Bands :
Minkowski Distance Function Original Script by RicardoSantos :
Functions saved from overloads . And suitable for mutable variable periods.
Regards.
SFL ATR BandsMany traders use ATR as a way to determine stop loss placement. It usually works like this:
- Stop loss for a short trade = high of last candle + ATR value
- Stop loss for a long trade = low of last candle – ATR value
This is an indicator that allows you to do just that: it gives you an easy way to view current and historical volatility using ATR-based price bands .
Features
The indicator is configurable with the following settings:
ATR period
ATR multiplier
ATR applied to highs/lows OR the close price
Bands offset
Only show for the last X candles
How To Use This Indicator
Since this indicator shows average volatility bands, it is a good measure of how much the price moves. So we can use ATR bands in a number of ways:
it’s an easy way to see where you can place your stop loss
you can use a multiple of ATR as your trade target
you can trail your stops alongside the ATR bands
EMA Deviation #1Useful for finding reversal points or as a signal to take profit
Would not recommend higher ma settings.
Exponential Deviation Bands [ChuckBanger]This is Exponential Deviation Bands. It is a price band indicator based on exponential deviation rather than the more traditional standard deviation, as you find in the well-known Bollinger Bands calculation. As compared to standard deviation bands, exponential deviation bands apply more weight to recent data and generate fewer breakouts. There fore it is a much better tool to identifying trends.
One strategy on the daily can be
Buy next bar if closing price crosses below the lower bands
Sell if price is equal to the current value of the upper bands
Ehlers Fractal Adaptive Moving Average with Bands [Bitcoinduke]FRAMA – What is it?
Fractal Adaptive Moving Average Technical Indicator ( FRAMA ) was developed by John Ehlers, code was implemented by TradingView user Shizaru. I've updated it to Pine Script 4 and added Bands Extension.
This indicator is constructed based on the algorithm of the Exponential Moving Average , in which the smoothing factor is calculated based on the current fractal dimension of the price series.
Advantages:
possibility to follow strong trend movements
determine moments of price consolidation ( FRAMA sufficiently slow down at these moments)
FRAMA + Bands
The FRAMA serves as a base for the Upper and Lower Bands which are used as a way to measure volatility by observing the relationship between the Bands and price. Typically the Upper and Lower Bands are set to two standard deviations away from the FRAMA ; however it should be adjusted depending on the task.
Cuban's Reversion BandsThere are quite a few band indicators out there, ATR, VWAP, Bollinger, Fib, etc. however, I could never find anything that could scale accurately during periods of high volatility. That brought me to writing this indicator.
These bands use my Volume-Weighted Anchored Trend (VWAT) for the basis and highlight the standard deviation that you might expect high probability reversals to occur from.
I use these bands in my own trading system. The default settings are quite effective but you're able to modify the std multiplier within the settings as you see fit.
Generally, I would only play reversals during a ranging environment, however even if the market is trending, these bands will assist in spotting a weakening trend.
An ideal trend reversal would be a wick into the outer band, followed shortly by a weaker sweep of the previous move and wicking the inner band.
Hopefully you'll find this useful in your trading!
Godemode Custom BandsCustom band indicator that relies on secret sauce and generates a mid line, and upper line and a bottom line. Used for crypto markets and other markets. Want more description? Contact me. Private indicator for use for a few people. Access will most likely not be given.
Bollinger Bands Trend Model-BuschiEnglish
In general, Bollinger Bands are used as an indicator to visualize the "reversion to the mean". However, in this model, by using smaller variable values (default: 10 time intervals instead of 20, 1 standard deviation instead of 2), they are used as an trend following indicator. Two consecutive closes above the upper band form a buy signal (symbol 'B' above bar) which is reversed by two consecutive closes below the lower band (symbol 'S' under bar) and vice versa. The corresponding buying (green) and selling (red) zones are coloured between the bands.
Deutsch
Im Allgemeinen werden Bollinger-Bänder als ein Indikator verwendet, um die "Rückkehr zum Mittelwert" zu visualisieren. In diesem Modell werden sie durch kleine Variablen-Werte (Standardwert: 10 Zeitintervalle anstatt 20, 1 Standardabweichung anstatt 2) jedoch als Trendfolge-Indikator verwendet. Zwei aufeinanderfolgende Schlusskurse über dem oberen Band (Symbol 'B' über dem Balken) bilden ein Kaufsignal, das durch zwei aufeinanderfolgende Schlusskurse unter dem unteren Band (Symbol 'S' unter Balken) umgekehrt wird. Gleiches gilt umgekehrt. Die entsprechenden Kauf-Zonen (grün) und Verkauf-Zonen (rot) werden zwischen den Bändern eingefärbt.
Fibonacci BandsFibonacci Bands are derived from Fibonacci ratios expansion from a fixed moving average.
These bands help traders find key areas of support and resistance . "Fibonacci bands" are
computed by adding a Fibonacci ratio distance (Up and Down) from a "key moving" average
(21, 34, 89 periods). An 8 period average of "True range" is computed. The multiples of
Fibonacci ratios of this range are added to the fixed moving average to compute Fibonacci
Bands
One of the best ways to find trend reversals is to watch the price action near the extreme bands
(both lower and higher). Markets tend to reverse when prices trade outside of the band for a
few bars and again trade inside the bands. After reversals, markets also tend to trade from one
extreme band to the other end (opposite) of the extreme bands.
Variable Index Dynamic Average (VIDYA) BandsThis adds volatility bands to the Variable Index Dynamic Average (VIDYA). The bands are calculated using the exponential moving average of the standard deviation of the VIDYA.
Thanks to everget for programming the VIDYA for tradingview.