Join waitlist
Strategies / Momentum / Opening Gap Up Time Exit

Opening Gap Up Time Exit

The strategy buys at the market when a bar opens at least 0.1% above the prior close, provided no long is open. It exits 10 bars after the entry bar, so each trade lasts a fixed number of bars.

MomentumLong onlyIntradayGold10 min
1.83Profit factor
503Net profit EUR
51.80%Win rate
139Trades
-106Max drawdown
3.62Avg trade

Best run of 30. Gold, 10 min, spread 0.6, from run pf:2026-10-12-GOLD-10m.tsv:2.

Entry rules, long

  1. No long position is open.

Exit rules

  1. There is no stop loss or profit target.

Test conditions

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

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run10 min1.83 13951.80503 EUR-106
USD/JPY1 hourn/a 17048.2438,680 USD-28,270
Dow JonesDailyn/a 31652.2210,338 EUR-9,918
Silver15 minn/a 49242.899,765 USD-3,773
Nikkei 2254 hoursn/a 27852.887,996 USD-6,104
Dow Jones4 hoursn/a 9858.167,598 EUR-2,833
Silver5 minn/a 22347.537,348 USD-5,201
Nasdaq 1004 hoursn/a 33254.824,993 EUR-1,660
Nikkei 2255 minn/a 8455.953,753 USD-880
Nasdaq 1001 hourn/a 49649.803,363 EUR-1,426
Nikkei 2252 minn/a 3262.502,664 USD-554
Nikkei 2253 minn/a 4557.782,555 USD-813
Dow Jones1 hourn/a 14260.562,531 EUR-2,393
Nasdaq 10030 minn/a 38152.492,041 EUR-1,368
DAX 4030 minn/a 38851.031,837 EUR-1,038
DAX 4015 minn/a 17551.431,514 EUR-724
S&P 500Dailyn/a 43651.831,416 EUR-1,402
Nasdaq 10015 minn/a 21751.151,241 EUR-888
Nasdaq 10010 minn/a 13150.381,201 EUR-560
Nikkei 2251 minn/a 1662.501,158 USD-657
DAX 4010 minn/a 9952.531,103 EUR-181
S&P 5004 hoursn/a 26957.621,039 EUR-393
Nasdaq 1005 minn/a 7050.00753 EUR-315
S&P 5001 hourn/a 33952.21410 EUR-247
S&P 50030 minn/a 27952.33387 EUR-222
Gold15 minn/a 20448.53366 EUR-178
Gold5 minn/a 11346.90359 EUR-102
S&P 50015 minn/a 16651.20247 EUR-155
Nasdaq 1002 minn/a 3063.33223 EUR-137
S&P 50010 minn/a 10248.04120 EUR-99.98

Charts

Results by run

Top 10 of 30 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Opening Gap Up Time Exit
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 10 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE ebar = 0
ONCE waslong = 0

gap = (open - close[1]) / close[1] * 100

17 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.
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Opening Gap Up Time Exit 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 30 market and timeframe combinations. The best run was Gold, 10 minutes, with a profit factor of 1.83 over 139 trades.

How large was the drawdown?

The best run had a maximum drawdown of 106 EUR at the tested position size, against a net result of 503 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Rate Of Change Momentum Trailing

Also a momentum strategy.

1.83 PF · 200 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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