OPEN-SOURCE SCRIPT
MTF Bollinger Bands Trend Stop

Overview:
The "MTF Bollinger Bands Trend Stop" is an overlay indicator that uses multi-timeframe (MTF) Bollinger Bands to identify trends and provide dynamic stop levels. It helps traders follow trends and spot potential reversals by plotting a trend-following stop line and marking key breakout points on the chart.
Key Features:
Multi-Timeframe Analysis: Calculates Bollinger Bands on a user-defined higher timeframe (e.g., 1H, 4H) while overlaying them on your current chart.
Trend Detection: Determines trend direction (up or down) based on price crossing the upper or lower Bollinger Bands.
Dynamic Stop Line: Plots a stop level that adjusts with the trend, using a buffer based on a "Money Risk" factor.
Reversal Signals: Highlights trend changes with coloured circles when price crosses the buffered bands.
How It Works:
Inputs:
Resolution: Choose the timeframe for calculations (e.g., "60" for 1-hour).
Period (20): Length of the moving average for Bollinger Bands.
Standard Deviation (2): Width of the bands.
Money Risk (1.0): Adjusts the buffer size around the bands (higher values widen the buffer).
Calculations:
Computes Bollinger Bands (middle, upper, lower) on the selected timeframe.
Trend is set to +1 (up) if price crosses above the upper band, or -1 (down) if below the lower band.
Bands are adjusted to prevent retracing against the trend, and a buffer is added based on Money Risk.
Output:
Stop Line: A cross-style line shows the stop level—blue (uptrend, lower band) or purple (downtrend, upper band).
Trend Change Signals: Blue circles mark uptrend starts (price crosses above upper band), purple circles mark downtrend starts (price crosses below lower band).
How to Use:
Add the indicator to your chart and set the desired timeframe (e.g., "240" for 4H).
Watch the stop line: In an uptrend, it tracks below price as a trailing stop; in a downtrend, it sits above price.
Look for circles to signal potential trend shifts—blue for bullish, purple for bearish.
Adjust "Money Risk" to widen/tighten the stop buffer based on your risk tolerance.
Practical Application:
Use as a trailing stop to lock in profits during strong trends.
Combine with other indicators to confirm reversals signalled by the circles.
Best suited for trending markets; test on your preferred timeframe and asset.
The "MTF Bollinger Bands Trend Stop" is an overlay indicator that uses multi-timeframe (MTF) Bollinger Bands to identify trends and provide dynamic stop levels. It helps traders follow trends and spot potential reversals by plotting a trend-following stop line and marking key breakout points on the chart.
Key Features:
Multi-Timeframe Analysis: Calculates Bollinger Bands on a user-defined higher timeframe (e.g., 1H, 4H) while overlaying them on your current chart.
Trend Detection: Determines trend direction (up or down) based on price crossing the upper or lower Bollinger Bands.
Dynamic Stop Line: Plots a stop level that adjusts with the trend, using a buffer based on a "Money Risk" factor.
Reversal Signals: Highlights trend changes with coloured circles when price crosses the buffered bands.
How It Works:
Inputs:
Resolution: Choose the timeframe for calculations (e.g., "60" for 1-hour).
Period (20): Length of the moving average for Bollinger Bands.
Standard Deviation (2): Width of the bands.
Money Risk (1.0): Adjusts the buffer size around the bands (higher values widen the buffer).
Calculations:
Computes Bollinger Bands (middle, upper, lower) on the selected timeframe.
Trend is set to +1 (up) if price crosses above the upper band, or -1 (down) if below the lower band.
Bands are adjusted to prevent retracing against the trend, and a buffer is added based on Money Risk.
Output:
Stop Line: A cross-style line shows the stop level—blue (uptrend, lower band) or purple (downtrend, upper band).
Trend Change Signals: Blue circles mark uptrend starts (price crosses above upper band), purple circles mark downtrend starts (price crosses below lower band).
How to Use:
Add the indicator to your chart and set the desired timeframe (e.g., "240" for 4H).
Watch the stop line: In an uptrend, it tracks below price as a trailing stop; in a downtrend, it sits above price.
Look for circles to signal potential trend shifts—blue for bullish, purple for bearish.
Adjust "Money Risk" to widen/tighten the stop buffer based on your risk tolerance.
Practical Application:
Use as a trailing stop to lock in profits during strong trends.
Combine with other indicators to confirm reversals signalled by the circles.
Best suited for trending markets; test on your preferred timeframe and asset.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.