Research
The VWAP "Holy Grail" and Gold Breakout EAs: What the Research Says, and How to Test One Yourself
By Benjamin Lee · Updated · 22 min read
Search for a trading edge and you will meet the phrase "holy grail" within a page or two. One of the best-known uses sits in the title of a 2023 working paper on a VWAP day-trading system. This guide reads that research the way a sceptical quant would: what it tested, what it cannot tell you about spot gold on MetaTrader 5, how a gold breakout system is actually built, and how to test one without fooling yourself. It makes no performance claims about any product, ours included.
Key takeaways
- There is no holy grail. A strong backtest on one instrument and one period is a hypothesis, not a result.
- Most VWAP literature is about trade execution, not about generating profit. The profitable-trading use comes mainly from practitioner working papers.
- On XAUUSD in MT5, VWAP is built from tick volume, not real traded volume. That changes what the indicator means.
- Every extra filter or parameter raises the Sharpe ratio that pure luck can show. Count your variants and use the calculator below.
- Write the hypothesis, the parameter grid and the pass mark down before you run the test.
Why "holy grail" is a warning label
The phrase promises an edge that works everywhere and always. Markets do not offer that. Any strategy that earns more than the market pays for risk is paid for something: a risk you carry, a cost you accept, or a behaviour of other participants that may stop. When an advertisement or a paper uses the words, read them as a claim that needs more evidence than usual, not less.
The most cited use in this area is the title of a 2023 working paper by Carlo Zarattini and Andrew Aziz, "Volume Weighted Average Price (VWAP) The Holy Grail for Day Trading Systems", which tests a rule-based system built on VWAP. We read it as a serious attempt to document a rule set and to publish results with stated costs, and we read the title as a hook. The authors say what they tested and on what. The rest of this guide is about how far that can be stretched, and it cannot be stretched to the claim in the title.
- 1 market
- The best-known VWAP system paper tests a single ETF
- tick vol
- What MT5 uses as volume for spot gold and FX symbols
- N tries
- The number you must know before believing any Sharpe ratio
VWAP in plain terms
The volume-weighted average price is the average price of a session, where each price counts in proportion to the volume traded at it. In symbols, VWAP equals the sum of price times volume, divided by the sum of volume, accumulated from a chosen starting point called the anchor. For intraday work the price is usually the close of each bar or the typical price, which is the average of high, low and close.
Three properties explain why traders use it. First, it is cumulative, so it reacts quickly at the start of a session and then becomes stickier as volume accumulates. Second, it is reset at the anchor, typically the session open, so it always describes the current session. Third, it is a benchmark that large institutions are measured against, so some participants have a reason to care whether they buy below it or sell above it.
Many platforms add bands at one or two volume-weighted standard deviations above and below VWAP, in the same way Bollinger bands surround a moving average. Traders use them in two opposite ways. Mean-reversion traders fade moves that reach the outer band. Trend traders treat a hold above VWAP as a sign that buyers are in control and look for continuation. The two views describe the same chart, which is one reason the indicator on its own cannot be called an edge.
A practical wrinkle on MT5
To our knowledge the standard MetaTrader 5 indicator list does not include a VWAP indicator, so you either use a custom indicator or code the calculation inside the EA. Check your own build before assuming. Either way, you have to decide the anchor (midnight server time, the start of the London session, the start of the New York session), and that choice is itself a parameter.
The volume problem on spot gold
VWAP needs volume. On an exchange-traded instrument such as a futures contract or an ETF, volume is the number of contracts or shares that traded. Spot gold and spot forex are different. They trade over the counter, with no single tape, and a broker's MT5 server cannot show the traded volume of the whole market. What it shows instead is tick volume: the number of price updates received in the bar.
Tick volume is not meaningless. When the market is busy, quotes update more often, so tick volume and real volume tend to rise together. But the relationship is imperfect, it depends on the liquidity providers the broker connects to, and it differs from one broker to the next. A VWAP built on one broker's tick volume is therefore a slightly different line from the VWAP on another broker, and neither is the VWAP that appears in a research paper on a US-listed ETF.
- Real volume symbols. Some brokers offer gold futures or exchange-linked symbols that carry real volume. VWAP on those is closer to the textbook definition.
- CFD and spot symbols. VWAP here is a tick-volume-weighted average. Treat it as a smoothed, activity-weighted reference price.
- Test it directly. If your EA depends on VWAP, backtest it on the exact symbol and data feed you will trade, not on another feed.
Choosing the anchor
An equity VWAP resets at the opening print. Gold has no such moment, so the anchor is a design choice with real consequences. A line anchored at server midnight is dominated by the quiet Asian hours until London arrives. A line anchored at the London open describes only the active session but ignores what happened before it. A rolling window never resets and has no memory of a session at all.
| Anchor | What the line describes | Weakness |
|---|---|---|
| Server midnight | The whole trading day so far | Server time and daylight saving vary by broker, so the same rule behaves differently across brokers |
| London open | The active European and US session | Ignores the Asian build-up. Needs a clean definition of the open on each date |
| New York open | The US session only | Starts mid-day for European traders, and the first minutes carry the data-release volatility |
| Rolling window | A moving average weighted by activity | It is closer to a smoothed moving average than to a session benchmark |
Treat the anchor as one of the parameters you must count. Testing three anchors triples the number of variants before any other choice is made.
What the research actually says
It helps to separate three bodies of work that all use the same word. They answer different questions, and mixing them up is the most common error in marketing built on top of them.
| Strand | Question asked | Typical finding or purpose | What it does not show |
|---|---|---|---|
| Transaction-cost measurement | How good was the price a large trade received? | VWAP serves as a benchmark for comparing execution cost, as in Berkowitz, Logue and Noser (1988) | Nothing about whether trading around VWAP is profitable |
| Execution algorithms | How should a large order be sliced to track VWAP? | Models of optimal execution, such as Madhavan (2002) and Frei and Westray (2015) | These reduce cost for an investor who must trade. They do not create a signal |
| Rule-based trading systems | Can price versus VWAP drive entries and exits? | Practitioner papers such as Zarattini and Aziz (2023) report favourable backtests on a liquid ETF | That the result holds on other instruments, in other periods, or after more selection |
The first two strands are mainly about how institutions trade. Their relevance to a retail gold EA is indirect: they explain why VWAP exists and why some participants watch it, which is a reason to believe the level matters a little. They are not evidence of a profitable signal, and they were not written to be.
The VWAP trading-system paper
The third strand is where the "holy grail" title lives. The paper by Zarattini and Aziz documents an intraday rule set on a liquid US equity ETF that goes long when price holds above VWAP and short when it holds below, closing positions by the end of the day, and reports favourable risk-adjusted results over a window of several years. We recommend reading it in full rather than relying on summaries, ours included.
Reading it critically, there are good reasons for caution before exporting the idea to gold:
- One instrument. A result on one ETF is one data point. A grail would hold across many.
- A particular window. Several years of a rising tech-heavy market can favour long trend-following rules, and the paper cannot show how the rule behaves in a different regime.
- Selection. Any published rule has passed through a human decision about what to publish. How many variants were tried before the reported one is rarely known.
- Equity microstructure. Consolidated real volume, per-share commissions and a defined open and close are all features of the setting that XAUUSD does not share.
- Not a peer-reviewed journal article, as far as we know. It circulates as a working paper, which means the usual refereeing filter has not been applied.
The opening-range breakout paper
A related 2024 working paper by Zarattini, Barbon and Aziz studies an opening-range breakout on US stocks that are "in play", meaning stocks with unusually high relative volume on the day. The breakout idea is much older. Toby Crabel described opening-range breakout patterns in a 1990 book, and range breakouts have been a staple of futures trading since. The newer contribution is the filter: only trade names where something is happening.
That filter is the part that does not transfer. "Stocks in play" is a cross-sectional idea, choosing the few names out of thousands with abnormal volume on the day. A gold EA trades one instrument. It cannot select among thousands of candidates, so it is left with the weaker version of the idea, a breakout rule on a single market.
The broader trend-following evidence
Breakout systems belong to the trend-following family, which has the longest evidence record of any systematic style. Hurst, Ooi and Pedersen (2017) assembled more than a century of data across many markets and report positive long-run results for trend following. The result describes diversified portfolios across many futures markets, not a leveraged retail account trading one symbol. It supports the logic of breakouts, not the profitability of any particular gold EA.
Why the result does not transfer to XAUUSD unchanged
Transfer is the key question for any retail trader reading a paper. The table lists the differences that matter most, and they each push in a direction that can turn a published edge into no edge at all.
| Feature | Setting in the research | Spot gold on MT5 | Why it matters |
|---|---|---|---|
| Volume | Consolidated traded volume | Tick volume from one broker's feed | VWAP is a different line on every broker |
| Session | A defined open and close of about six and a half hours | Around the clock on weekdays, with a daily rollover | There is no natural opening print, so the anchor must be chosen |
| Costs | Per-share commission and a tight spread on a very liquid ETF | Spread, possible commission, swap and slippage | A wider spread can erase a thin edge |
| Event risk | Scheduled earnings and macro releases | US data releases, central bank decisions, the two LBMA price auctions, geopolitical shocks | Gold gaps and spreads widen around them |
| Regime | One multi-year equity market regime | Long trends, long ranges and sharp reversals | A rule tuned on one regime may fail in another |
| Data | Exchange data | Whatever the broker's server provides | Backtests differ between brokers |
The session picture matters because a breakout rule needs a range to break, and gold has several natural ones. The quiet Asian session often forms a range that London can break. The London morning sets a range that New York can break. The LBMA gold price auctions at 10:30 and 15:00 London time, and the 13:30 UTC US data release in the winter, are scheduled moments when volatility arrives. A rule that ignores this calendar is trading blind to the structure that gold actually has.
How a gold breakout system is built
Strip away the branding and a gold breakout EA is a small set of decisions. Each one is a parameter, and each one is a place where a design can be sound or fitted. Walking through them is the best way to read any EA's manual.
| Decision | Common options | What goes wrong |
|---|---|---|
| The range | Asian session high and low, the first minutes after London open, the previous day's high and low | A range that is very wide produces a stop too large to be worthwhile. One that is very narrow produces many false breaks |
| The trigger | A stop order beyond the range, or a close beyond it | Stop orders fill with slippage in fast markets. Closes confirm later at a worse price |
| The direction filter | Trade only with session VWAP, a moving average slope or a higher-timeframe trend | Every filter reduces trades and adds a parameter that can be over-fitted |
| The stop | The other side of the range, or a multiple of average true range | Too tight and noise stops it out. Too wide and a single loss is large |
| The exit | A target multiple, a trailing stop, or a fixed time exit | Targets cut the winners that make the system profitable. A time exit can close in the middle of a move |
| The calendar | Skip high-impact news, restrict hours, cap trades per day | A news filter built on a few events may not generalise |
| The spread filter | Skip entries when spread exceeds a limit | Too strict and the EA misses the best moves, which come with wide spreads |
Notice what a VWAP filter does in this picture. It does not create the breakout. It adds a condition, for example buy only if price is above session VWAP, that removes some trades. If the removed trades were worse than average, the filter helps. If it only removes some trades at random, you have paid for a parameter and gained nothing. Only a test on data the design never saw can tell the difference.
Because breakout systems lose often and win rarely, they need a high payoff ratio to be profitable. For that reason the win rate of a healthy breakout EA is usually modest, and its equity curve is bumpier than one built on small, frequent wins. Our strategy comparison explains why a lower win rate with defined risk is often the safer profile, and why a smooth curve deserves suspicion.
A worked example: counting the variants
Write a plausible gold rule in plain words. Buy when price closes above the high of the Asian range after the London open, but only if price is above session VWAP. Place the stop a multiple of average true range below the entry. Close at a fixed time if neither stop nor target has been hit. Skip the day if a high-impact release is due.
That sounds like one strategy. Count the choices hidden inside it. Three plausible lengths for the Asian range window. Three VWAP anchors. Four stop multiples. Three exit times. A news filter that is either on or off. Multiply them: three times three times four times three times two is 216 combinations. On five years of data, the best of 216 zero-skill variants is expected to show an annualised Sharpe ratio of roughly 1.2 to 1.3. Add two more optional filters, say a spread limit and a minimum range width, and the count roughly quadruples, which raises the figure further.
None of this means the rule is bad. It means a good-looking optimised result is the expected outcome whether or not the rule works, and so it carries little information. The information is in what happens next: how the chosen settings behave on data the search never saw.
The cost arithmetic that kills thin edges
Gold moves in large point increments, but a breakout system with a modest payoff can still be consumed by costs. Take hypothetical numbers, expressed in dollars of price movement per ounce. Suppose the average winner is 4.00, the average loser is 2.00, and the system wins 40% of its trades.
| Quantity | Value | Working |
|---|---|---|
| Gross expectancy per trade | 0.40 | 0.40 × 4.00 minus 0.60 × 2.00 |
| All-in round-trip cost | 0.35 | Spread, commission and slippage combined |
| Net expectancy | 0.05 | 0.40 minus 0.35 |
| Net expectancy if costs are 30% higher | -0.055 | 0.40 minus 0.455 |
A system whose gross edge is 0.40 and whose cost is 0.35 has a net edge of 0.05, barely above zero, and a modest rise in spread flips it negative. This is not a rare case. Many published and marketed intraday edges are of this size. The lesson is that the question is never whether the strategy makes money before costs. The question is how large the net edge is compared with the cost you will really pay, and how that margin behaves when costs rise.
For a breakout system on gold the biggest cost surprises come exactly at the moments the system trades. Breakout entries cluster around volatile events, which is when spreads are widest and slippage is largest. A backtest with a fixed average spread understates the cost on the very trades that matter, so a real-ticks test with variable spread, plus a deliberately worse cost scenario, is the minimum standard. Our guides to backtesting and tick data cover how to set that up.
The Sharpe ratio that luck can buy
Here is the central problem with any rule-based system that was found by searching. If you try many variants and report the best one, the best will look good even if every variant has no edge at all. The more variants you try, and the shorter your history, the better the best of them looks. Bailey and López de Prado formalised this in their work on the deflated Sharpe ratio, and Bailey, Borwein, López de Prado and Zhu described the same effect in plain language in an article on backtest overfitting.
You can estimate the size of the effect. For a given number of years of data and a given number of independent variants with no real edge, the expected best annualised Sharpe ratio follows a known approximation. The chart shows the result for three history lengths.
Interactive: the Sharpe ratio luck can buy
Best annualised Sharpe ratio you should expect from pure noise
1.13
A strategy with no edge at all would still show this result as its best variant, so any reported Sharpe ratio below it proves nothing. Approximation: independent trials, normally distributed returns.
Put realistic numbers in. A gold breakout design with a handful of choices for the range definition, the VWAP anchor, the ATR multiple, the exit time and the news filter can reach a thousand combinations without much effort. On five years of data, the best of a thousand zero-skill variants is expected to show an annualised Sharpe ratio around one and a half. That is the kind of number a headline backtest advertises. It proves nothing on its own, because luck alone would deliver it.
Harvey, Liu and Zhu made a related argument in finance research at large: when many researchers test many ideas, the usual significance threshold is too low, and a newly reported effect should clear a higher bar, a t-statistic of about three rather than two. The practical translation for you is simple. Ask how many variants were tried. If the answer is unknown, discount the result heavily. If you are the one testing, keep the count and report it with the result.
A pre-registered protocol for testing a gold breakout EA
The cure for self-deception is to decide in advance what would convince you. Scientists call this pre-registration. For an EA test it means writing the plan down before you see a single result. The steps below work for any breakout EA, whether you built it, bought it or are evaluating ours.
Step 1: Write the hypothesis in one sentence
For example: gold breaks the Asian range after the London open with enough follow-through to pay for costs. If you cannot say why the edge should exist, you are mining, not testing.
Step 2: Fix the instrument, session and anchor
Choose the symbol, the broker, the time zone, the range definition and the VWAP anchor once. Changing them after seeing results is a new test and counts as another variant.
Step 3: Limit and count the grid
List every parameter you will vary and its values. Keep the total small and record the number. That number is what you feed into the calculator above.
Step 4: Split the data before testing
Reserve the most recent period as a final test that nobody touches, and hold a middle period for validation. Develop only on the earliest period, or use rolling walk-forward windows.
Step 5: Set costs and delay realistically
Use real ticks with the broker's variable spread, a non-zero execution delay, and commission as your account charges it. Plan a second run with higher costs.
Step 6: Write the pass marks first
State the minimum net expectancy over cost, the maximum equity drawdown you would accept, the minimum number of trades and the requirement that the validation and final periods agree with the development period.
Step 7: Run once on the final period
Look at the held-back data a single time. If it fails, you do not get to adjust and rerun on the same data, because that destroys its value.
Step 8: Forward test on demo, then small live
Log trades against the expected distribution from the backtest. Stop at a pre-agreed drawdown.
To read the outputs of each run, use our guide to reading an MT5 backtest report. It covers equity drawdown, expectancy, the deals list and the checks that expose martingale or grid behaviour hidden behind a breakout label.
Hypotheses worth testing, stated as questions
A pre-registered test needs a question that can fail. These are examples for gold. Each is phrased as a question, because we do not know the answers and neither does anyone else until they are measured on the data you will trade.
- Does a break of the Asian range in the first hours of London continue more often than it reverses, after realistic costs?
- Does requiring price to be on the same side of session VWAP as the breakout improve the net expectancy, or only cut the number of trades?
- Is the result different on days with a high-impact US release than on quiet days, and does skipping those days help or hurt?
- Does the edge survive if every entry is delayed by one bar, which proxies slippage and confirmation lag?
- Is the result stable across at least two brokers' real-tick data, and across daylight-saving changes?
Mistakes that quietly inflate a breakout test
- Look-ahead in the VWAP. Computing VWAP including the bar that is still forming lets the rule see information it would not have had at entry. Use only completed bars.
- Time zone and daylight-saving errors. If the range window is defined in one clock and the broker's server uses another, the range shifts by an hour on some dates, and the results change for the wrong reason.
- Stops tested on bar closes. A stop that triggers inside a bar but is evaluated at the close hides losses. Use real ticks.
- Ignoring the spread at the trigger. Breakout entries fire at volatile moments. A fixed average spread understates the cost exactly there.
- Re-running on the final period. Each peek at the held-back data turns it into development data, and the test no longer means anything.
Applying this to a commercial gold breakout EA
Gold breakout EAs are sold by many vendors, including us. If you are evaluating one, such as Gold Reaper or any other, the protocol above tells you what to ask for and what to do with the answer. We do not publish performance claims for our products on this page. A claim without your own test behind it is exactly what this guide teaches you not to trust.
| Question | Why it matters | A good answer |
|---|---|---|
| What defines the range, the anchor and the direction filter? | Reveals the real logic and the parameters that could be fitted | A specific, documented rule, not a phrase like adaptive AI |
| How many variants were tried before the shipped settings? | Sets the luck component of any reported statistic | A number, or at least an honest range |
| Was the shipped setfile tested out of sample? | Separates the design from the fit | Yes, with the period stated |
| Which data, spread and delay were used? | Costs decide thin edges | Real ticks with variable spread and a stated delay |
| Is there a stop on every trade or a hard basket stop? | Defines worst-case loss | Yes, documented in the manual |
| Is equity drawdown shown, with its duration? | Floating loss hides in balance drawdown | Both are reported |
| How does it behave around news and rollover? | Gold spreads widen there | Filters are documented and testable |
| Can I reproduce a test on my broker's data? | Backtests differ between brokers | Yes, setfile and instructions are included |
If a vendor will not answer these, or answers with performance screenshots only, that is information. The setfile and manual that ship with an EA should let you reproduce a test. Run it on your broker's real ticks over your own date range, apply the stress tests, and compare. Then follow the staged rollout in our installation and risk guide.
What this guide does not show, and what would count as evidence
We have not run a backtest of a VWAP breakout on gold for this article, and we do not claim that one would succeed or fail. We have described the research in general terms, so read the original papers before relying on anything said about them here. The numbers in the cost table and in the charts marked illustrative are invented to teach the arithmetic.
What would count as evidence for a gold breakout EA is a combination of things that are hard to fake together. A rule with a stated reason to work. A small, disclosed set of tested variants. Out-of-sample results that agree with the in-sample ones. Results that survive higher costs. Consistent behaviour on more than one broker's data. And a live record, ideally independently verified, long enough to include more than one market regime. Each of those is checkable, and none depends on trusting the seller.
References
- Berkowitz, S. A., Logue, D. E. and Noser, E. A. (1988). The Total Cost of Transactions on the NYSE. Journal of Finance, 43(1).Early use of VWAP as a benchmark for measuring execution cost.
- Madhavan, A. (2002). VWAP Strategies. In Transaction Performance: The Changing Face of Trading, Institutional Investor.Overview of how execution strategies track VWAP.
- Frei, C. and Westray, N. (2015). Optimal execution of a VWAP order: a stochastic control approach. Mathematical Finance.A mathematical treatment of executing a large order against VWAP.
- Zarattini, C. and Aziz, A. (2023). Volume Weighted Average Price (VWAP) The Holy Grail for Day Trading Systems. SSRN working paper.A rule-based VWAP day-trading system tested on a liquid US equity ETF.
- Zarattini, C., Barbon, A. and Aziz, A. (2024). A Profitable Day Trading Strategy For The U.S. Equity Market. SSRN working paper.An opening-range breakout applied to stocks in play.
- Crabel, T. (1990). Day Trading with Short Term Price Patterns and Opening Range Breakout. Traders Press.An early practitioner description of opening-range breakout patterns.
- Hurst, B., Ooi, Y. H. and Pedersen, L. H. (2017). A Century of Evidence on Trend-Following Investing. Journal of Portfolio Management, 44(1).Long-run evidence for trend following across many markets.
- Bailey, D. H. and López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. Journal of Portfolio Management, 40(5).Source of the expected-best-Sharpe-from-noise approximation used in the calculator.
- Bailey, D. H., Borwein, J. M., López de Prado, M. and Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5).A plain-language account of backtest overfitting.
- Harvey, C. R., Liu, Y. and Zhu, H. (2016). ...and the Cross-Section of Expected Returns. Review of Financial Studies, 29(1).Argues for a higher significance threshold when many ideas are tested.
Frequently asked questions
Is there a holy grail trading strategy?
No. Every edge is paid for by a risk, a cost or a behaviour that can change. A strong backtest on one market and one period is a hypothesis that needs out-of-sample, multi-market and live evidence.
Can I use VWAP on XAUUSD in MetaTrader 5?
Yes, but on spot gold the volume is tick volume from your broker, not real traded volume, so the line differs between brokers and from the VWAP in equity research. Backtest on the exact symbol and feed you will trade.
Does a published VWAP or opening-range paper prove a gold breakout EA works?
No. The best-known papers test US equities, with consolidated volume and equity-style costs. They support the idea that the levels matter but cannot show that a rule works on gold.
How many parameters is too many?
There is no fixed limit, but every extra parameter or filter multiplies the variants you could have fitted. Keep the grid small, choose values for a reason before testing, and record the count so you can judge the luck component.
How should I judge a vendor's gold breakout backtest?
Ask for the data, spread, delay, date range and number of variants tried, check equity drawdown rather than balance drawdown, then reproduce the test on your own broker's real ticks and stress the costs.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- BacktestingHow to Read an MT5 Backtest ReportLearn to read an MT5 Strategy Tester report line by line: drawdown, profit factor, Z-score, trade quality, robustness checks and the red flags that expose a weak EA.
- Strategy comparisonWhich EA Strategy Wins Long Term?Compare MT5 Expert Advisor strategy types, from scalping and grid to hedging and arbitrage: how each earns, how each fails, and which tend to survive long term.
- BacktestingHow to Backtest an EA in MT5 ProperlyLearn how to backtest an Expert Advisor in MT5 the right way: tester modes, spreads, delays, optimisation, walk-forward checks and the red flags to avoid.


