Noon Barbari
S'inscrire

Retour à la bibliothèque de stratégies

Suivi de tendanceLong & short15m1h4h1d

Blackflag FTS strategy

SuperTrend regime gates three layered Fib pullback entries — long, short, mirrored.

Thèse

SuperTrend regime gates three layered Fib pullback entries — long, short, mirrored.

Adapté aux setups de Suivi de tendance — fonctionne mieux quand le comportement du marché correspond à la thèse, et déraille quand non. À combiner avec le mode walk-forward du backtester avant d'engager du capital réel.

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.

Jeu de règles YAML

Colle-le dans l'onglet « Text » du Strategy Designer, ou utilise le bouton dashboard ci-dessus pour le charger comme modèle.

_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

Indicateurs

  • 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 wrapper

    One-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.

Conditions d'entrée

Le bot ouvre une position à la bougie suivant le déclenchement de toutes les conditions ci-dessous.

  • 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.

Conditions de sortie

N'importe laquelle des conditions ci-dessous ferme la 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.

Comportement attendu

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.

C'est le caractère de la courbe d'equity, pas une prévision de rendement. Les backtests ne sont pas des promesses sur la performance en direct.

Essaie-la sur tes propres données

Ouvre le modèle dans le dashboard pour le tester sur BTC, ETH ou n'importe quel symbole CCXT — ou copie le YAML dans le Strategy Designer pour le modifier d'abord.

Le comportement passé en backtest ne garantit pas la performance future. Les marchés évoluent ; les jeux de règles doivent être revalidés. Tu trades à tes risques.