Join waitlist
Strategies / Trend / Hann Ribbon Crossover Structure Filter

Hann Ribbon Crossover Structure Filter

The strategy buys when a 20 period Hann filter crosses above a 23 period one, swing structure is not bearish and ADX(14) is from 8 to 60. Stops sit near the 20 bar low or high, with targets at twice the stop distance.

TrendLong & shortIntradayGold3 min
n/aProfit factor
1,230Net profit EUR
34.03%Win rate
1,143Trades
-1,177Max drawdown
1.08Avg trade

Best run of 10. Gold, 3 min, spread 0.6, from run sweeps:2026-10-04-GOLD-3m-opt.tsv:33.

Entry rules, long

  1. The swing structure trend value is 0 or higher, so it is not bearish.
  2. ADX(14) is at least 8 and at most 60.
  3. A position is opened only when flat, after bar 60.

Entry rules, short

  1. The swing structure trend value is 0 or lower, so it is not bullish.
  2. ADX(14) is at least 8 and at most 60.
  3. A position is opened only when flat, after bar 60.

Exit rules

  1. A short stops out at the 20 bar high plus 1.2 times ATR(14), with a stop distance of at least 0.5 times ATR(14).
  2. The target is 2 times the stop distance from entry.

Test conditions

PeriodUp to 2026-10-04
InstrumentGold, 3 minutes
Spread0.6 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run3 minn/a 1,14334.031,230 EUR-1,177
Silver4 hoursn/a 22634.0727,970 USD-14,435
Dow JonesDailyn/a 8441.6719,540 EUR-14,109
USD/JPYDailyn/a 27635.5118,120 USD-10,380
SilverDailyn/a 5442.5916,567 USD-15,964
Dow Jones15 minn/a 88536.1614,497 EUR-8,097
DAX 404 hoursn/a 19438.1410,232 EUR-5,530
Nasdaq 1001 hourn/a 86732.538,783 EUR-4,772
Brent Crude4 hoursn/a 11639.668,074 EUR-4,889
Gold4 hoursn/a 21733.181,046 EUR-1,028

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Hann Ribbon Crossover Structure Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 3 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lastsh = 0
ONCE shok = 0
ONCE lastsl = 0
ONCE slok = 0
ONCE structtrend = 0
ONCE bulltrack = 0
ONCE bulltrackok = 0
ONCE beartrack = 0
ONCE beartrackok = 0
ONCE myPi = 3.14159265358979

myAtr = AverageTrueRange[14](close)

119 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

ADXATR
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 1,177 EUR is large next to the net profit of 1,230 EUR.

Questions

About this strategy

Can I run Hann Ribbon Crossover Structure Filter in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 10 market and timeframe combinations. The best run by trade count was Gold, 3 minutes, with 1,143 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,177 EUR at the tested position size, against a net result of 1,230 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs