# Trader Dale's anchored VWAP: pullbacks to the weekly VWAP with a confirmation candle, EUR/USD 30-minute bars - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-28 (approved by the owner the same day, draft 1 unchanged: "Da, îngheaț-o")**. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed. No VWAP, signal or trade of this test has been computed. (A data check only was run before freezing: the tick volume stored in the file, per year, to know whether a volume-weighted average can be built from it.)

## Why this test, where the rules come from, and what was looked at before
- **Chosen by the owner** on 2026-10-28 ("Da, pe EUR/USD"), from the YouTube webinar **"How to Trade With Anchored VWAP | Ultimate Guide"** by Trader Dale (about 61,000 views, August 2025, 75 minutes; transcript pasted by the owner). The webinar promotes a paid VWAP course and indicator pack.
- **The rules as stated:** anchor the VWAP at an important point (the start of the day, the **week** or the year, a prominent swing, the end of a heavy-volume rotation); when whole candles are above the VWAP, buyers are in control and you buy pullbacks to it (below it, sell pullbacks); without a "combo" of other levels, **wait for a confirmation candle**, a bullish candle closing back above the VWAP (for a buy), and enter from it; **take profit just before the next barrier** (a heavy-volume zone, a swing point, another VWAP); **stop behind the nearest swing point**, the second-nearest if the nearest is too close, a fixed volatility-based stop if the swing is too far; in a trend, **trail the stop below each new swing point**; close positions before the weekend. His favourite timeframe for intraday trading is **30 minutes** and his favourite markets include **EUR/USD**.
- **What is tested:** the **weekly** anchor only, the clearest of his anchors, on 30-minute bars. **Not tested:** the daily anchor (close to the session VWAP our ES test already covered), the yearly anchor, the swing-point and heavy-volume anchors (he gives no exact definition: "it's usually pretty simple to spot"), the combos with price action and volume profile, and the avoidance of macro news (we have no news calendar). This is our mechanical reading of the simplest version, stated as such.
- **The claim behind it, checked by the test and not taken on trust:** the webinar quotes a Citadel hearing saying that institutional trades are executed as VWAP "program trades". Those are execution algorithms that spread a large order over the day to get the average price; the quote does not say that prices bounce off a VWAP. Whether they do, on this rule, is what the test measures.
- **Looked at before (disclosed):** **VWAP strategies on ES** (14 Oct 2026, buried: with the session VWAP, against it, and its bands); on this EUR/USD file the FX study, the 1-hour golden cross, the Fibonacci 61.8% pullback, the Turtle rules, Stochastic + RSI + MACD, the TDI tests, Parabolic SAR, the inside bar, ADX and the order block test (all buried). Pullback-to-average rules have therefore been tried several times; that raises the bar below.

## Instrument and data
- **EUR/USD** spot, the 1-minute bid history of the IC Markets MetaTrader 4 demo server, 2004-01-01 to 2026-09-28 15:46 New York (`fb_clock.loadEur({ fix: false })`), with the **tick volume** stored in the same file (the number of price changes in each minute; it is what a MetaTrader or TradingView VWAP uses on forex). Data check: from 2004 to 2008 a minute has about 5 to 13 ticks on average, later 30 to 100; in 2007 about 15% of minutes have one tick or none. The VWAP only uses the volume of each minute relative to the other minutes of the same week, so the level of volume across years does not matter; the thin years are reported.
- **The week:** a new week starts at the first minute after a gap of more than 24 hours (the weekend); the week ends at its last minute before such a gap. This does not depend on the clock labels.
- **30-minute bars** on the New York clock, stamped at their close (:00 and :30), built from the minutes that exist; a bar belongs to the week of its minutes (a bar never spans a weekend gap). The clock audit found labels an hour early in many weeks of 2004-2014; a shifted label moves whole 30-minute bars without changing their contents, and no rule depends on the time of day.
- **Holes (rule 3):** `data_holes_eur.json`; every gate and verdict is recomputed without the trades open across a suspect or unclear gap.

