What problem this strategy targets
Buying every lower-band touch fails in downtrends. Bollinger Bands Enhanced Strategy only goes long when price stays above EMA 200 while the low reaches the lower band, then manages risk with ATR stops and an ATR-armed trailing take-profit.
Pine v5 strategy(). Author showcase: BINANCE:BTCUSDT, 4h. Bot webhook placeholders (sourceUuid/secretToken) must not be filled with real secrets on shared charts.

Logic overview
Bands: SMA(close,20) ± StdDev*stdev. Filter EMA(close,200). ATR(14) for stop and trailing activation.
Entries
- Long only: low > filterEMA and low <= lower.
- Inside the Trade Start/Stop window.
- strategy.entry("entry1", strategy.long) with optional JSON alert_message for bots.
Exits, stops, take-profit, sizing
- ATR stop default 1.75×ATR.
- Trailing take-profit arms near 2.25×ATR; basis used as a profit reference in code.
- default_qty_type = percent_of_equity.
- No short entries.
Parameters (source defaults)
| Input | Default | Role |
|---|---|---|
| StdDev | 2.0 | Band width multiplier |
| ATR stop loss | 1.75 | Stop distance in ATR |
| ATR Trailing profit activation | 2.25 | Trail arm threshold |
| EMA filter | 200 (hardcoded) | Longs require low above EMA |
| BB length | 20 (hardcoded) | SMA/stdev window |
| sourceUuid / secretToken | placeholders | Bot webhook; leave blank if unused |
Markets, timeframes, limits
- Author showcase: BTCUSDT 4h. Other settings unverified.
- Long-only; may idle or struggle in bear trends.
- Default backtest window ends 2025-01-01 — update inputs if needed.
- Repaint and webhook delivery not tested by Coinpred.
TradingView setup guide
- Download the .pine file from Coinpred (membership required; see below) or compare with the original publication page.
- Open TradingView → Pine Editor, create a blank script, paste the full source, then save.
- Click Add to chart. Confirm it is a strategy() script so the Strategy Tester is available.
- Review defaults in the Inputs panel using the parameter table below, then tune for your symbol and timeframe.
- Inspect signals in the Strategy Tester before wiring alerts. Historical curves are not a promise of future results.
Verification and backtests
Download rights and version notes
- Author: Skyrexio; original title: Bollinger Bands Enhanced Strategy; version: 1.0 (pine-facade).
- License: MPL 2.0; Coinpred ships the unmodified full source file.
- Original page: https://www.tradingview.com/script/V4B5nKIx-Bollinger-Bands-Enhanced-Strategy/
- Pine version: v5; type: strategy().
- Charts are author showcase images; image rights are outside MPL and captions are labeled accordingly.
- Downloads follow Coinpred membership rules; modified source files must remain under MPL 2.0.