# Trend Following Strategy

Buy when the close is above the upper Donchian channel band and the 52-period simple moving average of relative force is greater than the relative force, with both lines in an upward trend.

Canonical: https://prismaticalgos.com/compendium/algo/3528-trend-following-strategy
Record ID: 3528
Catalog rank: 2832 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.prorealcode.com/topic/streategia-trend-following/
Evidence label (unverified): source_code

## Scope and limitations

These are machine-extracted research records, not verified trading systems. Catalog rank measures specification detail and claimed evidence, not profitability. The catalog extraction pipeline did not independently backtest these records. Its separate selected testing ledger does not validate the wider corpus. Rules, labels and parameters can be incomplete or wrong; consult the original source and its reuse terms.

No endorsement, ownership claim or source-code reuse permission is implied.

## Extraction warnings

Build warnings: DAILY_LOW_COUNT: daily-or-slower timeframe on a single instrument. Expect well under 100 trades in five years, so a backtest will rarely reach statistical significance on its own.

## Recorded profile

- symbols: Any
- timeframes: Weekly
- sessions: Any
- market_regime: trending

## Indicators

- Donchian Channel: {"N": 20}; applied to: high, low
- Relative Force: {"X": 20}; applied to: close
- SMA: {"P": 52}; applied to: Relative Force

## Recorded long-entry rules

- close > UpperDonchian
- Avg > RelativeForce
- Avg > Avg[1]
- RelativeForce > RelativeForce[1]

## Recorded short-entry rules

- Not specified.

## Recorded exit rules

- OnMarket THEN SL = max(SL,LowerDonchian) AND SELL AT SL STOP

## Recorded filters

- Not specified.

## Risk controls

- Stop loss: LowerDonchian
- Take profit: Trailing stop that follows the rise of the lower Donchian channel band
- Position sizing: 1 Contracts
