Thesis
Fine-grained order-block retest, gated by a slower market-structure 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.
Stricter than the bare Order Block strategy — the regime filter throws out counter-trend OBs. Fewer trades but cleaner ones; long flat stretches when fine and coarse SMC disagree.
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 with structure filter
category: trend_following
skill: intermediate
name: order_block_retest_with_filter
weight: 1.0
long_only: false
indicators:
ob:
kind: order_block
swing_length: 10
ms:
kind: market_structure
swing_length: 30
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: ob, field: bull_retest}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ms, field: state}, op: eq, rhs: {value: 1}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: ob, field: bear_retest}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ms, field: state}, op: eq, rhs: {value: -1}}
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}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 3
Indicators
obOrder Block (swing 10)Fine-grained order-block detector that emits bull/bear retest signals as price re-enters the last opposite candle before each BOS.
msMarket Structure (swing 30)Slower swing tracker that exposes the prevailing regime via state. Acts as the higher-timeframe filter — only OB retests that agree with the regime are taken.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Long on a bullish OB retest while market-structure state is +1.
- Short on a bearish OB retest while state is -1.
Exit conditions
Any of the conditions below will close the position.
- OB mitigation closes the trade — the SMC thesis is invalidated.
- 4% trailing stop, 3-bar cooldown.
Expected behavior
Stricter than the bare Order Block strategy — the regime filter throws out counter-trend OBs. Fewer trades but cleaner ones; long flat stretches when fine and coarse SMC disagree.
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.