XAUUSD 4h inside bar strategy
The current candle’s high is below the prior high and its low is above the prior low. XAUUSD 4-hour candles, long only, 1R target.
Found by searching 2913 variants of 48 setups on XAUUSD (Gold), then tested once on the last 12 months (17 November 2025 to 17 November 2026), which were locked away during the search. Long only, about 27 trades a year. It only takes signals in the Tokyo session (00:00 to 09:00 UTC).
- Style
- Breakout
- Timeframe
- 4 hours
- Test period
- Jan 2020 to Nov 2026
- Tested
- 18 November 2026
- Market
- XAUUSD (spot gold)
Return
+48.7%
Profit factor
1.55
Win rate
63.8%
Max drawdown
−5.64%
Prompt for TES
Tessera's AI strategy coach builds and backtests it
Inside bar on XAUUSD 4-hour candles, long trades only (no shorts), entering at the setup's signal. The setup: The current candle’s high is below the prior high and its low is above the prior low. Price stayed entirely inside the previous bar’s range. Often a pause / compression before the next move. Only take signals on candles that open between 00:00 and 09:00 UTC. Enter at the close of the signal candle. Stop 1 ATR(14) beyond the signal candle's low. Take profit at 1R. Risk 1% of the account per trade with typical costs. Backtest it from 2020-01-24 to 2026-11-17.
- 1Copy the prompt
- 2Backtest it free
- 3Run it as a bot
Free account, no card. The button copies the prompt for you. Run it as a bot on your broker with Launchpad, from $39 a month.
Is the inside bar strategy profitable on XAUUSD?
In this backtest, yes. On XAUUSD 4-hour candles from Jan 2020 to Nov 2026 it made +48.7% after costs, with a profit factor of 1.55, a 63.8% win rate and a maximum drawdown of 5.64%, over 185 trades.
It held up on an unseen period it was never tuned on (+18.4% over the last 745 days), and the last 12 months, locked away during the search, were strong (+5.60% on 35 trades). Plan for less live: with half the edge, a typical year is +2.9%.
A gold trading strategy for XAUUSD
XAUUSD is spot gold priced in US dollars. This strategy looks for an inside bar signal on 4-hour candles and trades only long, with up to 20× leverage.
About 27 trades a year, so expect a few trades a month. It's one of the better fits for a prop firm challenge in the library.
Prop firm results
Tested against
Verdict
Holds up on prop firm challenges
We ran this strategy's own trades through 8 challenges (FTMO 1-Step Challenge, FTMO 2-Step Challenge, FundedNext Stellar 2-Step, The5ers High Stakes (2.5K-25K), FundingPips 2-Step Standard, E8 Markets E8 One, FXIFY Two Phase (Trailing), Alpha Capital Group Alpha Pro 8%), starting a new one every week of the backtest and trying several risk levels per trade.
- Pass, fail and ran-out-of-time rates for every firm
- The risk per trade with the best pass rate
- Median days to pass and challenges per pass
Create a free account, then open this strategy in the Strategy Lab hub to see the pass rates, the risk per trade to use and how long challenges took to pass.
Read nextProp firms that allow algo tradingFTMO algo trading rulesProp firm consistency rule
Backtest results
Return
+48.7%
Jan 2020 to Nov 2026
Profit factor
1.55
Win rate
63.8%
Max drawdown
−5.64%
Trades
185
about 27 a year
Last 12 months
+5.60%
Nov 2025 to Nov 2026 · 35 trades
| Net profit | +$4,872.42 ($10,000 → $14,872.42) |
|---|---|
| Average trade | +0.22R / +$26.34 |
| Total R | +40.7R |
| Profit factor in R | 1.57 |
| Average win / loss | +$116.06 (+0.95R) / −$131.69 (−1.06R) |
| Largest win / loss | +$174.42 / −$188.30 |
| Targets / stops hit | 118 / 67 |
|---|---|
| Longest win / loss streak | 9 / 4 |
| Median hold | 10 candles (4 hours) |
| Max drawdown | −$888.78 (−5.75R) |
| Buy and hold, same dates | +146.2% |
| Signals | 454 (114 position open, 155 other side or filter) |
XAUUSD 4-hour candles, 24 January 2020 to 17 November 2026, starting with $10,000. 1% risk per trade, up to 20× leverage. Costs are included in every figure. Spot metal bars.
Read nextWhat is a good profit factor?Profit factor calculatorHow many trades a backtest needs
How it was proven
1. A wide search, with the last 12 months locked away
Strategy Lab searched 2913 variants on XAUUSD 4-hour candles, across setups, settings, targets, stops, trend and volatility filters, trading sessions and long or short sides. The last 12 months were kept locked away during the search, then the top 5 were tested on it once.
- 2,913Variants searched
- 624Passed the search bar: 40+ trades, profit factor 1.2+, return at least the drawdown, both halves profitable
- 64Had profitable neighbouring settings, so not a one-setting fluke
- 5Top 5 tested once on the locked last 12 months
- 1Stayed profitable on the locked last 12 months. This is the strongest
| Setup | Target | Filter | Side | Search period | Last 12 months | |
|---|---|---|---|---|---|---|
| Large move candle | 2R | None | Long and short | +47.65% | −1.33% | |
| Donchian breakout 10 | 5R | None | Longs only | +118.03% | +3.77% | |
| Previous day high/low break | 1.5R | None | Longs only | +61.54% | −0.05% | |
| Inside bar | 1R | None | Longs only | +40.84% | +5.60% | This strategy |
| Swing high/low breakout 3 | 2R | None | Longs only | +53.19% | +0.67% |
Search period
24 Jan 2020 to 17 Nov 2025
- Return
- +40.84%
- Profit factor
- 1.62
- Trades
- 150
- Max drawdown
- −4.44%
Last 12 months, locked
17 Nov 2025 to 17 Nov 2026, tested once
- Return
- +5.60%
- Profit factor
- 1.35
- Trades
- 35
- Max drawdown
- −5.64%
The locked last 12 months made +5.60% with a profit factor of 1.35, on data the search never saw. That's the honest test of a searched strategy. Even so, paper trade it before a live account.
2. An unseen period: held up
Separately, Strategy Lab's walk-forward check kept the last 30% of the history (745 days, from 1 Nov 2024) unseen. Results were weaker than before the cut but still clearly profitable.
Before the cut
70% of the history
- Return
- +30.28%
- Profit factor
- 1.59
- Trades
- 120
- Win rate
- 64.2%
Unseen period
Last 745 days
- Return
- +18.44%
- Profit factor
- 1.50
- Trades
- 65
- Win rate
- 63.1%
3. Robustness: sensitive
The same strategy re-run on noisy copies of the data, with costs halved and doubled, and with the stop assumed to hit first inside every candle.
Price feed noise (10 runs)
Return +23.9% to +79.6%, 51% of trades unchanged
Double costs
+31.6%
Stop hit first inside a candle
+48.7%
Unseen period
+18.4% over 745 days
Last 12 months (locked)
+5.60%, profit factor 1.35 on 35 trades
Recent results
Traded results
Updated
Last 30 days
Return
+0.05%
27 Oct to 26 Nov
Total P&L
+$5.23
+$7.94 open
Total R
−0.02R
Trades
2
1 won
Win rate
50.0%
profit factor 0.97
Max drawdown
−1.01%
Open positions
| Market | Side | Opened | Entry | Open P&L | Opened | Price | Stop | Target | Size | Open P&L |
|---|---|---|---|---|---|---|---|---|---|---|
| XAUUSD | Long | 26 Nov 2026, 08:00 UTC | 3,567.45 | +$7.94 (+0.08R) | 26 Nov, 08:00 | 3,571.94 | 3,510.95 | 3,623.95 | 99.97 USD at risk (1.00%) | +$7.94 (+0.08R) |
Closed trades
| Closed | Result | P&L | Market | Side | Closed | Entry | Exit | Result | P&L |
|---|---|---|---|---|---|---|---|---|---|
| 19 Nov, 15:00 | Stop | −$101.59 (−1.01R) | XAUUSD | Long | 19 Nov 2026, 15:00 UTC | 3,736.83 | 3,683.85 | Stop | −$101.59 (−1.01R) |
| 9 Nov, 12:00 | Target | +$98.88 (+0.99R) | XAUUSD | Long | 9 Nov 2026, 12:00 UTC | 4,084.95 | 4,129.36 | Target | +$98.88 (+0.99R) |
Last 7 days
Return
+0.08%
19 Nov to 26 Nov
Total P&L
+$7.94
+$7.94 open
Total R
+0.00R
Trades
0
0 won
Win rate
–
Max drawdown
−0.00%
Open positions
| Market | Side | Opened | Entry | Open P&L | Opened | Price | Stop | Target | Size | Open P&L |
|---|---|---|---|---|---|---|---|---|---|---|
| XAUUSD | Long | 26 Nov 2026, 08:00 UTC | 3,567.45 | +$7.94 (+0.08R) | 26 Nov, 08:00 | 3,571.94 | 3,510.95 | 3,623.95 | 100.00 USD at risk (1.00%) | +$7.94 (+0.08R) |
Results shown are hypothetical, calculated from the strategy's rules on market data. No real money is at risk. Past results don't guarantee future results. Not financial advice.
The rules
The current candle’s high is below the prior high and its low is above the prior low. Price stayed entirely inside the previous bar’s range. Often a pause / compression before the next move.
It only buys and never shorts, so it makes its money when Gold rises. Signals only count on 4-hour candles that open between 00:00 and 09:00 UTC, the Tokyo session, though a trade can run past 09:00.
It enters at the close of the signal candle. The stop goes 1 ATR(14) beyond the signal candle's low, and the target is 1 times the distance from entry to stop. There's no trailing stop or time exit. Each trade risks 1% of the account with up to 20× leverage, and every result includes XAUUSD's typical trading costs (spread 0.0085% of price, swap 0.02254% / -0.00195% a night, commission $3.50 per lot a side ($7 round turn), slippage 0.002% of price).
| Setup | The current candle’s high is below the prior high and its low is above the prior low. Price stayed entirely inside the previous bar’s range. Often a pause / compression before the next move. |
|---|---|
| Session | Signals only on candles that open between 00:00 and 09:00 UTC (the Tokyo session). Trades can run past 09:00 |
| Entry | At the close of the signal candle |
| Stop | 1 ATR(14) beyond the signal candle's low |
| Target | 1R (1 times the distance from entry to stop) |
| Exit | Stop or target only: no trailing stop, break-even or time exit |
| Direction | Long only |
| Risk | 1% of the account per trade, up to 20× leverage |
| Costs | Spread 0.0085% of price, swap 0.02254% / -0.00195% a night, commission $3.50 per lot a side ($7 round turn), slippage 0.002% of price |
Read nextAlgorithmic trading strategies explainedBest AI trading strategy buildersBest no-code backtesting software
What to expect
Strategy Lab reshuffled this strategy's own trades 1,000 times, in blocks so losing streaks stay together, to show a range of next-12-month outcomes at about 27 trades a year. Plan with half the edge: live results usually keep about half of what a backtest shows.
See the range before you trade it
A bad year, a typical year and a good year, the chance of a losing year and the typical worst drop, as tested and with half the edge. Create a free account and open this strategy in the Strategy Lab hub.
In the backtest, the longest stretch below a previous high lasted 476 days (15 May 2020 to 3 Sept 2021).
Year by year
Return by year
- 2020+4.79%24 trades
- 2021+2.61%24 trades
- 2022−0.05%17 trades
- 2023+12.05%25 trades
- 2024+10.12%32 trades
- 2025+8.97%35 trades
- 2026*+2.92%28 trades
*Part year: 2026 from 1 Jan 2026 to 16 Nov 2026.
Profit and loss by month, in dollars
| Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2020 | 96 | -22 | 197 | 196 | 89 | -225 | 102 | 96 | -134 | -126 | -29 | 101 |
| 2021 | 19 | 196 | -336 | -17 | -16 | 181 | 138 | -32 | 103 | -7 | 183 | |
| 2022 | -18 | 104 | 29 | 104 | 106 | -247 | -233 | -11 | 162 | |||
| 2023 | 99 | 104 | 215 | 90 | -231 | 108 | -123 | -36 | 547 | 200 | 321 | |
| 2024 | 88 | -143 | 588 | 90 | -141 | -23 | 350 | -15 | 234 | -40 | 124 | 107 |
| 2025 | 238 | 221 | 133 | -149 | -12 | 107 | -165 | 86 | 383 | -149 | 398 | 99 |
| 2026 | 1021 | 290 | -322 | -201 | 286 | -15 | -312 | -172 | -152 |
Grey months had no trades. Hover a month for its trades, wins and losses.
Where it fails
- Long only: it makes money when Gold trends up and sits out or loses in sell-offs.
- Low frequency: about 27 trades a year, so a prop challenge target usually takes months.
- The robustness test rated it sensitive: results move with small changes in the price feed.
Every trade
| # | Closed | Exit | Side | Entry | Exit price | Candles | P&L | Equity |
|---|---|---|---|---|---|---|---|---|
| 185 | 10 Nov 2026 | Stop | Long | 4,134.03 | 4,043.22 | 5 | −$152.33 | $14,872 |
| 184 | 20 Oct 2026 | Stop | Long | 4,175.13 | 4,113.57 | 16 | −$164.47 | $15,025 |
| 183 | 9 Oct 2026 | Target | Long | 4,144.32 | 4,203.07 | 2 | +$146.71 | $15,189 |
| 182 | 7 Oct 2026 | Stop | Long | 4,172.68 | 4,081.53 | 7 | −$153.85 | $15,043 |
| 181 | 23 Sept 2026 | Stop | Long | 4,357.68 | 4,279.30 | 5 | −$155.94 | $15,196 |
| 180 | 4 Sept 2026 | Stop | Long | 4,493.90 | 4,378.73 | 6 | −$156.53 | $15,352 |
| 179 | 26 Aug 2026 | Stop | Long | 4,658.64 | 4,585.03 | 5 | −$159.64 | $15,509 |
| 178 | 19 Aug 2026 | Target | Long | 4,437.94 | 4,524.48 | 2 | +$153.94 | $15,668 |
| 177 | 14 Aug 2026 | Stop | Long | 4,435.25 | 4,330.82 | 10 | −$160.56 | $15,515 |
| 176 | 5 Aug 2026 | Target | Long | 4,093.63 | 4,157.81 | 4 | +$151.24 | $15,675 |
| 175 | 23 Jul 2026 | Stop | Long | 4,149.24 | 4,079.52 | 5 | −$159.57 | $15,524 |
| 174 | 22 Jul 2026 | Target | Long | 4,096.42 | 4,165.36 | 4 | +$151.90 | $15,683 |
| 173 | 21 Jul 2026 | Target | Long | 4,015.41 | 4,090.91 | 14 | +$144.89 | $15,532 |
| 172 | 3 Jul 2026 | Target | Long | 4,071.72 | 4,177.41 | 9 | +$148.83 | $15,387 |
| 171 | 26 Jun 2026 | Target | Long | 4,010.55 | 4,093.09 | 7 | +$147.68 | $15,238 |
| 170 | 24 Jun 2026 | Stop | Long | 4,211.08 | 4,007.33 | 52 | −$160.34 | $15,090 |
| 169 | 10 Jun 2026 | Stop | Long | 4,544.90 | 4,187.52 | 331 | −$188.30 | $15,250 |
| 168 | 12 Mar 2026 | Stop | Long | 5,228.68 | 5,094.14 | 13 | −$158.24 | $15,439 |
| 167 | 9 Mar 2026 | Stop | Long | 5,193.17 | 5,040.30 | 16 | −$164.21 | $15,597 |
| 166 | 27 Feb 2026 | Target | Long | 5,195.00 | 5,271.79 | 14 | +$149.87 | $15,761 |
Show all 185 trades
Loading trades…
Read nextcTrader trading bot without codingBest trading journal for algo tradersBest trading journal for TradingView
Run it as a bot
Once the strategy holds up, Launchpad runs it on paper, then live on cTrader, Liquid Brokers, Binance Futures or Hyperliquid, with the stop and target attached to every order.
- Paper:live prices, no broker
- Copilot:approve each trade in Telegram or the app
- Autopilot:trades inside your daily limits
Compare
All gold strategiesBacktests are hypothetical: they apply fixed rules to historical data with assumed costs and fills. Past results don't predict future results, and leveraged trading carries a high risk of loss. This is an educational description, not a recommendation.