OPEN-SOURCE SCRIPT
Volume Percentile Supertrend [BackQuant]

Volume Percentile Supertrend [BackQuant]
A volatility and participation aware Supertrend that automatically widens or tightens its bands based on where current volume sits inside its recent distribution. The goal is simple: fewer whipsaws when activity surges, faster reaction when the tape is quiet.
What it does
Why volume percentile
How it works
Inputs and what they change
Reading the plot
Typical workflows
Notes on behavior
Quick checklist
What the signals mean
Summary
Volume Percentile Supertrend adapts the classic Supertrend to the day you are trading. Volume percentile sets the mood, sensitivity translates it into dynamic band width, and smoothing keeps it clean. The result is a single plot that aims to stay conservative when the tape is loud and act decisively when it is quiet, without you having to constantly retune settings.
A volatility and participation aware Supertrend that automatically widens or tightens its bands based on where current volume sits inside its recent distribution. The goal is simple: fewer whipsaws when activity surges, faster reaction when the tape is quiet.
What it does
- Calculates a standard Supertrend framework from an ATR on a volume weighted price source.
- Measures current volume against its recent percentile and converts that context into a dynamic ATR multiplier.
- Widens bands when volume is unusually high to reduce chop. Tightens bands when volume is unusually low to catch turns earlier.
- Paints candles, draws the active Supertrend line and optional bands, and prints clear Long and Short signal markers.
Why volume percentile
- Fixed ATR multipliers assume all bars are equal. They are not. When participation spikes, price swings expand and a static band gets sliced.
- Percentiles place the current bar inside a recent distribution. If volume is in the top slice, the Supertrend allows more room. If volume is in the bottom slice, it expects smaller noise and tightens.
- This keeps the same playbook usable across busy sessions and sleepy ones without constant manual retuning.
How it works
- Volume distribution - A rolling window computes the Pth percentile of volume. Above that is flagged as high volume. A lower reference percentile marks quiet bars.
- Dynamic multiplier - Start from a Base Multiplier. If bar is high volume, scale it up by a function of volume-to-average and a Sensitivity knob. If bar is low volume, scale it down. Smooth the result with an EMA to avoid jitter.
- VWMA source - The price input for bands is a short volume weighted moving average of close. Heavy prints matter more.
- ATR envelope - Compute ATR on your length. UpperBasic = VWMA + Multiplier x ATR. LowerBasic = VWMA - Multiplier x ATR.
- Trailing logic - The final lines trail price so they only move in a direction that preserves Supertrend behavior. This prevents sudden flips from transient pokes.
- Direction and signals - Direction flips when price crosses through the relevant trailing line. SupertrendLong and SupertrendShort mark those flips. The plotted Supertrend is the active trailing side.
Inputs and what they change
- Volume Lookback - Window for percentile and average. Larger window = stabler percentile, smaller = snappier.
- Volume Percentile Level - Threshold that defines high volume. Example 70 means top 30 percent of recent bars are treated as high activity.
- Volume Sensitivity - Gain from volume ratio to the dynamic multiplier. Higher = bands expand more when volume spikes.
- VWMA Source Length - Smoothing of the volume weighted price source for the bands.
- ATR Length - Standard ATR window. Larger = slower, smaller = quicker.
- Base Multiplier - Core band width before volume adjustment. Think of this as your neutral volatility setting.
- Multiplier Smoothing - EMA on the dynamic multiplier. Reduces back and forth changes when volume oscillates around the threshold.
- Show Supertrend on chart - Toggles the active line.
- Show Upper Lower Bands - Draws both sides even when inactive. Good for context.
- Paint candles according to Trend - Colors bars by trend direction.
- Show Long and Short Signals - Prints 𝕃 and 𝕊 markers at flips.
- Colors - Choose your long and short palette.
Reading the plot
- Supertrend line - Thick line that hugs price from above in downtrends and from below in uptrends. Its distance breathes with volume.
- Bands - Optional upper and lower rails. Useful to see the inactive side and judge how wide the envelope is right now.
- Signals - 𝕃 prints when the trend flips long. 𝕊 prints when the trend flips short.
- Candle colors - Quick bias read at a glance when painting is enabled.
Typical workflows
- Trend following - Use 𝕃 flips to initiate longs and ride while bars remain colored long and price respects the lower trailing line. Mirror for shorts with 𝕊 and the upper trailing line. During high volume phases the line will give more room, which helps stay in the move.
- Pullback adds - In an established trend, shallow tags toward the active line after a high volume expansion can be add points. The dynamic envelope adjusts to the session so your add distance is not fixed to a stale volatility regime.
- Mean reversion filter - In quiet tape the multiplier contracts and flips come earlier. If you prefer fading, watch for quick toggles around the bands when volume percentile remains low. In high volume, avoid fading into the widened line unless you have other strong reasons.
Notes on behavior
- High volume bar: the percentile gate opens, volRatio > 1 powers up the multiplier through the Sensitivity lever, bands widen, fewer false flips.
- Low volume bar: multiplier contracts, bands tighten, flips can happen earlier which is useful when you want to catch regime changes in quiet conditions.
- Smoothing matters: both the price source (VWMA) and the multiplier are smoothed to keep structure readable while still adapting.
Quick checklist
- If you see frequent chop and today feels busy: check that volume is above your percentile. Wider bands are expected. Consider letting the trend prove itself against the expanded line before acting.
- If everything feels slow and you want earlier entries: percentile likely marks low volume, so bands tighten and 𝕃 or 𝕊 can appear sooner.
- If you want more or fewer flips overall: adjust Base Multiplier first. If you want more reaction specifically tied to volume surges: raise Volume Sensitivity. If the envelope breathes too fast: raise Multiplier Smoothing.
What the signals mean
- SupertrendLong - Direction changed from non-long to long. 𝕃 marker prints. The active line switches to support below price.
- SupertrendShort - Direction changed from non-short to short. 𝕊 marker prints. The active line switches to resistance above price.
- Trend color - Bars painted long or short help validate context for entries and management.
Summary
Volume Percentile Supertrend adapts the classic Supertrend to the day you are trading. Volume percentile sets the mood, sensitivity translates it into dynamic band width, and smoothing keeps it clean. The result is a single plot that aims to stay conservative when the tape is loud and act decisively when it is quiet, without you having to constantly retune settings.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Check out whop.com/signals-suite for Access to Invite Only Scripts!
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Check out whop.com/signals-suite for Access to Invite Only Scripts!
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.