OPEN-SOURCE SCRIPT

Full Candle Outside BB [Bishnu103]

Updated
Bollinger band defines volatility range based on the current market condition. If a full candle is created outside BB then it is highly volatile and it may reverse to the mean, i.e. middle BB.

Buy - when a green candle is created below lower BB (alert candle) and price goes above high of it.
Buy SL - low of alert candle
Target 1 - middle band
Target 2- upper band

Sell - when a red candle is cerated above upper BB (alert candle) and price goes below low of it
Sell SL - high of alert candle
Target 1 - middle band
Target 2 - lower band

************************************************************************************************************************************************************************************
Disclaimer: This is in-progress strategy. I plan to work further and improve this. So please use this in the live market very carefully and based on your own risk factors.
************************************************************************************************************************************************************************************
Release Notes
There was an issue with intraday exit feature due to which it was not working on timeframes other than 15 min. Now it is resolved. It should work fine now for minutes and hourly timeframes if exit intraday option is marked.
Release Notes
1. Added a control "Risk Limit (%)" to limit entries if SL is more than the defined risk %.
2. Fixed an issue with the control to define "Entry Distance From Alert".
3. Fixed an issue which was causing multiple exists due to pending orders not being cancelled.

Upcoming feature:
1. Improved exit rule - 50% quantity will exit at middle band and remaining 50% will exit at upper/ lower band.
Release Notes
Exit enhanced -
1. Target options given -
(a) BB - 50% quantity will be booked at middle BB and rest of it will be booked at outer BB.
(b) Profit % - A target percenage mentioned in the box "Profit %" will be used to exit the full trade.

Happy trading!
Bollinger Bands (BB)Volatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer