VWAP strategy: rules, example and limits

By Oalgo · Last reviewed

A VWAP strategy uses VWAP, the volume-weighted average price of the day so far, as the line to act around. Some rules only allow entries on one side of it. Others treat it as the level price comes back to after a stretch away. VWAP restarts every day, so these rules are made for short candles such as 15 minutes or 1 hour.

Chart: three days of example prices with VWAP drawn over them and the volume of each candle below. A VWAP rule acts where the close crosses VWAP, and VWAP starts again at the first candle of each day.PriceVWAPDay 1Day 2Day 3Volume
Example prices and volumes, made up for this page. Each day has 40 candles.

What are the rules of a VWAP strategy?

#
  • Side filter: allow entries only while the close is above VWAP, or only while it is below.
  • Cross entry: enter when the close crosses above VWAP, and exit when it crosses back below.
  • Distance entry: enter when the close is a set percentage below VWAP, and exit when it is back at VWAP. A percentage needs arithmetic. In the builder, a Math block can multiply VWAP by 0.99, for example, in front of a Compare block.
  • Bands: Oalgo AI can build bands at a set number of volume-weighted standard deviations around VWAP, and a rule can use them.
  • Stop: a Stop Loss as a percentage.

What does a worked example look like?

#

Six candles of one day, with made-up typical prices and volumes. Candle 1 starts the day, so VWAP starts at its typical price.

CandleCloseTypical priceVolumeVWAP so farClose against VWAP
110010050100Level
2101.510130100.38Above: crosses above, entry
398.5998099.69Below: crosses below, exit
498.2986099.23Below
51011004099.35Above: crosses above, entry
6103.210370100.12Above

Candle 3: VWAP = (100 × 50 + 101 × 30 + 99 × 80) ÷ (50 + 30 + 80) = 15,950 ÷ 160 = 99.69. Six candles gave three crosses. Early in a day VWAP sits close to price, so crosses are common, and each one can cost a fee.

How do you write this strategy in Oalgo?

#

In Oalgo you can tell Oalgo AI your VWAP rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.

For example, you could tell Oalgo AI: "Enter when the close crosses above VWAP. Exit when the close crosses back below VWAP. Use a 1% Stop Loss and a 2% exit target. Run it on 15-minute candles." These numbers are examples to change. In the builder the Crosses block takes the Price block (the close) and the VWAP block, which has no setting and restarts on each new calendar day. For a VWAP that starts somewhere else, such as a swing or the open of a session, Oalgo AI can build an anchored VWAP as an indicator. A Live Strategy needs a stop on each side it can enter, and an exit target is optional. The example names both.

How do you test this strategy honestly?

#
  • Use short candles. On 1-day candles every candle is a day of its own and VWAP is just its typical price. The timeframe page explains candle length.
  • Run a backtest over many days, not a few. One good day says little.
  • Count the trades. Crosses are frequent early in the day, and each one pays fees.
  • Run the same rule with a moving average in place of VWAP on the same dates. The VWAP vs moving average page explains why the two behave differently.
  • Run a forward test on new prices, with simulated funds.

What can a VWAP strategy not tell you?

#

VWAP is an average of what has already happened today. Being above it does not mean price will keep rising, and a cross is not a turning point by itself. The line starts again each day, so a trade that stays open past the day change meets a different VWAP, and the first candles of a day move it a lot. A candle with very large volume also pulls VWAP toward its own price, whatever the reason for that volume.

Read next