Skip to content

VWAP Autostrategy

Version: v.2.0.0.0

VWAP Autostrategy

Description

This strategy identifies potential mean-reversion setups based on price dislocation from VWAP during volume spikes. When the market overextends relative to VWAP, the system flags a potential reversal. A machine learning model (via ML.NET) is then used to evaluate the probability of a successful reversal, using features such as VWAP slope, volume delta, ATR, MACD, and price distance at multiple time offsets. Positions are only taken when the model confirms a high probability of reversal in the intended direction.

Key features

Additional UI controls: Direction, Pause, Place orders.

Properties

General Parameters

  • Direction [default: Both] — Trading direction (OnlyLong, OnlyShort, Both).
  • Calculation type exit orders [default: Percent] — Exit calculation (Ticks, Pips, Percent, Currency).
  • Qty contracts [default: 1, range: 1–∞] — Number of contracts.
  • Grid count [default: 3, range: 1–∞] — Number of grid levels.
  • Order Spacing (ticks) [default: 100, range: 1–∞] — Spacing between orders.
  • Stop loss [default: 0.5, range: 0.001–∞] — Stop loss amount.
  • Profit target [default: 0.25, range: 0.001–∞] — Profit target amount.
  • Volume ratio [default: 1.5, range: 1–∞] — Volume spike ratio threshold.
  • Use ROI? [default: false] — Enable ROI-based exits.
  • Use ML.NET filter? [default: true] — Filter signals with ML model.

Ensemble Models

  • Use LightGbm [default: true] — Enable LightGbm classifier.
  • Use FastTree [default: true] — Enable FastTree classifier.
  • Use FastForest [default: true] — Enable FastForest classifier.
  • Use SDCA LogReg [default: true] — Enable SDCA logistic regression.
  • Use LBFGS LogReg [default: true] — Enable LBFGS logistic regression.
  • Use Averaged Perceptron [default: true] — Enable Averaged Perceptron classifier.
  • Use SGD Calibrated [default: true] — Enable SGD calibrated classifier.

Feature Params

  • (Slope) Start Bars Ago [default: 14, range: 1–∞] — Start bar for VWAP slope.
  • (Slope) End Bars Ago [default: 0, range: 0–∞] — End bar for VWAP slope.
  • (Delta) Type [default: BidAsk] — Cumulative delta calculation type.
  • (Delta) Period [default: Session] — Cumulative delta period.
  • (Delta) Size Filter [default: 0, range: 0–∞] — Delta size filter (0 = off).
  • (VWAP) Resolution [default: Tick] — Data resolution for VWAP.
  • (VWAP) Standard deviations [default: Two] — VWAP standard deviations.
  • (VWAP) SD1/SD2/SD3 Multiplier [default: 0.75, 1.5, 3, range: 0.001–∞] — VWAP SD multipliers.
  • (ATR) Period [default: 14, range: 1–∞] — ATR period for features.
  • (MACD) Fast/Slow/Smooth [default: 12, 26, 9, range: 1–∞] — MACD periods.
  • (Gap) Session Start Time [default: 08:30] — Session start for gap calculation.
  • Signal Offset Bars [default: 0, range: 0–∞] — Bars ago to read input signal.

ML Engine

  • Enable Logging [default: false] — Print() and MLEngine.log.
  • Show Metrics Table [default: true] — Show ensemble metrics table on chart.
  • Show Probability [default: true] — Show probability label on chart.
  • Use Metrics Filter [default: false] — Block signals if metrics below thresholds.
  • Use Auto Weights [default: true] — Auto weight models by AUC and F1.
  • Min Probability [default: 0.5, range: 0–1] — Minimum ensemble probability to pass signal.
  • Bars Ahead [default: 60, range: 1–∞] — Bars ahead for labeling.
  • Records Before Retrain [default: 10, range: 1–∞] — Samples before retraining.

ML Metrics Filter

  • Min AUC [default: 0.0, range: 0–1] — Minimum AUC required.
  • Min F1 [default: 0.0, range: 0–1] — Minimum F1 score required.
  • Min Accuracy [default: 0.0, range: 0–1] — Minimum accuracy required.
  • Min Precision [default: 0.0, range: 0–1] — Minimum precision required.
  • Min Recall [default: 0.0, range: 0–1] — Minimum recall required.

Probability Style

  • Probability font — Font family for probability labels.
  • Probability color — Text color for probability labels.
  • Probability offset (ticks) [default: 0] — Vertical offset in ticks.

Table Style

  • Table position [default: TopLeft] — Corner of chart for metrics table.
  • Table font — Font family for metrics table.
  • Table text color — Text color for metrics table.
  • Table background — Background fill for metrics table.
  • Table outline — Border/outline color for metrics table.
  • Table opacity [default: 75, range: 0–100] — Opacity (0-100).

Roi Parameters

  • Roi 1/2/3 [default: false] — Enable ROI levels.
  • Period 1/2/3 [default: 15, 30, 45, range: 0–∞ / 1–∞] — Bars for ROI levels.
  • Roi value 1/2/3 (%) [default: 0.2, 0.1, 0.05, range: 0–∞] — Target ROI per level.

Money Management

  • Enable Daily Profit [default: false] — Control daily profit.
  • Enable Daily Loss [default: false] — Control daily loss.
  • Daily loss limit ($) [default: 1000, range: 1–∞] — Daily loss limit in currency.
  • Daily profit target ($) [default: 1000, range: 1–∞] — Daily profit target in currency.

Day of Week

  • Sunday [default: false] — Enable trading on Sunday.
  • Monday [default: true] — Enable trading on Monday.
  • Tuesday [default: true] — Enable trading on Tuesday.
  • Wednesday [default: true] — Enable trading on Wednesday.
  • Thursday [default: true] — Enable trading on Thursday.
  • Friday [default: true] — Enable trading on Friday.
  • Saturday [default: false] — Enable trading on Saturday.

Trading time

  • Enable session 1 times? (optional) [default: false] — Enable first trading session.
  • Session 1 start time [default: 17:00] — Session first start time.
  • Session 1 end time [default: 15:00] — Session first end time.
  • Enable session 2 times? (optional) [default: false] — Enable second trading session.
  • Session 2 start time [default: 12:00] — Session second start time.
  • Session 2 end time [default: 16:00] — Session second end time.
  • Enable session 3 times? (optional) [default: false] — Enable third trading session.
  • Session 3 start time [default: 16:00] — Session third start time.
  • Session 3 end time [default: 23:59] — Session third end time.
  • Enable exit on session close [default: true] — Enable exit at the session close.
  • Session close time [default: 15:05] — Session close time.
  • Exit on session close minutes [default: 1, range: 1–∞] — Minutes before session close to exit.

Note:

If all days are disabled, the strategy will trade without any restrictions on days.

If all trading session clocks are turned off, the auto strategy will trade without time restrictions.

Version Change History

v.2.0.0.0 (Mar 9, 2026)

1) ML Engine filter feature added.