These
CCI-gated ATR ratchet — long on a bullish wick break of the trail, short on the mirror.
Passt zu Trendfolge-Setups — funktioniert am besten, wenn das Marktverhalten zur These passt, und versagt, wenn nicht. Vor echtem Kapitaleinsatz mit dem Walk-Forward-Modus des Backtesters kombinieren.
Selective entries — the wick-cross condition is strict, so trades fire only when momentum really pushes through. Strong in trending regimes, quiet during balanced ranges.
YAML-Regelwerk
Füge das im Tab „Text" des Strategy Designers ein oder nutze die Dashboard-Schaltfläche oben, um es als Template zu laden.
_template:
title: Trend Magic — CCI-gated ATR ratchet
category: trend_following
skill: intermediate
name: trend_magic
weight: 1.0
long_only: false
indicators:
tm:
kind: trend_magic
period: 20
atr_period: 5
coeff: 1.0
low_:
kind: sma
period: 1
source: low
high_:
kind: sma
period: 1
source: high
entry:
combine: OR
rules:
- combine: AND
direction: long
rules:
- {lhs: {indicator: low_}, op: crosses_up, rhs: {indicator: tm, field: trail}}
- combine: AND
direction: short
rules:
- {lhs: {indicator: high_}, op: crosses_down, rhs: {indicator: tm, field: trail}}
exit:
combine: OR
rules:
- {lhs: {indicator: tm, field: state}, op: crosses_down, rhs: {value: 0}}
- {lhs: {indicator: tm, field: state}, op: crosses_up, rhs: {value: 0}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 2
Indikatoren
tmTrend Magic (period 20, ATR 5, coeff 1.0)Port of KivancOzbilgic's Pine v4 Trend Magic: an SMA-of-TR ATR band ratcheted by the CCI(20) regime — up while CCI ≥ 0, down while CCI < 0.
low_ / high_SMA(1) wick wrappers (low / high)One-bar SMAs over low and high so the wick-based crossing predicates have tracked previous values. The native bar.low / bar.high collapse prev = now and never fire crossings.
Eintrittsbedingungen
Der Bot eröffnet eine Position in der Kerze nach dem Erfüllen aller unten genannten Bedingungen.
- Long when the bar's low wick crosses up through the Trend Magic trail line.
- Short when the high wick crosses down through the trail line.
Ausstiegsbedingungen
Jede der folgenden Bedingungen schließt die Position.
- CCI regime flip through zero closes the active position.
- 4% trailing stop, 2-bar cooldown.
Erwartetes Verhalten
Selective entries — the wick-cross condition is strict, so trades fire only when momentum really pushes through. Strong in trending regimes, quiet during balanced ranges.
Beschreibt den Charakter der Equity-Kurve, ist keine Rendite-Prognose. Backtests sind keine Versprechen über Live-Performance.
Probier es mit deinen eigenen Daten
Öffne das Template im Dashboard, um es auf BTC, ETH oder einem beliebigen CCXT-Symbol zu backtesten — oder kopier das YAML in den Strategy Designer, um es vorher zu bearbeiten.
Vergangenes Verhalten in Backtests ist keine Garantie für künftige Performance. Märkte ändern sich; Regelwerke müssen erneut validiert werden. Trading auf eigenes Risiko.