OPEN-SOURCE SCRIPT

Volume Profile Supertrend [HexaTrades]

6 045
Volume Profile Supertrend re-imagines the classic Supertrend. Instead of trailing bands built from pure volatility (ATR), it builds them around the levels where real volume has traded the Point of Control and Value Area.

The philosophy is simple: a normal Supertrend follows volatility; this one follows where the market accepts value. Price tends to gravitate to, and trend away from, the zones where the most business gets done. By anchoring the trend engine to value migration, the indicator aims to stay on the right side of the move while filtering out a portion of low-quality volatility noise.

Everything is computed internally in Pine; no built-in Volume Profile tool is used, so it works on any symbol and timeframe that has volume.


💡How it works


1. Rolling Volume Profile:
It looks back over the last Profile Lookback bars, finds the high–low range, and divides it into Number of Rows price buckets. Every historical bar's volume is distributed across the buckets its range spans, producing a fresh volume distribution on every candle.

2. POC, VAH & VAL:
POC (Point of Control) : the price bucket with the highest traded volume (the "fairest price").
Value Area: the script expands outward from the POC until it captures the chosen Value Area % (default 70%) of total volume.
VAH / VAL: the upper and lower edges of that Value Area.

快照

3. Smoothing & Supertrend bands:
POC, VAH, and VAL are smoothed with EMAs to remove jitter. Two trailing bands are then built, exactly like a Supertrend:

Lower band = smoothed VAL − (ATR × buffer) → support used while bullish.
Upper band = smoothed VAH + (ATR × buffer) → resistance used while bearish.
The bands only trail in the trend-following direction, so they lock in as the price advances.

4. Trend flip:
The trend is bullish while price holds above the lower band, and flips bearish when price closes below it (and vice-versa). The flip is evaluated against the previous bar's confirmed bands, so closed candles never change.


💡How to read it

🔶Bullish:A green line sits below the price. The market is accepting a higher value; treat pullbacks toward the line as the trend "breathing." A flip to red is your warning.

🔶Bearish: A red line sits above the price. Value is migrating lower; rallies into the line are where sellers tend to re-engage. A flip to green signals a potential turn.

快照

🔶Choppy Markets: When price is inside the value area and trend strength is low, the market may be sideways.
In these conditions, signals can be weaker. It may be better to wait for a clear value breakout or stronger trend strength.


🔺Signals

- BUY label prints when the trend flips from bearish to bullish.
- SELL label prints when the trend flips from bullish to bearish.
- A flip dot marks the exact bar of the change on the trend line.
- Trend Strength Filter: Set Minimum Trend Strength above 0 to filter out weak trend flips and display only higher-conviction signals. (Available in the indicator settings.)
快照


┼ Dashboard

-Trend: Current direction Bullish or Bearish.
-Strength: 0–100% conviction score blending distance from POC, POC slope, and whether price has broken outside the Value Area.
-Price Position: Above / Inside / Below Value Area.
-Last Signal: The most recent BUY or SELL that fired.

Alerts

The indicator includes alerts for important events:
-Buy Signal / Sell Signal
-Bullish Trend / Bearish Trend (flip)
-Price Above Value Area / Price Below Value Area
-Price Crossing POC EMA

Suggested Settings

For Intraday Trading
Use lower lookback and medium rows for faster signals.
Example:
-Profile Lookback: 50–100
-Rows: 30–50
-EMA Smoothing: 8–14
-ATR Buffer: 0.5–1.0

For Swing trading
Use higher lookback and smoother settings for cleaner signals.
Example:
-Profile Lookback: 100–250
-Rows: 40–70
-EMA Smoothing: 10–21
-ATR Buffer: 0.8–1.5

For Cleaner Signals
-Increase EMA Smoothing Length
-AIncrease TR Buffer
-Increase Minimum Trend Strength


Volume Profile Supertrend combines the proven structure of a Supertrend with the market's true area of value derived from a rolling Volume Profile. Instead of relying solely on price volatility, it follows the migration of value through the Point of Control (POC) and Value Area (VAH/VAL) to identify higher-quality trend changes.

Whether you're a day trader or swing trader, this indicator helps you visualize trend direction, identify dynamic support and resistance, filter weak reversals, and stay aligned with the prevailing market structure. Use it as a standalone trend-following tool or alongside your existing trading strategy for additional confirmation.


We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.


This indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。