Files
swym/assets/strategy/buy-2-factors/readme.md
rob thijssen e479351d82 feat: audit and revise all 13 non-Emmanuel seeded strategies
Creates assets/strategy/<name>/ folders for all 13 strategies following the
emmanuel-ma/mtf pattern: versioned JSON files and a readme per strategy.

Tier 1 — DSL improvements (7 strategies get a new version):
- simple-trend v2: ADX(14) > 25 regime gate
- buy-2-factors v2: ADX(14) > 20 completes the originally-intended 3-factor gate
- ichimoku v2: Chikou Span check + cloud-colour filter (Span A > Span B)
- bull-market-support-band v2: event_count bull confirmation (≥35/50 bars above SMA100)
- supertrend v3: ADX(14) > 25 regime gate
- gaussian-channel v3: cross_over/cross_under replaces persistent compare on band breaks
- stochastic-keltner v3: proper cross_over(stoch_k, 20) replaces manual two-bar simulation

Tier 2 — folders + readmes only, no revision needed (6 strategies):
hodl, momentum-cascade, money-line, trend-detector, hull-suite, supertrend-fusion

common.rs updated with 7 new seed functions using include_str! for the revised
versions; existing inline json!() seeds unchanged for historical comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 18:00:33 +02:00

1.6 KiB

Buy 2 Factors, Reversion Entry

A mean-reversion approach filtered by two confirming factors. Enters on RSI oversold readings within a macro uptrend, exits when RSI is overbought.

Versions

Version File Notes
v1 v1.json RSI < 30 + close > SMA(200); ADX factor omitted
v2 v2.json Adds ADX(14) > 20 as Factor 2 — full 3-factor implementation

Logic

Entry (v1): RSI(14) < 30 AND close > SMA(200). Entry (v2): RSI(14) < 30 AND close > SMA(200) AND ADX(14) > 20. Exit: RSI(14) > 70.

Factors

  1. Macro uptrend filter: close > SMA(200) — only buy dips in bull markets.
  2. Trend strength / non-ranging: ADX(14) > 20 — confirms the market is directional (v2 only; was the missing factor in v1).
  3. Entry signal: RSI(14) < 30 — price is oversold relative to recent history.

Indicators

  • RSI(14) — Relative Strength Index on close
  • SMA(200) — 200-period simple moving average on close
  • ADX(14) — Average Directional Index (v2 only)

Data requirements

  • 1h candles recommended.
  • Minimum warmup: ~200 candles for SMA(200).

Known limitations

  • MACD histogram (originally proposed as an alternative to ADX) requires DSL extensions not yet available.
  • Exit is RSI > 70 only; no stop-loss. A sharp downside move during an RSI < 30 entry that never recovers will hold the position indefinitely.
  • Mean-reversion strategies can suffer large drawdowns in prolonged downtrends even with the SMA(200) filter.