Bollinger Bands - Breakout StrategyThe Bollinger Bands - Breakout Strategy is a trend-following optimized for short-term trading in the crypto market. This strategy employs the Bollinger Bands, a widely recognized technical indicator, as its primary instrument for pinpointing potential trades. It is capable of executing both long and short positions, depending on whether the market is in a spot or futures, and is particularly effective in trending markets.
The strategy boasts a high degree of configurability, allowing users to set the Bollinger Bands period and deviation, trend filter, volatility filter, trade direction filter, rate of change filter, and date filter. Furthermore, it offers options for Take Profit, Stop Loss, and Trailing Stop for both long and short positions, ensuring a comprehensive risk management approach. The inclusion of a maximum intraday loss feature adds another layer of protection, making this strategy a valuable tool for traders seeking a professional and adaptable trading system.
Name : Bollinger Bands - Breakout Strategy
Category : Trend Follower based on Bollinger Bands
Operating mode : Long and Short on Futures or Long on Spot
Trade duration : Intraday
Timeframe : 2H, 3H, 4H, 5H
Market : Crypto
Suggested usage : Trending Markets
Entry : When the price crosses above or below the Bollinger Bands
Exit : Opposite Cross or Profit target, Trailing stop or Stop loss
Configuration :
- Bollinger Bands period and deviation
- Trend Filter
- Volatility Filter
- Trade direction filter
- Rate of Change filter
- Date Filter (for backtesting purposes)
- Take Profit, Stop Loss and Trailing Stop for long and short positions
- Risk Management: Max Intraday Loss
Backtesting :
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT.P
⁃ Timeframe: 4H
⁃ Fee: 0.025%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start : 2019-09-19 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
Credits :
- LucF of Pine Coders for f_security function to avoid repainting using security.
- QuantNomad for Monthly Table.
Disclaimer : Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas!
Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
Bands
Flying Dragon Trend StrategyFlying Dragon Trend Strategy can be used to indicate the trend on all timeframes by finetuning the input settings.
The Flying Dragon Trend family includes both the strategy and the indicator, where the strategy supports of selecting the optimal set of inputs for the indicator in each scenario. Highly recommended to get familiar with the strategy first to get the best out of the indicator.
Flying Dragon Trend plots the trend bands into the ribbon, where the colours indicate the trend of each band. The plotting of the bands can be turned off in the input settings. Based on the user selectable Risk Level the strategy is executed when the price crosses the certain moving average line, or at the Lowest risk level all the bands have the same colour.
The main idea is to combine two different moving averages to cross each other at the possible trend pivot point, but trying to avoid any short term bounces to affect the trend indication. The ingenuity resides in the combination of selected moving average types, lengths and especially the offsets. The trend bands give visual hint for the user while observing the price interaction with the bands, one could say that when "the Dragon swallows the candles the jaws wide open", then there is high possibility for the pivot. The leading moving average should be fast while the lagging moving average should be, well, lagging behind the leading one. There is Offset selections for each moving average, three for leading one and one for the lagging one, those are where the magic happens. After user has selected preferred moving average types and lengths, by tuning each offset the optimal sweet spot for each timeframe and equity will be found. The default values are good enough starting points for longer (4h and up) timeframes, but shorter timeframes (minutes to hours) require different combination of settings, some hints are provided in tooltips. Basically the slower the "leading" moving average (like HMA75 or HMA115) and quicker the "lagging" moving average (like SMA12 or SMA5) become, the better performance at the Lowest risk level on minute scales. This "reversed" approach at the minute scales is shown also as reversed colour for the "lagging" moving average trend band, which seems to make it work surprisingly well.
The Flying Dragon Trend does not necessarily work well on zig zag and range bounce scenarios without additional finetuning of the input settings to fit the current condition.
Strategy direction selector by DashTrader.
Extended Recursive Bands StrategyThe original indicator was created by alexgrover .
All credit goes to alexgrover for creating the indicator that this strategy uses.
This strategy was posted because there were multiple requests for it, and no strategy based on this indicator exists yet.
The Recursive Bands Indicator, an indicator specially created to be extremely efficient, I think you already know that calculation time is extra important in algorithmic trading, and this is the principal motivation for the creation of the proposed indicator. Originally described in Alex's paper "Pierrefeu, Alex (2019): Recursive Bands - A New Indicator For Technical Analysis", the indicator framework has been widely used in his previous uploaded indicators, however it would have been a shame to not upload it, however user experience being a major concern for me, I decided to add extra options, which explain the term "extended".
The Indicator
The indicator displays one upper and one lower band, every common usages applied to bands indicators such as support/resistance , breakout, trailing stop, etc, can also be applied to this one. Length controls how reactive the bands are, higher values will make the bands cross the price less often.
In order to provide more flexibility for the user alexgrover added the option to use various methods for the calculation of the indicator, therefore the indicator can use the average true range , standard deviation, average high-low range, and one totally exclusive method specially designed for this indicator.
Added logic:
We have implemented a logic that checks whether the bands have been following in the same direction for a set amount of bars. This logic must be true before it can enter trades. This is completely new code that was written by us entirely, and it makes a huge difference on strategy performance.
Strategy Long conditions:
1 — Price low is below the the lower band.
2 — The lower band keeps increasing in value until the 'lookback' setting amount of bars is reached.
Strategy Short conditions:
1 — Price high is above the upper band.
2 — The upper band keeps decreasing in value until the 'lookback' setting amount of bars is reached.
Strategy Properties:
We have set a default commission of 0.06% because these are Bybit's fees. The strategy uses an order size of 10% of equity, since drawdown is very low like this. We also use a 10 tick slippage to keep results realistic and account for this. All other settings were left as default apart from initial capital, just to decrease the size of the numbers.
Rudy's BB with MartingaleMy first strategy script that uses Bollinger Bands and Martingale to increase contract size after negative profit.
BEAM DCA Strategy MonthlyThis strategy is based on BEAM bands for BTC. The space between the original BEAM bands is broken up into 10 bands representing levels of risk for investing fresh capital.
The strategy will buy bitcoin when the price is in the bottom 5 bands, increasing the amount investmented as the price approaches the 1400 D SMA.
The strategy will limit sell bitcoin when the price is in the top 5 bands, increasing the amount sold as the price approaches the upper BEAM band.
Best used on Daily timeframe and on a chart with history of price data, i.e. INDEX:BTCUSD or BITSTAMP:BTCUSD
To use the strategy:
Set start date
Set day of month to invest
Set the maximum amount to be invested on any given month
Toggle buy/sell orders
Observe the backtest
You can see how the strategy backtests via the information boxes in the bottom right.
There is also functionality to adjust the bands for diminishing returns. Note, this should be used with great skepticism, as the adjustments were made by simple function fitting and not rigorous statistical processes.
That about sums it up! As you can see, even with just a small amount of capital invested at regular intervals can lead to huge realised gains using this version of BEAM bands!
Linear Channel - Scalp Strategy 15MSimple way how to use Linear Regression for trading.
What we use:
• Linear Regression
• HMA as a trend filter
Logic:
Firstly we make simple linear regression moving. It is the white line which appears on the chart.
Then we make second line (named: band2) on the chart by multiplying linreg and value difference.
The third step is to ad HMA as a trend filter.
The trade open when price is below band2, but still upper than Hullma. The trade close when price again upper than linreg.
Combo Backtest 123 Reversal & STARC BandsThis is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
A type of technical indicator that is created by plotting two bands around
a short-term simple moving average (SMA) of an underlying asset's price.
The upper band is created by adding a value of the average true range
(ATR) - a popular indicator used by technical traders - to the moving average.
The lower band is created by subtracting a value of the ATR from the SMA.
STARC is an acronym for Stoller Average Range Channels. The indicator is
named after its creator, Manning Stoller.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & Prime Number Bands This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Determining market trends has become a science even though a high number
or people still believe it’s a gambling game. Mathematicians, technicians,
brokers and investors have worked together in developing quite several
indicators to help them better understand and forecast market movements.
The Prime Number Bands indicator was developed by Modulus Financial Engineering
Inc. This indicator is charted by indentifying the highest and lowest prime number
in the neighborhood and plotting the two series as a band.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & High Low Bands This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
As the name suggests, High low bands are two bands surrounding the underlying’s
price. These bands are generated from the triangular moving averages calculated
from the underlying’s price. The triangular moving average is, in turn, shifted
up and down by a fixed percentage. The bands, thus formed, are termed as High
low bands. The main theme and concept of High low bands is based upon the triangular
moving average.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & Fractal Chaos Bands This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Stock market moves in a highly chaotic way, but at a larger scale, the movements
follow a certain pattern that can be applied to shorter or longer periods of time
and we can use Fractal Chaos Bands Indicator to identify those patterns. Basically,
the Fractal Chaos Bands Indicator helps us to identify whether the stock market is
trending or not. When a market is trending, the bands will have a slope and if market
is not trending the bands will flatten out. As the slope of the bands decreases, it
signifies that the market is choppy, insecure and variable. As the graph becomes more
and more abrupt, be it going up or down, the significance is that the market becomes
trendy, or stable. Fractal Chaos Bands Indicator is used similarly to other bands-indicator
(Bollinger bands for instance), offering trading opportunities when price moves above or
under the fractal lines.
The FCB indicator looks back in time depending on the number of time periods trader selected
to plot the indicator. The upper fractal line is made by plotting stock price highs and the
lower fractal line is made by plotting stock price lows. Essentially, the Fractal Chaos Bands
show an overall panorama of the price movement, as they filter out the insignificant fluctuations
of the stock price.
WARNING:
- For purpose educate only
- This script to change bars colors.
Setup Trend Following Bollinger Bands - ValenteBuy when the candle closes above upper BB
Sell when the candle closes bellow lower BB
Stop always on base line
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.
NoScoobies Bollinger BandsBollinger Bands strategy that I am trying out, however I can't get my strategy.close to work. Looking for help.
Percentage BandsA different version of bollinger bands, I use percentage difference instead of standard deviation.
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.
Fractal Chaos Bands Backtest The FCB indicator looks back in time depending on the number of time periods trader selected
to plot the indicator. The upper fractal line is made by plotting stock price highs and the
lower fractal line is made by plotting stock price lows. Essentially, the Fractal Chaos Bands
show an overall panorama of the price movement, as they filter out the insignificant fluctuations
of the stock price.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.