Supertrend Breakout Zone
Supertrend Breakout Zone turns each Supertrend direction change into a price zone. After a bullish flip, it watches the high and low of the developing zone and buys only when price breaks above its top by the configured offset.
This separates trend recognition from entry timing: the Supertrend flip creates the context, while the later zone breakout triggers the trade.
warning
Protection is disabled by default. The strategy still calculates a stop for risk/reward sizing, but that stop cannot close a loss until STBZ_USE_PROTECTION is enabled.
Supertrend flip and zone
STBZ_ATR_LENGTH and STBZ_ATR_MULTIPLIER control Supertrend. A larger multiplier or longer ATR generally produces fewer, slower direction changes.
When Supertrend flips bullish, the strategy starts a bullish zone from that candle’s high and low. The zone grows with subsequent candles until it breaks out or another direction change replaces it.
Enable STBZ_USE_EMA_SMOOTHING to calculate Supertrend from EMA-smoothed closes. STBZ_EMA_SMOOTH_LENGTH controls that smoothing. This can reduce noisy flips, but also delays them.
Zone quality
The zone must satisfy:
- at least
STBZ_MIN_ZONE_HEIGHT_PCTof current price; - no more than
STBZ_MAX_ZONE_HEIGHT_PCT, unless that maximum is0; - no older than
STBZ_MAX_ZONE_BARS, unless that maximum is0.
Very small zones can break from ordinary noise. Very tall zones can imply an impractically wide structure stop and distant risk/reward target. Old zones may no longer describe the current market.
Breakout trigger
The bullish trigger is the zone top plus STBZ_BREAKOUT_OFFSET_PCT of the zone’s own height. This setting is not a percentage of market price.
With STBZ_REQUIRE_CLOSE_BREAK enabled, the candle must close at or above the trigger. When disabled, an intrabar high can qualify.
Close confirmation reduces wick breakouts but enters later. A larger offset also filters marginal breaks, while increasing distance from the zone.
Each zone can produce only one breakout entry. The strategy holds one position and does not average down.
Stop modes
STBZ_STOP_MODE chooses the calculated stop:
opposite: below the zone bottom, extended bySTBZ_STOP_BUFFER_PCTof zone height;mid: at the zone midpoint;fixed:STBZ_FIXED_STOP_PCTbelow average buy price.
The midpoint is tighter but more likely to be touched on a normal retest. The opposite-side stop gives the zone more room. Fixed mode is easier to compare across trades but ignores zone geometry.
Enable STBZ_USE_PROTECTION to execute the selected stop.
Risk/reward target
Enable STBZ_USE_TARGET to set a target at initial risk multiplied by STBZ_RISK_REWARD. The target is raised when needed to cover estimated fees and STBZ_MIN_NET_GAIN_PCT.
The chosen stop mode therefore changes target distance even when protection is disabled: the calculated stop remains the risk reference.
Technical exits
All technical exits wait for a fee-aware profitable price:
STBZ_EXIT_ON_BEARISH_BREAKOUTexits on a valid breakout below a bearish zone;STBZ_EXIT_ON_SUPERTREND_FLIPexits when Supertrend direction is bearish;STBZ_EXIT_ON_ZONE_MID_LOSSexits when price falls below the midpoint of the active bullish zone.
The zone-mid exit is disabled by default. Despite “loss” in its name, it remains break-even protected; it is not a stop-loss.
Spread, cooldown, and news
STBZ_MAX_SPREAD_PCT and optional STBZ_MAX_SPREAD_ABSOLUTE block entries with excessive spread.
STBZ_COOLDOWN_MS spaces actions apart. STBZ_ENFORCE_COOLDOWN_IN_BACKTEST makes historical testing apply the same delay.
STBZ_NEWS_BLOCK and STBZ_NEWS_BLOCK_UNTIL manually block entries. They do not read an external news source and do not prevent existing-position exits.
Good market conditions
Supertrend Breakout Zone generally works best when:
- a liquid market changes from bearish or neutral structure into a clear bullish regime;
- a compact consolidation forms after the Supertrend flip;
- zone height is meaningful but not excessive;
- the breakout closes decisively beyond the zone;
- spread remains small enough for the expected target.
A favorable setup often looks like a bullish Supertrend flip, several candles building a narrow shelf, then expansion through the shelf high.
Avoid repeated Supertrend flips, oversized reversal candles that create tall zones, stale zones, and wick-heavy breakouts with no follow-through.
Creating the strategy
Create a spot strategy and choose Supertrend Breakout Zone for both methods. Start with the default 15-minute period in backtesting or paper trading.
A practical sequence is:
- Tune Supertrend until its flips match meaningful regime changes.
- Review the zone-height and age filters.
- Compare wick and close breakout confirmation.
- Choose a stop mode that matches the zone behavior.
- Test risk/reward together with that stop mode.
- Decide whether protection is required.
- Review technical exits during failed and successful breakouts.
Strategy settings
Trading and safeguards
| Setting | Description |
|---|---|
BUY_ENABLED | Enables breakout entries. |
SELL_ENABLED | Enables target, technical, and protective exits. |
PERIOD | Candle period; default 15 minutes. |
TRADING_LIMIT | Compatibility fallback only. It is ignored while the strategy-specific trading limit contains a positive value. Configure the strategy-specific setting for normal use. For USDT-BTC, this value is in USDT. |
STBZ_TRADING_LIMIT | For USDT-BTC, the amount of USDT used for an entry. |
FUNDS_RESERVE | For USDT-BTC, the amount of USDT the bot must leave unused. |
KEEP_QUOTE | For USDT-BTC, the amount of BTC the strategy must not sell. |
MIN_VOLUME_TO_BUY | General minimum buy value. For USDT-BTC, this value is in USDT. |
MIN_VOLUME_TO_SELL | General minimum sell value. For USDT-BTC, this value is in USDT. |
STBZ_MIN_ORDER_VALUE | Strategy minimum entry value. For USDT-BTC, this value is in USDT. |
STBZ_MIN_SELL_VALUE | Strategy minimum exit value. For USDT-BTC, this value is in USDT. |
GAIN | General gain fallback retained in configuration. |
STBZ_COOLDOWN_MS | Delay between actions. |
STBZ_ENFORCE_COOLDOWN_IN_BACKTEST | Applies cooldown in backtests. |
STBZ_MAX_SPREAD_PCT | Relative entry spread ceiling. |
STBZ_MAX_SPREAD_ABSOLUTE | Optional absolute spread ceiling; 0 disables it. For USDT-BTC, this value is in USDT. |
STBZ_NEWS_BLOCK | Manually blocks entries. |
STBZ_NEWS_BLOCK_UNTIL | Blocks entries until the configured time. |
Supertrend and breakout zone
| Setting | Description |
|---|---|
STBZ_ATR_LENGTH | ATR length used by Supertrend. |
STBZ_ATR_MULTIPLIER | ATR multiplier controlling Supertrend distance. |
STBZ_USE_EMA_SMOOTHING | Uses EMA-smoothed closes for Supertrend. |
STBZ_EMA_SMOOTH_LENGTH | Close-smoothing EMA length. |
STBZ_BREAKOUT_OFFSET_PCT | Extra trigger distance as a percentage of zone height. |
STBZ_REQUIRE_CLOSE_BREAK | Requires a candle close rather than an intrabar touch beyond the trigger. |
STBZ_MIN_ZONE_HEIGHT_PCT | Minimum zone height relative to price. |
STBZ_MAX_ZONE_HEIGHT_PCT | Maximum zone height relative to price; 0 disables the maximum. |
STBZ_MAX_ZONE_BARS | Maximum zone age; 0 disables expiry. |
Stop, target, and exits
| Setting | Description |
|---|---|
STBZ_STOP_MODE | Selects opposite, mid, or fixed stop placement. |
STBZ_STOP_BUFFER_PCT | Opposite-stop buffer as a percentage of zone height. |
STBZ_FIXED_STOP_PCT | Fixed stop distance from average buy price. |
STBZ_RISK_REWARD | Initial-risk multiplier used for the target. |
STBZ_USE_TARGET | Enables the risk/reward target. |
STBZ_MIN_NET_GAIN_PCT | Intended gain beyond fee break-even. |
STBZ_USE_PROTECTION | Activates the calculated stop. |
STBZ_EXIT_ON_BEARISH_BREAKOUT | Enables profitable exit on bearish-zone breakdown. |
STBZ_EXIT_ON_SUPERTREND_FLIP | Enables profitable exit during bearish Supertrend direction. |
STBZ_EXIT_ON_ZONE_MID_LOSS | Enables profitable exit below the bullish zone midpoint. |
Backtesting
| Setting | Description |
|---|---|
BF_SINCE | Backtest start. |
BF_UNTIL | Backtest end. |
DEEP_TESTING | Enables deeper backtesting. |
Practical tuning directions
Tune zone filters with the stop mode in mind. A wider accepted zone creates a wider opposite stop and, through risk/reward, a farther target.
If false wick breaks dominate, use close confirmation before making the breakout offset very large. If entries are too late, compare those two filters rather than loosening both simultaneously.
Important limitations
- Supertrend and EMA smoothing are lagging.
- The zone begins at a direction flip and can be replaced by a later flip.
- Breakout offset and stop buffer are percentages of zone height, not price.
- The calculated stop affects target distance even while protection is disabled.
- Zone-mid “loss” exits still wait for break-even.
- News blocking is manual.
- Live breakouts can suffer slippage beyond the trigger.
Supertrend Breakout Zone is strongest when the flip creates a compact, relevant structure and the breakout confirms expansion. The zone is the setup; the break beyond it is the entry.