What is VWAP?
The Volume-Weighted Average Price (VWAP) is calculated by dividing the cumulative dollar value of every trade by the total volume traded during a session. Unlike a simple moving average, VWAP weights price by volume — so periods of heavy activity have more influence than quiet periods.
Every institutional trader, market maker and algo desk uses VWAP as a benchmark. When BTC-PERP trades significantly above or below VWAP, it often signals a temporary imbalance that will correct as passive orders step in.
The Reversion Logic
The VWAP reversion strategy is straightforward:
- When price drops more than 0.5% below VWAP → Long entry (expecting recovery to VWAP)
- When price rises more than 0.5% above VWAP → Short entry (expecting pullback to VWAP)
- Exit when price returns to VWAP (within 0.1%)
- Stop loss if price moves a further 0.8% against the position
The edge comes from the statistical tendency of price to revert to VWAP throughout the trading session. VWAP itself is not a prediction — it is a gravity line that price is constantly pulled toward.
Python Implementation for LMEX
import pandas as pddef calculate_vwap(df):
typical = (df['high'] + df['low'] + df['close']) / 3
cumvol = df['volume'].cumsum()
cumdollar = (typical * df['volume']).cumsum()
return cumdollar / cumvol
def get_signal(df):
vwap = calculate_vwap(df)
price = df['close'].iloc[-1]
v = vwap.iloc[-1]
deviation = (price - v) / v
if deviation < -0.005:
return 'LONG', v
elif deviation > 0.005:
return 'SHORT', v
return 'HOLD', v
VWAP Resets Daily
A critical implementation detail: VWAP resets at the start of each trading session. On crypto markets there is no official session open, so choose a reset time — 00:00 UTC is the standard for LMEX. Your bot should calculate VWAP from the midnight candle forward, not from inception.
Key Parameters
Deviation threshold (0.5%): The minimum distance from VWAP before entering. Tighter thresholds (0.2-0.3%) generate more signals but more noise. Wider thresholds (0.8-1.0%) give higher-quality entries but fewer trades.
Timeframe (15-minute): VWAP reversion works best on 15m and 1h bars. On 1-minute charts the signal is too noisy; on 4h+ the deviation is too rare.
Session reset (00:00 UTC): Always reset VWAP at midnight UTC for crypto. Later in the day when more volume has accumulated, the VWAP line is more stable and reliable.
Risk Management
- Position size: 2% of account per trade
- Stop loss: 0.8% beyond entry (1.3% total from VWAP)
- Maximum trades per session: 6
- Avoid entering in the first 30 minutes after VWAP reset — insufficient volume makes the line unreliable
- Do not trade VWAP reversion during major news events (Fed minutes, CPI etc.)
When it Underperforms
Strong trending days — when BTC rallies or sells off 5%+ — will cause VWAP to trail far above or below price. Entering counter-trend repeatedly into a trending market is the main risk. Add a filter: if the VWAP deviation exceeds 2%, skip the trade (the market is trending, not ranging).
Key Takeaways
- VWAP is the institutional benchmark — price is statistically pulled toward it throughout the session
- Deviation threshold of 0.5% on BTC-PERP 15m chart gives 3-8 signals per day
- Always reset VWAP at 00:00 UTC and skip the first 30 minutes of the session
- Stop loss at 0.8% beyond entry protects against trending days
- Combine with volume confirmation: only enter if the deviation candle has below-average volume (exhaustion, not breakout)