OPEN-SOURCE SCRIPT
SuperTrend BB Strategy [STB]

█ OVERVIEW
SuperTrend BB Filter Strategy [STB] combines a standard SuperTrend with a Bollinger Bands SMA filter to reduce false signals in choppy markets.
The core idea is simple — use the BB midline (SMA) to confirm trend direction first, then take SuperTrend signals only in that direction.
█ HOW IT WORKS
SuperTrend generates BUY/SELL signals based on ATR-derived trend lines. On its own, it tends to get whipsawed in ranging conditions.
Bollinger Bands midline (SMA) acts as a trend filter:
• Price above BB midline → long signals only
• Price below BB midline → short signals only
This filters out a large portion of counter-trend noise.
█ ENTRY / EXIT CONDITIONS
Long Entry
• SuperTrend flips bullish (direction change)
• Close is above the BB midline (SMA)
Short Entry
• SuperTrend flips bearish (direction change)
• Close is below the BB midline (SMA)
Stop Loss : ATR(14) × multiplier from entry price
Take Profit: SL distance × Risk/Reward ratio
All signals trigger on confirmed bars only.
█ DEFAULT SETTINGS
SuperTrend
• ATR Length : 10
• Multiplier : 3.0
Bollinger Bands
• BB Length (SMA Filter) : 50
• BB Multiplier : 2.0
Risk Management
• Stop Loss ATR Multiplier : 1.5
• Risk/Reward Ratio : 1.5
█ ALERTS
Three alert conditions are available:
• STB BUY/SELL — triggers on either signal (saves one alert slot)
• STB BUY — long signal only
• STB SELL — short signal only
Alert messages include ticker and timeframe automatically.
█ NOTES
— This strategy is a fully original implementation.
No external scripts or third-party code were used.
— Backtested with commission 0.05%. Adjust in the Properties tab to match your broker.
— Performed well on XAUUSD (Gold) Daily and Weekly timeframes in backtests.
— Results vary by symbol and timeframe. Always verify on your target pair before live trading.
— For better accuracy, confirm trend direction on a higher timeframe before entering on your target timeframe.
SuperTrend BB Filter Strategy [STB] combines a standard SuperTrend with a Bollinger Bands SMA filter to reduce false signals in choppy markets.
The core idea is simple — use the BB midline (SMA) to confirm trend direction first, then take SuperTrend signals only in that direction.
█ HOW IT WORKS
SuperTrend generates BUY/SELL signals based on ATR-derived trend lines. On its own, it tends to get whipsawed in ranging conditions.
Bollinger Bands midline (SMA) acts as a trend filter:
• Price above BB midline → long signals only
• Price below BB midline → short signals only
This filters out a large portion of counter-trend noise.
█ ENTRY / EXIT CONDITIONS
Long Entry
• SuperTrend flips bullish (direction change)
• Close is above the BB midline (SMA)
Short Entry
• SuperTrend flips bearish (direction change)
• Close is below the BB midline (SMA)
Stop Loss : ATR(14) × multiplier from entry price
Take Profit: SL distance × Risk/Reward ratio
All signals trigger on confirmed bars only.
█ DEFAULT SETTINGS
SuperTrend
• ATR Length : 10
• Multiplier : 3.0
Bollinger Bands
• BB Length (SMA Filter) : 50
• BB Multiplier : 2.0
Risk Management
• Stop Loss ATR Multiplier : 1.5
• Risk/Reward Ratio : 1.5
█ ALERTS
Three alert conditions are available:
• STB BUY/SELL — triggers on either signal (saves one alert slot)
• STB BUY — long signal only
• STB SELL — short signal only
Alert messages include ticker and timeframe automatically.
█ NOTES
— This strategy is a fully original implementation.
No external scripts or third-party code were used.
— Backtested with commission 0.05%. Adjust in the Properties tab to match your broker.
— Performed well on XAUUSD (Gold) Daily and Weekly timeframes in backtests.
— Results vary by symbol and timeframe. Always verify on your target pair before live trading.
— For better accuracy, confirm trend direction on a higher timeframe before entering on your target timeframe.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.