## The weekly VWAP (fixed now)
- **Price of a minute:** (open + high + low + close) / 4 (the webinar's own formula). **Weekly VWAP after minute i** = the sum of price x tick volume over the minutes of the week up to i, divided by the sum of their tick volume; undefined until the week has some volume. The **VWAP of a 30-minute bar** is the weekly VWAP after its last minute.

## Rules (described for a buy; a sell is the mirror)
- **Bias:** **bullish** from the close of a bar whose **low is above its VWAP** (a whole candle above), **bearish** from the close of a bar whose high is below its VWAP; unchanged otherwise; reset to none at the start of each week.
- **Pullback:** while the bias is bullish, a bar whose **low reaches its VWAP** (low <= VWAP).
- **Confirmation:** the first bar, from the pullback bar itself to the 3rd bar after it, that is **bullish (close > open) and closes above its VWAP**, before the bias turns bearish. No confirmation in that window: the pullback lapses; a later pullback can arm again.
- **Entry:** at the open of the first minute after the confirmation bar closes, in the same week; no entry in the last 2 hours of the week (a trade could not develop before the weekend close).
- **Stop ("behind the nearest swing point"):** swing lows of the 30-minute bars are bars whose low is strictly below the lows of the 2 bars before and the 2 bars after, known at the close of the 2nd bar after. The stop is **at the low** of the nearest known swing low below the entry (the webinar places it exactly at the low) whose distance from the entry is **at least 0.5 x ATR(14)** of the 30-minute bars (a closer one is "too close"; the next one down is used); if that distance is **more than 3 x ATR(14)**, or there is no such swing in the last 480 bars (about two weeks), a **fixed stop of 1.5 x ATR(14)** is used ("15 or 20 pips depending on volatility"). **R** = entry to stop.
- **Exits (two versions):**
  - **AV-BAR (take profit before the barrier):** the barrier is the **nearest above the entry** of: the known 30-minute swing highs of the last 480 bars, and the previous week's final VWAP. Target = barrier - 1 pip ("a couple of pips before"). **No trade if the target is less than 1R away** (not stated in the webinar; fixed here, because a target a few pips away is not a trade anyone would take).
  - **AV-TRAIL (trail below swing points):** no target; after the entry, each time a new 30-minute swing low becomes known above the current stop, the stop moves to it (at the low); exit at the stop.
  - **Both:** the stop is checked on every minute (a minute opening beyond it fills at its open; on AV-BAR the target likewise, the stop first); **every position is closed at the close of the last minute of its week** (before the weekend).
- **One position at a time;** longs and shorts.

## Variants (the only ones tested)
**AV-BAR, AV-TRAIL.** All long and short.

## Costs
- **About 1 pip per round trip** (the cost model of every EUR/USD test on the site); also shown at 1.5x and 2.5x. Results in pips and in R.
- **Financing scenarios** (the verdict uses the baseline): A, 2% a year of the entry price per calendar day held; B, today's IC Markets EUR/USD swap as recorded for the Turtle EUR/USD test (long -7.99, short +1.31 points per lot per night, Wednesday counting three, rollover at 17:00 New York): not a historical rate. Positions never cross a weekend.

## Periods, gates, control
- **Periods (by entry date):** development 2004 to 2012; validation 2013 to 2019; holdout 2020 to 2026-09-28 (**already used** by the earlier EUR/USD tests).
- **Six gates per variant** (net R): validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (pullback-to-average rules tried several times; many tests on this file); above the 95th percentile of 500 runs of the matched control; positive without the 10 best trades; holdout net positive (flagged used). Fewer than 30 trades: Inconclusive.
- **Matched control (moved entries):** every real trade moved, all together, by one random circular offset of whole weeks (at least 5% of them), entered at the open of the first minute of the new week at or after the same time into the week, same direction, the same stop distance in price, the same exit rule (AV-BAR: the same target distance; AV-TRAIL: the same trailing rule on the new week's swings), the same weekend close and costs. 500 runs, seeds 1000 + run. Statistic: the average net R per trade. It asks whether the pullback and confirmation pick better moments than the same trades at the same time of another week.
- **Also reported (descriptive, no gates):** how often the bias was bullish, bearish or none; pullbacks, confirmations and trades; which stop rule was used (swing, next swing, fixed); win rate with its Wilson interval; exits by reason; median risk and target in pips and the cost in R; long and short; by year; by day of the week; the thin-volume years separately.

## Engine and self-test (before the run)
New engine `av_lib.js` (reads the tick volume from the MetaTrader 4 file itself; the shared loaders are not changed), independent re-implementation `av_ref.js`, `av_selftest.js` that must pass before any result is printed: the weekly VWAP against hand-worked values (including a minute with zero volume), the week boundaries, the bias states, a pullback with confirmation on the same bar and 3 bars later, a lapse after 4 bars, a confirmation cancelled by a bearish bias, the last-2-hours rule, each stop rule (a swing, a too-close swing skipped, a too-far swing replaced by the fixed stop, no swing), the barrier choice (a swing high, the previous week's VWAP, a target under 1R skipped), the trailing stop moving up, stop and target in one minute, the weekend close, a short; the reference matched trade by trade on the real data for both versions; the control at offset 0 reproducing the real entries.

## Before the article
Results go to the owner first: both versions, every gate, long and short, by year, the exits, the stop rules used, the cost in R. One article, published only with the owner's agreement, linked to the VWAP on ES post. Working title for search: "Anchored VWAP Strategy Backtest: Trader Dale's Weekly VWAP Pullback on 22 Years of EUR/USD". The webinar and its author are named and quoted only as needed to state the rules.

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One market, one data source (a broker's tick volume, not exchange volume), the simplest mechanical reading of a method its author applies with combos and judgement.
