Thesis
Retest of the last opposite candle before a Break of Structure — long bullish OBs, short bearish.
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.
Selective — OBs are sparse and retests are rarer still. The strategy spends most of the time flat and produces concentrated trades around real structure flips.
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: Order Block — retest of last opposite candle before BOS
category: trend_following
skill: intermediate
name: order_block
weight: 1.0
long_only: false
indicators:
ob:
kind: order_block
swing_length: 10
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: ob, field: bull_retest}, op: gt, rhs: {value: 0}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: ob, field: bear_retest}, op: gt, rhs: {value: 0}}
exit:
combine: OR
rules:
- {lhs: {indicator: ob, field: bull_mitigated}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ob, field: bear_mitigated}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ob, field: bear_retest}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ob, field: bull_retest}, op: gt, rhs: {value: 0}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 3
Indicators
obOrder Block (swing length 10)Clean-room SMC order-block detector. Tracks the last opposite-direction candle before each BOS and emits a retest signal the first time price re-enters that zone.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Long on a bullish OB retest (bull_retest > 0).
- Short on a bearish OB retest.
Exit conditions
Any of the conditions below will close the position.
- Position closes when the OB is mitigated (price closes through the opposite edge).
- An opposite-side OB retest also invalidates the trade.
- 4% trailing stop, 3-bar cooldown.
Expected behavior
Selective — OBs are sparse and retests are rarer still. The strategy spends most of the time flat and produces concentrated trades around real structure flips.
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.