Thesis
SuperTrend regime gates three layered Fib pullback entries — long, short, mirrored.
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.
Calm during chop because no regime is established; bursts of activity when a clean trend prints and price wicks into the Fib zone. Pullback re-entries cluster around the trail line, so the equity curve looks like staircase steps inside each trend leg.
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: Blackflag FTS — SuperTrend + Fib pullback ladder
category: trend_following
skill: intermediate
name: blackflag_fts
weight: 1.0
long_only: false
indicators:
bf:
kind: blackflag_fts
atr_period: 28
atr_factor: 5
trail_type: modified
fib1: 0.618
fib2: 0.786
fib3: 0.886
c:
kind: sma
period: 1
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: 1}}
- {lhs: {indicator: c}, op: crosses_down, rhs: {indicator: bf, field: fib1}}
- combine: AND
direction: long
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: 1}}
- {lhs: {indicator: c}, op: crosses_down, rhs: {indicator: bf, field: fib2}}
- combine: AND
direction: long
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: 1}}
- {lhs: {indicator: c}, op: crosses_down, rhs: {indicator: bf, field: fib3}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: -1}}
- {lhs: {indicator: c}, op: crosses_up, rhs: {indicator: bf, field: fib1}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: -1}}
- {lhs: {indicator: c}, op: crosses_up, rhs: {indicator: bf, field: fib2}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: bf, field: state}, op: eq, rhs: {value: -1}}
- {lhs: {indicator: c}, op: crosses_up, rhs: {indicator: bf, field: fib3}}
exit:
combine: OR
rules:
- {lhs: {indicator: bf, field: state}, op: crosses_down, rhs: {value: 0}}
- {lhs: {indicator: bf, field: state}, op: crosses_up, rhs: {value: 0}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 2
Indicators
bfBlackflag FTS (ATR 28, factor 5)Port of Jose Azcarate's Pine v4 Blackflag FTS indicator: a Wilder ATR-band SuperTrend that tracks the trend extreme and projects three Fib pullback levels (61.8 / 78.6 / 88.6 %) inside the active regime.
cSMA(1) close wrapperOne-bar SMA over close so the rule evaluator's crosses_* operators see a real previous value. Without this, bar-level closes collapse prev = now and crossing predicates never fire.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Long-side ladder: close crosses down through any of the three Fib levels while Blackflag state = +1 (uptrend).
- Short-side ladder mirrors above the Fib levels while state = -1.
- First trigger wins; the trailing stop handles re-entry cadence.
Exit conditions
Any of the conditions below will close the position.
- SuperTrend regime flips through zero in either direction — the framework routes the matching exit to the active position.
- 4% trailing stop locks in the run; 2-bar cooldown after exit.
Expected behavior
Calm during chop because no regime is established; bursts of activity when a clean trend prints and price wicks into the Fib zone. Pullback re-entries cluster around the trail line, so the equity curve looks like staircase steps inside each trend leg.
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.