Indicators

TWAP (Time-Weighted Average Price): Formula, TWAP vs VWAP, and 25 Days of Execution on Bitcoin

The TWAP is the plain average of price over a period, every interval counting the same. The formula, how it differs from the VWAP, and what buying Bitcoin in 24 hourly slices would have cost against the day’s VWAP from October 4 to 28, 2026.

· Founder of PatternsWizard
Checked 7 min read
Session TWAP, (O + H + L + C) / 4, with session VWAP on Bitcoin, hourly, October 26, 2026, 12:00 UTC to October 28, 2026, 23:00 UTC. Illustration of how the indicator reads, not a backtest.
On this page
  1. TWAP formula
  2. TWAP vs VWAP
  3. Executing in 24 slices: TWAP against the day’s VWAP
  4. TWAP as an execution algorithm
  5. Does it work?
  6. Frequently asked questions

The time-weighted average price, or TWAP, is the plain average of price over a period, every interval counting the same. It has two uses. As an indicator, it is a line that averages each bar’s price since the start of the session. As an execution method, it means splitting a large order into equal slices sent at regular intervals, so that the average fill lands near the period’s TWAP. Below: the formula, how it differs from the VWAP, and what executing in 24 hourly slices would have cost against the VWAP on 25 days of Bitcoin.

Session TWAP and VWAP on hourly Bitcoin

Session TWAP, (O + H + L + C) / 4, with session VWAP on Bitcoin, hourly, October 24, 2026, 00:00 UTC to October 28, 2026, 23:00 UTC. Illustration of how the indicator reads, not a backtest.
  • Price, hourly candles (hollow up, filled down)
  • TWAP, reset at 00:00 UTC each day (solid line)
  • VWAP, same reset (dashed line)
Session TWAP, (O + H + L + C) / 4, with session VWAP on Bitcoin, hourly, October 24, 2026, 00:00 UTC to October 28, 2026, 23:00 UTC. Illustration of how the indicator reads, not a backtest.

TWAP formula

TradingView’s built-in TWAP averages a price per bar from the start of each period, the “Anchor Period” that sets “how frequently the TWAP calculation will be reset.” For the price of each bar, “Traditionally, the bar’s average value is used as the source. By default, the source is ohlc4”, the average of open, high, low and close. The chart uses that default and resets at 00:00 UTC each day.

A note on that help page: its opening paragraph also says the TWAP “is calculated by dividing the total value of a security traded over a specific period of time by the total number of shares traded during that period.” That is the definition of the VWAP, a volume-weighted average. The settings it then describes, an average of each bar’s price, are those of a TWAP, and that is what we compute.

TWAP vs VWAP

Splitting an order by the clock or by the volume

Splitting an order by the clock or by the volume: top: market volume through the day, uneven from one interval to the next. Middle: a TWAP plan sends the same slice in every interval. Bottom: a VWAP plan sizes each slice to the expected volume, larger in busy intervals and smaller in quiet ones. Both plans buy the same total quantity.
Schematic, not market data.
TWAPVWAP
Weight of each barThe sameIts volume
Price per barUsually (O + H + L + C) / 4Usually the typical price (H + L + C) / 3
Needs volume dataNoYes
As an execution methodEqual slices at equal intervalsSlices sized to the expected volume of each interval

The two lines part when volume is uneven through the day. On our hourly Bitcoin bars from October 4 to October 28, 2026, the three hours from 12:00 to 15:00 UTC carried 18.8% of the volume, the largest block in the chart below, against 12.5% for any three hours if volume were spread evenly. A TWAP gives those hours 3 of 24 shares of the order; a VWAP gives them their volume. The chart splits the day into eight blocks of three hours.

Share of the day's Bitcoin volume by three-hour block, UTC

Share of the day's Bitcoin volume by three-hour block, UTC. 00:00 to 03:00: 13.4%; 03:00 to 06:00: 9.6%; 06:00 to 09:00: 12.8%; 09:00 to 12:00: 10.6%; 12:00 to 15:00: 18.8%; 15:00 to 18:00: 15.6%; 18:00 to 21:00: 9.6%; 21:00 to 24:00: 9.6%. Our computation; the inputs and the method are in the text.
Our computation; the inputs and the method are in the text.Hourly bars from October 4 to October 28, 2026, volume of one exchange. An even spread would give each block 12.5%.

Executing in 24 slices: TWAP against the day’s VWAP

Suppose a trader buys the same quantity of Bitcoin every hour of a UTC day, 24 slices, and each slice fills at its hour’s (O + H + L + C) / 4. The average price paid is that day’s TWAP. We compared it with the day’s VWAP, the usual benchmark for an execution, over the 25 complete days of our hourly data.

