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.
Best run of 4. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-12-GOLD-1h-opt.tsv:47.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 1 hour |
| Spread | 0.6 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 1 hour | n/a | 2,756 | 36.87 | 1,801 EUR | -605 |
| Silver | 4 hours | n/a | 764 | 36.91 | 13,372 USD | -12,531 |
| Brent Crude | Daily | n/a | 113 | 41.59 | 6,671 EUR | -6,401 |
| Gold | Daily | n/a | 333 | 39.94 | 1,031 EUR | -660 |
Charts
The code
// ============================================================== // 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
Questions
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.
It was tested on 4 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 2,756 trades.
The best run had a maximum drawdown of 605 EUR at the tested position size, against a net result of 1,800 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.