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.

- 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. ***
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
Like and follow!

💻 Website:
📺 YouTube:
🎮 Discord:
🐦 Twitter:
💸 Save $30 on TradingView Paid Plan:


what a tremendous effort - thank you for sharing !!
+3 Reply
thanks for sharing - adding this to the chart produces no data or markings. It doesn't say errors or anything. Is there something that needs to be done differently?
+2 Reply
Don-Pedros atomicstorm13
@atomicstorm13, Yes modify the input settings. It works!
+1 Reply
simonebinaghi Don-Pedros
@Don-Pedros, Hi, it does not work even if you change the inputs.
+2 Reply
@Don-Pedros, how? where?
BigBitsIO atomicstorm13
@atomicstorm13, You have to understand how to modify the inputs. There is no "default" strategy. Have at least 1 condition set to Long Open and one to Long Close.
+3 Reply
@BigBitsIO, where? in the code?
+1 Reply
oh my god, dude, you could have set up some default values working parameters to make everyone's life easier....instead of wasting my time to find the parameter I have to enable in the middle of the other 50 parameters... "you had one job..."
+1 Reply
BigBitsIO remotecollision
@remotecollision, No, the whole point is users are to configure their own strategy with the options provided.
thank you ill test
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out