VWAP Magnet
- Experts
- 버전: 1.0
- 활성화: 5
HJF TRADING SYSTEMS
VWAP Magnet
VWAP Mean-Reversion Strategy — Summary
Overview
VWAP Magnet is an Expert Advisor for MetaTrader 5 that trades a single, well-known market behaviour: price tends to be pulled back toward the session VWAP (Volume-Weighted Average Price) — the "fair value" that institutions benchmark against.
This is a mean-reversion strategy, not a trend-prediction one. When price stretches away from VWAP, the robot fades the move with limit orders and manages the position back toward fair value, using a progressive averaging grid with a fixed target and stop.
How the Strategy Operates
Session VWAP band
At the configured candle of the session, the robot freezes a band of ± a percentage (Variation) around the session VWAP. This band defines where it will fade price for the rest of the window.
Mean-reversion entries
The robot places limit orders to sell at the upper band and buy at the lower band — betting on the return to VWAP. New entries are taken only inside the configured time window (HoraInicio–HoraFim).
Averaging grid (martingale)
While in a position, if price keeps moving away, the robot adds grid levels in favour of the average price, with the number of contracts defined per level. By default the first levels increase exposure (2 → 4 → 8 → 10 contracts), aiming to bring the average price closer to VWAP so the whole sequence can close at or above break-even.
Target and stop
Each side is managed by a fixed take-profit and stop-loss measured in ticks from the average price (default 100 / 250). Exits are monitored by price and executed by closing the position by ticket, which behaves identically on netting and hedging accounts (it never uses opposite orders).
New-session reset
At the start of each new session the frozen band is recalculated and any leftover pending band orders are cancelled, so each day starts from a clean state.
Risks — Required Reading
● Grid / martingale sizing. The first grid levels increase the number of contracts. In a strong, prolonged move away from VWAP, accumulated exposure and drawdown can grow quickly across just a few levels.
● The protection is the fixed stop per side, not the grid. The grid averages the entry; the defined Stop (in ticks) is what caps the loss. Set it to a value your capital can absorb at your contract sizes.
● No built-in daily loss limit. The session window limits when new entries are taken, not how much an open sequence can lose.
● Drawdowns can be sudden and significant on high-volatility days or around news events.
● Past performance does not guarantee future results.
Recommendations
● Test extensively on a demo account, and in the Strategy Tester on real ticks, before trading live.
● Only trade with capital you can afford to lose.
● For a first live run, prefer the conservative preset (equal contracts per level) instead of the default escalation.
● Actively monitor grid exposure through the robot’s on-chart panel.
● Adjust the band width, target, stop and contracts per level to your risk profile before trading live.
Mandatory Requirements
● Instrument WIN (B3 mini-index). The band and sizing were built and tuned for WIN; other instruments require re-tuning.
● Intraday timeframe (M1–M5 recommended). The VWAP and signals are computed from the chart’s timeframe.
● Futures-enabled account — works on both netting and hedging (exits close by ticket, so a hedge account is not required).
● A VPS or an always-on machine is recommended for live trading.
Parameters
HJF Panel
● TipoPainel — Classic or Pro dashboard.
● PainelX / PainelY — panel position on screen.
● AtalhosTeclado — enables keyboard shortcuts for the Pro panel.
Session
● HoraInicio (0905) / HoraFim (1205) — window in which new entries may be opened (HHMM, server time).
VWAP Band
● Variation (0.38) — band half-width as a percentage of the VWAP.
● Candle (1) — the session bar at which the band is frozen.
Target / Stop
● Alvo (100) — take-profit in ticks from the average price.
● Stop (250) — stop-loss in ticks from the average price.
Grid
● NumNiveis (5) — how many grid levels to use (1–10).
● Nivel1..10 — distance in ticks of each grid level.
● Contrato1..10 — contracts at each grid level (default 2, 4, 8, 10, 1, …).
System
● MagicNumber — unique identifier for this robot’s orders.
● Slippage (30) — maximum price deviation tolerated on execution.
● Debug (off) — prints detailed logs of every decision.
Disclaimer
This material is provided for educational and informational purposes only, describing the technical operation of the strategy. It does not constitute investment advice or a promise of profitability. Trading in financial markets, especially grid/martingale strategies such as this one, involves real risk of capital loss, which in adverse scenarios can exceed the capital initially allocated to the strategy. Backtest or demo account results do not guarantee similar results on a live account. The user is solely responsible for parameter configuration, for the decision to run this strategy, and for any financial outcome resulting from its use.
