Skip to main content

Supertrend Breakout Zone

Supertrend Breakout Zone strategy behavior

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_PCT of current price;
  • no more than STBZ_MAX_ZONE_HEIGHT_PCT, unless that maximum is 0;
  • no older than STBZ_MAX_ZONE_BARS, unless that maximum is 0.

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 by STBZ_STOP_BUFFER_PCT of zone height;
  • mid: at the zone midpoint;
  • fixed: STBZ_FIXED_STOP_PCT below 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_BREAKOUT exits on a valid breakout below a bearish zone;
  • STBZ_EXIT_ON_SUPERTREND_FLIP exits when Supertrend direction is bearish;
  • STBZ_EXIT_ON_ZONE_MID_LOSS exits 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:

  1. Tune Supertrend until its flips match meaningful regime changes.
  2. Review the zone-height and age filters.
  3. Compare wick and close breakout confirmation.
  4. Choose a stop mode that matches the zone behavior.
  5. Test risk/reward together with that stop mode.
  6. Decide whether protection is required.
  7. Review technical exits during failed and successful breakouts.

Strategy settings

Trading and safeguards

SettingDescription
BUY_ENABLEDEnables breakout entries.
SELL_ENABLEDEnables target, technical, and protective exits.
PERIODCandle period; default 15 minutes.
TRADING_LIMITCompatibility 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_LIMITFor USDT-BTC, the amount of USDT used for an entry.
FUNDS_RESERVEFor USDT-BTC, the amount of USDT the bot must leave unused.
KEEP_QUOTEFor USDT-BTC, the amount of BTC the strategy must not sell.
MIN_VOLUME_TO_BUYGeneral minimum buy value. For USDT-BTC, this value is in USDT.
MIN_VOLUME_TO_SELLGeneral minimum sell value. For USDT-BTC, this value is in USDT.
STBZ_MIN_ORDER_VALUEStrategy minimum entry value. For USDT-BTC, this value is in USDT.
STBZ_MIN_SELL_VALUEStrategy minimum exit value. For USDT-BTC, this value is in USDT.
GAINGeneral gain fallback retained in configuration.
STBZ_COOLDOWN_MSDelay between actions.
STBZ_ENFORCE_COOLDOWN_IN_BACKTESTApplies cooldown in backtests.
STBZ_MAX_SPREAD_PCTRelative entry spread ceiling.
STBZ_MAX_SPREAD_ABSOLUTEOptional absolute spread ceiling; 0 disables it. For USDT-BTC, this value is in USDT.
STBZ_NEWS_BLOCKManually blocks entries.
STBZ_NEWS_BLOCK_UNTILBlocks entries until the configured time.

Supertrend and breakout zone

SettingDescription
STBZ_ATR_LENGTHATR length used by Supertrend.
STBZ_ATR_MULTIPLIERATR multiplier controlling Supertrend distance.
STBZ_USE_EMA_SMOOTHINGUses EMA-smoothed closes for Supertrend.
STBZ_EMA_SMOOTH_LENGTHClose-smoothing EMA length.
STBZ_BREAKOUT_OFFSET_PCTExtra trigger distance as a percentage of zone height.
STBZ_REQUIRE_CLOSE_BREAKRequires a candle close rather than an intrabar touch beyond the trigger.
STBZ_MIN_ZONE_HEIGHT_PCTMinimum zone height relative to price.
STBZ_MAX_ZONE_HEIGHT_PCTMaximum zone height relative to price; 0 disables the maximum.
STBZ_MAX_ZONE_BARSMaximum zone age; 0 disables expiry.

Stop, target, and exits

SettingDescription
STBZ_STOP_MODESelects opposite, mid, or fixed stop placement.
STBZ_STOP_BUFFER_PCTOpposite-stop buffer as a percentage of zone height.
STBZ_FIXED_STOP_PCTFixed stop distance from average buy price.
STBZ_RISK_REWARDInitial-risk multiplier used for the target.
STBZ_USE_TARGETEnables the risk/reward target.
STBZ_MIN_NET_GAIN_PCTIntended gain beyond fee break-even.
STBZ_USE_PROTECTIONActivates the calculated stop.
STBZ_EXIT_ON_BEARISH_BREAKOUTEnables profitable exit on bearish-zone breakdown.
STBZ_EXIT_ON_SUPERTREND_FLIPEnables profitable exit during bearish Supertrend direction.
STBZ_EXIT_ON_ZONE_MID_LOSSEnables profitable exit below the bullish zone midpoint.

Backtesting

SettingDescription
BF_SINCEBacktest start.
BF_UNTILBacktest end.
DEEP_TESTINGEnables 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.