Join waitlist
Strategies / Trend / QQE Threshold Exit Trend

QQE Threshold Exit Trend

Buys one bar after the RSI index first rises above 60, when the 21 and 84 EMAs are rising and the close is above the 21 EMA. Shorts mirror these rules, and trades close on RSI index thresholds or the QQE line.

TrendLong & shortSwingGold1 hour
n/aProfit factor
1,801Net profit EUR
36.87%Win rate
2,756Trades
-605Max drawdown
0.65Avg trade

Best run of 4. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-12-GOLD-1h-opt.tsv:47.

Entry rules, long

  1. On that prior bar, the 21 EMA and 84 EMA were both rising over the previous 3 bars.
  2. On that prior bar, the close was above the 21 EMA.

Entry rules, short

  1. On that prior bar, the 21 EMA and 84 EMA were both falling over the previous 3 bars.
  2. On that prior bar, the close was below the 21 EMA.

Exit rules

  1. A short closes on the first bar of a run where the RSI index is above the QQE line, or at or above 50.

Test conditions

PeriodUp to 2026-10-12
InstrumentGold, 1 hour
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run1 hourn/a 2,75636.871,801 EUR-605
Silver4 hoursn/a 76436.9113,372 USD-12,531
Brent CrudeDailyn/a 11341.596,671 EUR-6,401
GoldDailyn/a 33339.941,031 EUR-660

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// QQE Threshold Exit Trend
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE longband = 0
ONCE shortband = 0
ONCE trend = 1
ONCE xlong = 0
ONCE xshort = 0
ONCE zlong = 0
ONCE zshort = 0
ONCE clong = 0
ONCE cshort = 0
ONCE buyc = 0
ONCE sellc = 0
ONCE closelong = 0
ONCE closeshort = 0
ONCE state = 0

myRsi = RSI[14](close)
rsindex = ExponentialAverage[8](myRsi)
atrrsi = abs(rsindex[1] - rsindex)
maatrrsi = ExponentialAverage[27](atrrsi)
delta = ExponentialAverage[27](maatrrsi) * 5.0
newshort = rsindex + delta
newlong = rsindex - delta

lbprev = longband
sbprev = shortband

122 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

RSIEMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run QQE Threshold Exit Trend 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 4 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 2,756 trades.

How large was the drawdown?

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

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 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