The five largest daily gaps, TWAP minus VWAP, in basis points

The five largest daily gaps, TWAP minus VWAP, in basis points. October 4, 2026 (day +2.10%): −30.8; October 8, 2026 (day −1.88%): +29.2; October 21, 2026 (day +1.28%): −27.8; October 24, 2026 (day −0.37%): +22.7; October 15, 2026 (day +0.69%): +20.6. Our computation; the inputs and the method are in the text.
Our computation; the inputs and the method are in the text.TWAP: average of the 24 hourly (O + H + L + C) / 4. VWAP: hourly (H + L + C) / 3 weighted by volume. Below zero, buying by the clock cost less than the VWAP. In brackets, the change from the day's open to its close.

On October 4, the TWAP was 85,268.79 and the VWAP 85,532.31; on October 8, 82,323.12 and 82,083.83. Over the 25 days, the TWAP was above the VWAP on 14 days, meaning the buyer paid more than the benchmark, and below it on 11. The average gap, in absolute value, was 9.5 basis points, the median 5.6 and the largest 30.8: on October 4, buying by the clock cost 0.31% less than the day’s VWAP; on October 8, 0.29% more. A gap of 10 basis points on a 1,000,000 dollar order is 1,000 dollars. Part of the gap comes from the price of each bar, not the weighting: our VWAP prices each hour at (H + L + C) / 3; with (O + H + L + C) / 4 on both sides, the average gap is 8.5 basis points and the largest 27.2, still on October 4.

TradingView presents the method this way: “TWAP is most commonly used to facilitate execution of bigger orders without excessive impact on the market price. The order is split into separate smaller orders which are executed with a delay between them to ensure that the size of the orders does not affect the market negatively.”

TWAP as an execution algorithm

A fixed TWAP schedule and a varied one

A fixed TWAP schedule and a varied one: top: an order split into eight equal slices at equal intervals, a regular pattern that others can spot in the trades. Bottom: the same total quantity in eight slices whose sizes and timing vary around the schedule, harder to read.
Schematic, not market data.

As a strategy, a TWAP order fixes three things: the total quantity, the time window and the interval. The slice is the quantity divided by the number of intervals. In the example above, 24 hourly slices over a UTC day. The schedule needs no volume forecast, which makes it simple and usable on markets where volume data is poor, but it keeps trading at the same pace in quiet hours, when each slice is a larger share of what trades. A fixed size at a fixed interval is also easy to spot in the trades it leaves; varying the size or the timing of the slices makes it harder to read. Like any slicing method, it does not promise a fill at the TWAP itself: each slice still pays the spread and moves the price it trades at.

Does it work?

The TWAP is an execution benchmark, not a trading signal, so there is no profit to measure: our bench tests chart patterns against random entries (see our methodology). What the 25 days show is the size of the difference between the two benchmarks on Bitcoin: usually a few basis points, up to about 0.3% on a day. Which one an execution should be judged against depends on whether the trader wants to follow the clock or the volume.

Related pages: the session VWAP, the anchored VWAP, the volume-weighted moving average, day trading indicators and the list of technical indicators.

Every pattern's results on one sheet

The only pattern cheat sheet with tested stats: 152 patterns, what the textbook says and what really happened on 6 markets. Free PDF, sent to your inbox.

The PDF by email, plus our newsletter: new tests and results that change. Unsubscribe anytime. Privacy.

Frequently asked questions

What is TWAP?

The time-weighted average price: the plain average of price over a period, each interval weighted the same. It is also an execution method that splits a large order into equal slices at equal intervals.

How do you calculate TWAP?

Take a price for each bar, usually (open + high + low + close) / 4, add them up from the start of the period and divide by the number of bars. The average resets at the start of each period.

What’s the difference between VWAP and TWAP?

The VWAP weights each bar by its volume, the TWAP gives every bar the same weight. On 25 days of hourly Bitcoin bars, the two daily averages differed by 9.5 basis points on average and by 30.8 at most.

What is a TWAP strategy?

An execution plan that splits a large order into equal slices sent at equal time intervals over a chosen window, so that the average fill lands near the period's TWAP. It decides how to split the order over time, not whether to buy or sell, and it aims to limit market impact, not to make a profit.

Sources

  1. TradingView Help Center, Time Weighted Average Price
  2. StockCharts ChartSchool, Volume Weighted Average Price (VWAP)
, Founder of PatternsWizard

Passionate about finance, quantitative trading and data analysis. Amaury built the PatternsWizard test bench, which detects each pattern on full price history and measures what happened next against random entries.

PatternsWizard tests chart and candlestick patterns on full market history, against random entries. How we test patterns.

179 patterns testedRandom-walk self-test passed

All indicators articles