Thesis
Market Structure says which way, the first Fair Value Gap in that direction says go now.
Fits Mean reversion 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.
Picky — both legs must agree. Long flat stretches followed by clusters of trades when a regime turns and FVGs print along the way. Stacks well in directional markets, sits out balanced ranges.
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: SMC CHoCH regime + FVG entry
category: mean_reversion
skill: intermediate
name: smc_choch_fvg
weight: 1.0
long_only: false
indicators:
ms:
kind: market_structure
swing_length: 20
fvg:
kind: fair_value_gap
min_gap_pct: 0.001
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: fvg, field: bull_signal}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ms, field: state}, op: eq, rhs: {value: 1}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: fvg, field: bear_signal}, op: gt, rhs: {value: 0}}
- {lhs: {indicator: ms, field: state}, op: eq, rhs: {value: -1}}
exit:
combine: OR
rules:
- {lhs: {indicator: ms, field: state}, op: crosses_up, rhs: {value: 0}}
- {lhs: {indicator: ms, field: state}, op: crosses_down, rhs: {value: 0}}
risk:
trailing_stop_pct: 0.05
cooldown_bars: 5
Indicators
msMarket Structure (swing 20)BOS/CHoCH tracker that exposes the prevailing regime as state = +1 / -1.
fvgFair Value Gap (min gap 0.1%)Imbalance detector providing the entry trigger. Only the first FVG in the active regime is taken — the strategy waits for direction-agreement before pulling the trigger.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Long on a bullish FVG while market structure is in a +1 (bullish) regime.
- Short on a bearish FVG while market structure is in a -1 (bearish) regime.
Exit conditions
Any of the conditions below will close the position.
- Regime flip through zero in either direction closes the trade.
- 5% trailing stop, 5-bar cooldown.
Expected behavior
Picky — both legs must agree. Long flat stretches followed by clusters of trades when a regime turns and FVGs print along the way. Stacks well in directional markets, sits out balanced ranges.
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.