Risk Reduction Ultimate TemplateThis is a template not actually meant for trading. I picked two random oscillators. This is a template meant to turn into a live trading strategy, however.
It's literally just a specialized take profit/stop loss system. It is to ensure your bot doesn't make any bad moves that you wouldn't have manually. The code should be pretty well annotated. Putting this into my scripts has made them much better. I will work on a Multiple Trigger template next.
ボリンジャーバンド (BB)
Z-Score of RSIA way to see whether RSI is overbought or oversold inside its Bollinger Bands in the form of an oscillator. Z-score tells you how far the data is from the mean in terms of standard deviations. The numbers shown in the indicator are the number of standard deviations away from the average or mean. Like Bollinger Bands, if it is above the standard deviation border lines then it is considered to be outside the distribution or Bollinger Band. If it is above the upper border line then is it is overbought, if it is below the lower border line then is is oversold.
Example of how standard deviation works: 1 standard deviation contains 68% of the data, 2 SD (the default for BB) contains 95% of data, 3 SD for 99%, etc. If the data goes past that, it is considered to be outside the distribution. In statistics, data that is within the distribution is considered to be "significant".
The z-score line is colored green if it is above zero and red if it is below zero. Above zero means that the RSI is above the average line or the middle line of the Bollinger Bands, and vice-versa if it is below. A red vertical bar is shown when the the z-score is above the upper border line to show that it is overbought and a green vertical bar is shown when the z-score is below the lower border line to show that it is oversold. This is the equivalent of when the RSI is above and below its Bollinger Bands.
Flawless Victory Strategy - 15min BTC Machine Learning StrategyHello everyone, I am a heavy Python programmer bringing machine learning to TradingView. This 15 minute Bitcoin Long strategy was created using a machine learning library and 1 year of historical data in Python. Every parameter is hyper optimized to bring you the most profitable buy and sell signals for Bitcoin on the 15min chart. The historical Bitcoin data was gathered from Binance API, in case you want to know the best exchange to use this long strategy. It is a simple Bollinger Band and RSI strategy with two versions included in the tradingview settings. The first version has a Sharpe Ratio of 7.5 which is amazing, and the second version includes the best stop loss and take profit positions with a Sharpe Ratio of 2.5 . Let me talk a little bit more about how the strategy works. The buy signal is triggered when close price is less than lower Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. The sell signal is triggered when close price is greater than upper Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. What makes this strategy interesting is the parameters the Machine Learning library found when backtesting for the best Sharpe Ratio. I left my computer on for about 28 hours to fully backtest 5000 EPOCHS and get the results. I was able to create a great strategy that might be one of TradingView's best strategies out on the website today. I will continue to apply machine learning to all my strategies from here on forward. Please Let me know if you have any questions or certain strategies you would like me to hyper optimize for you. I'm always willing to create profitable strategies!
P.S. You can always pyramid this strategy for more gains! I just don't add pyramiding when creating my strategies because I want to show you the true win/loss ratio based buying one time and one selling one time. I feel like when creating a strategy that includes pyramiding right off the bat falsifies the win rate. This is my way of being transparent with you all. Have fun trading!
Bollinger bubble | Forex editionBollinger bubble is an edition for forex market. Work better en JPY pairs.
We buy when a candle open & close outside the lower bollingers band and we target the last highest point on the last 10 candles.
And we sell when a candle open & close outside the higher bollingers band we the target the last lowest point on the last 10 candles.
Bollinger bubble | Stock EditionBollinger bubble is an edition for market like CAC40, DJ30, ..
The market are uptrend with the inflation, this edition only buy (you have less risk then sell)
We buy when a candle open & close outside the lower bollingers band and we target the last highest point on the last 10 candles.
atr_channelThe original bollinger bands have a fixed deviation of 2%, this channel calculates the ATR % (Atr Percentage) and places the upper and lower bands
Bollinger Band with RSI
Using combination bollinger band and RSI indicator as guide to predict price volatility and the best entry point. The strategy logic is pretty straightforward where we're interested with close price that touches the lower bollinger band ; there are only two scenarios that will happened after the price reaches the lower band; the price might rebound from the lower bollinger band or drop lower and continue downtrend. To confirm the price movement, we use a second indicator which is the RSI to further investigate the price trend. For example, if the price reaches the lower bollinger band but the RSI value is not in the oversold region, we can conclude that the price will go lower and continue downtrend. If the RSI value is in the oversold region, we can use this price area as our entry point.
Stop loss is necessary to avoid losing too much capital if the RSI value lingers too long in the oversold region.
Best take profit area is when the price rebound above the middle bollinger band area/upper bollinger band or when the RSI reaches overbought region; whichever comes first.
Long entry:
RSI < 30 & close price < lower bollinger band
Exit entry:
RSI > 70
Default stop loss: -25%
Cosmic Bands4 Bollinger Band channels with StdDev mult values of 1, 2, 4, and 4.5 (the last value can be changed in the indicator's settings).
Often shows better correlation with the log setting on.
Squeeze Momentum Indicator v4_pine [By Lazy Bear]This is the famous Squeeze Momentum Indicator made by @LazyBear in v4 version if someone wants to test some strategies, as the original code was in v2 version the code converter couldn't convert to v4.
Bollinger Bands With Squeeze [Nic]Bollinger bands with color indicators to detect two key scenarios :
- The squeeze (yellow) detects a potential breakout (or down) in price volatility.
- The extreme overbought / over sold conditions. This happens during a 'band ride'.
"There is nothing more beautiful than when a stock becomes overbought, and stays overbought" - John Bollinger
Bollinger Bands - Custom moving averageFormula for bollinger bands is as below:
Mid = sma(20)
Top = sma(20) + 2*StdDev(20)
Bottom = sma(20) - 2*StdDev(20)
While standard bollinger bands allow changing standard deviation and length, there is no option to use different moving average.
This indicator allows you to define bollinger bands based on different moving average types which can be selected from input.
LAGging span leaves Bollinger Bands strategyAbstract
This script points out the positions a lagging span leaves a Bollinger Band.
This script does not plot a lagging span but moves the Bollinger Band forward.
You can find profit opportunities by combining this script and risk management.
Introduction
Bollinger Bands is a popular indicator.
It contains a moving average, an upper band and a lower band.
The moving average can indicate trend, the upper band and the lower band can indicate if the price is far away from the moving average.
However, in trading markets, anything can happen.
Both continuation and reversal are possible when the price touches the moving average, the upper band or the lower band.
Therefore, many traders adjust the parameters of the Bollinder Band or add other indicators to improve their trading strategies.
@Daveatt et. al. provided an idea that uses a lagging span.
A lagging span is a line chart. It displays the reference price but in earlier time.
For example, if the offset of a lagging span is 26 days, the value of the lagging span on 29 days ago is the reference price 3 days ago.
A lagging span is a part of Ichimoku Cloud.
It can compare the price to the earlier price and the values of indicators in the past.
To compare the price to the values of indicators in the past, we can also shift indicators forward instead of adding a lagging span into the chart.
This script uses shift-the-indicators-forward method.
In other words, this script plots the Bollinger Band forward so that the price can be compared to the values of the Bollinger Band in the past.
Computing and Adjusting
(1) Compute Moving Average
(2) Compute Standard Derivation
(3) Upper Band = Moving Average + Standard Derivation * Multi
(4) Lower Band = Moving Average - Standard Derivation * Multi
(5) Shift the Bollinger Band forward according to the offset parameter.
(6) Mark the points the price leaves the shifted Bollinger Band
(7) Compute the most possible loss and profit before the next opposite signal.
Parameters
source : the data for computing the bollinger band. can be open, high, low, close or their combination.
length : how many days are calculated by the bollinger band
mult : the distance from the moving average to the upper band and the distance from the moving average to the upper band is equal to ( mult * standard derivation ) .
x_offset : the offset of the lagging span
Conclusion
This script can find signals for potential breakout or trend continuation.
If you want to use this signal well, you need to know when to cut loss and protect the profit.
Reference
@Daveatt , Bollinger bands/Lagging span cross , BGyrPgOA , Tradingview 2019
How to trade with Bollinger Bands
How to use Ichimoku Cloud
How to trade with a line chart
Squeeze Momentum Signal Overlay [GN]Companion script for Squeeze Momentum Indicator that plots the signal on chart.
Bitcoin Bubble Strength IndexFor those who interested, here is a Bitcoin Strength Index source code. I used it on weekly chart with params (close,28). And only with Bitcoin . And only during bull run. It shows how far price went off the particular moving average during bubble run (i.e. being above BB). Weekly MA 28 is approximately daily ma 200.
The physical meaning of this indicator is to show current bull rally "speed".
Bollinger bands % Sideways indicatorDetect sideways markets (green background) vs. trending markets (red background) with this indicator. It makes use of the Bollinger bands % as its base.
Fancy Bollinger Bands Strategy [BigBitsIO]This script is for a Bollinger Band type indicator with built-in TradingView strategy including as many features as I can possibly fit into a Bollinger Band type indicator including a wide variety of options to create the most flexible Bollinger Bands strategy possible.
Features:
- A single custom moving average serving as the middle band.
- Standard MA inputs.
- MA type.
- MA period.
- MA price.
- MA resolution (time frame).
- Visibility toggle.
- MA Candle Type
- Fancy MA inputs.
- Toggle to show only candles included in the MA calculation ("Highlight inclusion") or display entire MA history.
- Toggle to show a ghost trail when Highlight inclusion is toggled on. Displays a shaded version of past MA history before the inclusion period (as seen on snapshot).
- Toggle to show forecast values for the MA.
- Other inputs related to forecasting:
- Forecast bias. (Neutral forecasts MA if the current price remains the same.)
- Forecast period.
- Forecast magnitude.
- Toggle showing details on the screen
- Toggle the visibility of the fill between the upper and lower bands.
- Toggle to use ATR instead of the standard deviation to calculate the location of the upper and lower bands.
- Custom input for the ATR period.
Strategy Features
-Strategy Window - only test during this window
-Take Profit and Stop Loss
-Open and Close conditions, including condition counts and any/all requirements
-Many conditions to choose from that can either be selected to open, close or open and close a position
-Conditions include:
-Price crossing above/below the Upper, Middle, or Lower bands
-Price being above/below the Upper, Middle, or Lower bands
-Bollinger Band width crossing or being above/below custom values
-Percent B crossing or being above/below custom values
This script may contain errors, or out of date code. Please be mindful of updates to the script.
*** DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB. ***
Advanced Bollinger Bands StrategyAdvanced Bollinger Bands Strategy
Why is it an advanced Bollinger Bands Strategy?
The purpose of Bollinger Bands is to provide a relative definition of high and low prices of a market. By definition, prices are high at the upper band and low at the lower band. This definition can aid in rigorous pattern recognition and is useful in comparing price action to the action of indicators to arrive at systematic trading decisions. Adding a Moving Average filter which only allows trades if MA and Price are outside of the BB increases the probability of profitable trades with the sacrifice of a lower trade-frequency.
Inputs for Bollinger Bands
-> BB Source
-> BB Length
-> BB Multiplier
-> Moving Average Period
-> Moving Average Source
-> Strategy Condition Options:
-> Exit Trades if Price crosses Basis Line
-> Enable Moving Average Filter
RSI + Kijun/Standard Deviation on RSIThe script is inspired by Bollinger bands but instead of applying them on the price, they are applied on a RSI oscillator. The standard deviation is not plotted against the average like in normal BBs but instead is based on median values (equivalent of a Kijun in Ichimoku ). The goal is to better identify excess in prices that offer good entering points. The usage of a median provides a clearer view of ranging market (ie. the line will be flat).
I use it for long-term investments on stocks to find "fair" entry points. After picking a list of stocks of interest based on fundamentals, I switch to a weekly view. If the stock RSI is under the bands, it indicates that we are in favorable conditions for a buy. For an accurate timing, you can switch to the daily chart and watch out for either a break or a reintegration in the bands. This is your signal.
Relative Channel BandwidthThis indicator uses different volatility channels - Bollinger Band, Donchian Channel and Keltner Channel width to measure volatility.
Indicator plots channel bandwidth percentage with respect to close price.
This is not same as Bollinger Percent B - which is measure of where price is with respect to band. Instead this indicator is similar to ATR Percent indicator published here:
Plotting is color coded to indicate volatility zone:
Red : Extreme volatility
Orange : High volatility
Lime : Low volatility
Green : Extreme low volatility
These levels are again derived by long period bollinger bands
Adoptive Supertrend - BandsAnother adoption of supertrend. This time based on different channels - Bollinger Band, Keltner Channel, Donchian Channel and Pivot point based Donchian channel.
When price hits top of bands, it is considered as start or continuation of uptrend. When price hits bottom of the band it is considered as start or continuation of downtrend. Hence, supertrend is drawn based on these calculations. Use ATR Periods and ATR Multiplier to create stops certain ATR away from band's top and bottom.
Other supertrend adoptions published are here:
Pivot point based donchian channel is published here:
Modified Smoothed Heiken AshiThis code is based on Smoothed HA candle which will work on all chart types
condition for BUY:
1. When close crosses Smoothed HA
2.Close should be in side upper band
3.BBW must be greater than the average
vice versa for sell
this code takes data from HA chart so that it can be applied on all chart type.
Bollinger band and Bollinger band width conditions added for removal of unwanted signals
Alert added so that you can apply alert and check it in real time performance
thanks to The Secret Mindset You tube channel from where I got the idea to convert this into a pine script indicator
smooth HA taken from "Smoothed Heiken Ashi Candles v1" at //@jackvmk