Thesis
Prior-day-range breakouts, but only the ones that align with the SuperTrend regime.
Fits Trend following setups — works best when the underlying market behavior matches the thesis, and breaks down when it doesn't. Pair with the backtester's walk-forward mode before committing real capital.
Cleaner than a vanilla PDH/PDL bot — the SuperTrend filter cuts counter-trend breakouts that fizzle. Fewer trades but better quality; sits out range days where prior-range breaks fail.
YAML rule-set
Paste this into the Strategy Designer's Text tab, or use the dashboard button above to load it as a template.
_template:
title: PDH/PDL breakout filtered by SuperTrend
category: trend_following
skill: intermediate
name: pdh_pdl_breakout_with_supertrend
weight: 1.0
long_only: false
indicators:
ppl:
kind: prior_period_levels
st:
kind: super_trend
atr_period: 10
factor: 3.0
c:
kind: sma
period: 1
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: c}, op: crosses_up, rhs: {indicator: ppl, field: pdh}}
- {lhs: {indicator: st, field: state}, op: eq, rhs: {value: 1}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: c}, op: crosses_down, rhs: {indicator: ppl, field: pdl}}
- {lhs: {indicator: st, field: state}, op: eq, rhs: {value: -1}}
exit:
combine: OR
rules:
- {lhs: {indicator: c}, op: crosses_down, rhs: {indicator: ppl, field: pdl}}
- {lhs: {indicator: c}, op: crosses_up, rhs: {indicator: ppl, field: pdh}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 3
Indicators
pplPrior Period LevelsTracker for prior-day high / low (the rule uses pdh and pdl).
stSuperTrend (ATR 10, factor 3.0)Higher-quality trend filter. state = +1 confirms a bullish regime for PDH longs; state = -1 confirms bearish for PDL shorts.
cSMA(1) close wrapperWraps close so the crossing predicates have a tracked previous value.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Long when close crosses above PDH AND SuperTrend state = +1.
- Short when close crosses below PDL AND SuperTrend state = -1.
Exit conditions
Any of the conditions below will close the position.
- Opposite-side breakout closes the trade — momentum has flipped.
- 4% trailing stop, 3-bar cooldown.
Expected behavior
Cleaner than a vanilla PDH/PDL bot — the SuperTrend filter cuts counter-trend breakouts that fizzle. Fewer trades but better quality; sits out range days where prior-range breaks fail.
Equity-curve character, not a return forecast. Backtests are not promises about live performance.
Try it on your own data
Open the template in the dashboard to backtest it on BTC, ETH, or any CCXT symbol — or copy the YAML into the Strategy Designer to edit it first.
Past behavior on backtests is not a guarantee of future performance. Markets change; rule sets need re-validation. Trade at your own risk.