All indicators

Volume-Weighted Supertrend Strategy

Jun 23, 2023

Static chart image
Volume BasedSignalsMoving AveragesVolatility

The Volume-Weighted Supertrend Strategy indicator utilizes a volume-weighted average price (VWAP) as its core calculation source to identify trend direction and momentum more accurately than standard price-based Supertrends. By combining a price-based VWAP Supertrend with a hidden volume-based Supertrend filter, it aims to generate high-probability signals confirmed by both price action and volume strength.

Usage

The indicator can be used as a standalone visual tool or as a functional trading strategy. It plots a Supertrend line on the chart that changes color based on the confluence of price and volume trends:

  • Green: Both the price-based VWAP Supertrend and the volume Supertrend are trending upward (Strong Bullish).
  • Blue: Only the price-based Supertrend is upward, while volume momentum is lagging.
  • Orange: Only the price-based Supertrend is downward, while volume momentum is lagging.
  • Red: Both the price-based VWAP Supertrend and the volume Supertrend are trending downward (Strong Bearish).

Buy signals are generated when both price and volume supertrends align bullishly. Sell signals are generated when both align bearishly. Users can toggle the "Show Strategy Entries and Exits" setting to visualize backtesting results directly on the chart.

Details

This script implements a custom variation of the Supertrend algorithm. Instead of using standard Close prices or HL2, it uses a rolling VWAP calculated over a user-defined period. Furthermore, it employs a second "hidden" Supertrend applied directly to volume data. This volume Supertrend uses a specialized ATR calculation for non-OHLC data. Signals occur at the intersection of these two trend-following logic sets, ensuring that price moves are backed by significant volume participation.

Settings

Main Settings

  • Show Strategy Entries and Exits: Toggles the visibility of strategy execution labels (Long/Close) on the chart.
  • Source: The price input used for the VWAP calculation (e.g., Close, HL2).
  • ATR Period: The lookback period used for the Average True Range calculation.
  • Volume Length: The period used for the rolling VWAP and the volume-based Supertrend filter.
  • ATR Multiplier: The multiplier applied to the ATR to determine the distance of the Supertrend bands.

Visual Settings

  • Highlighting: Enables or disables the background filling between the Supertrend line and price.
  • Labels: Toggles the visibility of the "Buy" and "Sell" labels on the chart.

FAQ

How can I access Volume-Weighted Supertrend Strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why do I not see any trade entries on my chart?

Ensure that the "Show Strategy Entries and Exits" checkbox is enabled in the indicator settings menu.

Which timeframes work best for this strategy?

Because Supertrends are trend-following indicators, this script performs best on trending assets and may produce more reliable signals on medium to high timeframes where volume data is more consistent.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.