Skip to content
All library documents

VWAP Touch Entries with Rolling Limits and Time-Based Controls

Article Strategy library · Author: kalvey16

Summary

The document presents a script for a VWAP-based intraday strategy. It calculates VWAP from typical price and uses the prior bar's VWAP as a rolling limit price; the prior close's position relative to that VWAP sets a mechanical long or short bias. Inputs control position quantity, stop and target distances, allowed trade direction, a New York trading window, and a time to flatten positions. Pending orders can optionally expire after a chosen number of bars.

The visible code also begins logic for handling re-entry after stopped trades, with modes that can delay another entry or require confirmation, including a stretch-and-flip condition. However, the supplied document cuts off partway through that section, so the complete order placement and exit behavior cannot be assessed. It gives no instrument, test period, or performance evidence. The approach therefore describes execution and timing rules rather than establishing that VWAP touch entries are profitable; results would depend on market, fill assumptions, and the missing remainder of the strategy.

Key ideas

  • The prior bar's VWAP is used as the rolling limit price for entries.
  • The previous close relative to prior VWAP determines the permitted directional bias.
  • Inputs define stop and target distances, long and short permissions, and a New York trading window.
  • Optional controls expire pending orders, manage re-entry after a losing exit, and force positions flat at a specified time.
  • The supplied source is truncated before the full order and exit logic, and it reports no backtest results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.