TradingView indicators

Weis Wave Volume: swing segmentation and confirmation

Weis Wave Volume adds up volume within each directional price wave. The reversal rule decides when to stop one total and start the next. To reconcile two charts, check their wave boundaries and volume allocation before interpreting a taller histogram as stronger participation.

Same wave: previous total + current volume
New wave: current volume starts a new total

In the worked example, a pullback of 1 price unit keeps the up-wave at 390 volume units. A later 2-unit reversal confirms its final 450 total and starts a down-wave at 150.

Educational calculation, not investment advice. Wave direction does not identify trade aggressors or institutional activity.

Start with the author and the version

David H. Weis developed the Weis Wave as part of his adaptation of Wyckoff analysis. His book jacket describes comparing volume with upward or downward price progress. That attribution does not make every TradingView script with the same name an identical implementation.

For the public TradingView indicator, open LazyBear's Weis Wave Volume publication. The author calls it a port of a clone and explicitly says its closeness to the original Weis tool is unknown. Its Trend Detection Length groups minor waves; ShowDistributionBelowZero changes the display sign.

Three implementations can share a name and produce different wave totals.
VersionBoundary contractComparison limit
LazyBear public portTrend Detection Length and a directional trend filter.A length setting is not a distance in ticks, price units or percent. Check the published source and version.
BollingerBoss label variantConfigurable source and reversal length; current wave marked as unconfirmed.The author's description also includes wave bar counts and average volume. Those are distinct outputs.
This page's exampleFixed distance from the closing-price extreme, evaluated at bar close.A documented teaching variant. It does not reproduce either community script or the proprietary Weis tool.

Define the reversal and allocation rules first

The code below uses standard time-based chart closes and a positive fixed distance R. During an up-wave, retain the highest close reached since that wave began; reverse down when extreme minus close is at least R. During a down-wave, retain the lowest close; reverse up when close minus extreme is at least R. Intrabar highs and lows do not enter these comparisons.

  • The first changed close establishes the initial direction without waiting for R. The seed bar and earlier flat warm-up bars are excluded, so the first wave is only a partial-history wave.
  • An equal close keeps the direction, keeps the extreme and adds the bar's volume. A smaller counter-move also stays in the existing wave.
  • The confirmation bar starts the new wave with its entire volume. The old total excludes that bar. Earlier pullback volume is never reassigned to a past pivot.
  • At an exact threshold match, reversal occurs because the comparison includes equality. A gap across the threshold still contributes one whole bar, with no estimate of where within that bar the volume traded.

A pivot-allocation variant might move the boundary back to the extreme and transfer later bars into the opposite wave. That can be useful for historical swing descriptions, but its final allocation was not available at the pivot itself. Record both the pivot time and the time the reversal became known.

A nine-bar example with a 2-unit reversal

These synthetic closes and arbitrary volume units follow the exact rules in the script. Each row is evaluated at bar close. The active total is shown as a positive magnitude; enabling the below-zero option displays down-wave values with a minus sign.

R = 2 price units. No fees, trades or performance results are involved.
BarCloseVolumeWaveActive totalDecision at close
0100100Warm-upNoneSeed volume excluded
1101120Up120First changed close starts a wave
2103180Up300Closing-price extreme becomes 103
310290Up390Retracement of 1 is below threshold
410260Up450Equal close; volume still enters the wave
5101150Down150103 - 101 = 2; confirm old total of 450
6100110Down260Closing-price extreme becomes 100
710170Down330Rebound of 1 is below threshold
8102130Up130102 - 100 = 2; confirm old total of 330

The first completed total is 120 + 180 + 90 + 60 = 450. It includes bars 3 and 4 even though the highest close was at bar 2. The down-wave finishes at 150 + 110 + 70 = 330. At bar 8, completed waves plus the active wave equal 450 + 330 + 130 = 910, exactly the assigned volume from bars 1 through 8.

A pivot-based reassignment after bar 2 could instead move the 90 and 60 units into the down-wave. That is a different contract, not a rounding discrepancy. Do not sum all histogram heights within one wave: 120, 300, 390 and 450 are successive cumulative snapshots, not four separate volumes.

A closed bar is not a completed wave

At bar 4, the up-wave has a known total of 450 so far, but its endpoint is still unknown. Bar 5 closes far enough below the extreme to confirm the change. The volume endpoint is bar 4; confirmation happens at bar 5; the highest price close occurred at bar 2. These three timestamps need not match.

The example updates only when barstate.isconfirmed is true. Its open-bar histogram is blank, and the last closed bar remains visible. Each subsequent closed bar can enlarge the active wave. This is deliberate confirmation delay, not a claim that all Weis Wave scripts behave the same way. TradingView documents this flag as true on historical bars and the final update of a realtime bar.

At reversal, the Data Window exposes the previous wave total on the confirmation bar and a diamond marks that same bar. No marker is shifted backward. Waiting for a close prevents a temporary intrabar threshold crossing from becoming a signal in this example; it cannot prevent historical feed corrections or changes caused by a different data starting point.

Pine Script v6: fixed-price wave volume

The default 2.0 means two chart price units. It is not an optimized setting. For a tick-based distance, convert your chosen tick count using the instrument's minimum tick. Percent and ATR-based variants need separate definitions for when the reference price or ATR value is sampled.

Pine Script v6
//@version=6
// Educational fixed-price reversal variant by Pineify.
// Not a reproduction of David Weis's proprietary tool or LazyBear's script.
indicator("Wave volume: fixed-price confirmation", overlay=false, format=format.volume)
reversal = input.float(2.0, "Reversal distance (price units)", minval=0.00000001)
belowZero = input.bool(true, "Plot down-wave volume below zero")

var int direction = 0
var float extreme = na
var float waveVolume = 0.0
var float observedVolume = 0.0
bool reversed = false
float completedVolume = na

if na(volume)
    runtime.error("Missing volume. Choose a feed with volume data.")

if barstate.isconfirmed
    observedVolume += volume
    if direction == 0
        // Ignore seed and flat warm-up bars; start on the first changed close.
        if not na(close[1]) and close != close[1]
            direction := close > close[1] ? 1 : -1
            extreme := close
            waveVolume := volume
    else
        int oldDirection = direction
        if direction == 1
            extreme := math.max(extreme, close)
            if extreme - close >= reversal
                direction := -1
        else
            extreme := math.min(extreme, close)
            if close - extreme >= reversal
                direction := 1
        reversed := direction != oldDirection
        if reversed
            completedVolume := waveVolume
            waveVolume := volume
            extreme := close
        else
            waveVolume += volume

if barstate.islast and barstate.isconfirmed and observedVolume == 0
    runtime.error("No nonzero volume in the loaded dataset.")

float signedVolume = direction == -1 and belowZero ? -waveVolume : waveVolume
plot(barstate.isconfirmed and direction != 0 ? signedVolume : na,
     "Active wave cumulative volume", style=plot.style_columns,
     color=direction == 1 ? color.teal : color.maroon)
plot(completedVolume, "Previous wave total confirmed now", display=display.data_window)
plot(direction, "Wave direction: +1 up, -1 down, 0 warm-up", display=display.data_window)
plotshape(reversed, title="Reversal confirmed", style=shape.diamond,
     location=location.top, color=color.blue, size=size.tiny, text="Flip")
hline(0, "Zero", color=color.gray)
alertcondition(reversed, "Wave reversal confirmed", "A new wave began at bar close.")

Paste the complete example into the TradingView Pine Editor.

  1. Add the example to a standard candlestick chart with volume. Use the Data Window to inspect direction and cumulative volume on each closed bar.
  2. Check a flat close, a sub-threshold pullback and an exact-threshold reversal. Confirm that the reversal bar starts a fresh total and prior bars keep their values.
  3. For notifications, create a TradingView alert from Wave reversal confirmed and choose Once Per Bar Close. The script declares a condition; the user must create the alert.
  4. Record the exchange feed, timeframe, session, loaded history and threshold with any comparison. Recreate the alert after changing the code or inputs.

This indicator places no orders. Syntax validation does not establish numerical equivalence with another script, profitable entries or live alert delivery.

Read participation without inventing order flow

An up-wave contains all supplied bar volume assigned to an upward price segment, including transactions on both sides of the market. The code reads only close and volume. Neither its color nor its sign establishes buyer-initiated volume, seller-initiated volume or institutional ownership.

  • Compare completed waves under the same rule. A longer wave can have more volume simply because it contains more bars; compare duration and price distance alongside its total.
  • A large volume total with little price progress can prompt an effort-versus-result hypothesis. It cannot distinguish absorption, two-way activity or a news event by itself, and it does not confirm a reversal.
  • Changing thresholds changes which bars are grouped together. Evaluate several preselected distances and record confirmation delays and false signals, rather than selecting a setting after seeing the desired turning points.
  • Feed coverage matters. TradingView may supply tick volume, traded volume or no volume depending on the symbol and timeframe. Tick volume counts price updates; it is not traded currency volume. A crypto exchange pair is also not the entire crypto market.

The script raises an error for missing volume or an all-zero loaded dataset. A zero-volume bar within an otherwise usable series can change direction while adding zero. Neither check proves feed quality. Use standard price bars when auditing this close-based example; synthetic chart prices change its input.

OBV keeps a signed running balance across bars, while this wave total resets on a boundary. Price Volume Trend weights volume by fractional price change. None of these formulas identifies individual buyers or sellers.

Specify your wave rules in Pineify

The Pine Script AI Coding Agent can help draft or modify the code from an explicit specification. Keep the boundary rule and the volume-assignment rule in the same request so they can be reviewed together.

Use closing prices and a fixed reversal distance in price units. Update only at bar close. Allocate the whole confirmation bar to the new wave, keep earlier pullback volume in the old wave, and expose the completed total on its confirmation bar. Mark equal-close behavior and reject missing volume.
Open Pine Script AI Coding Agent

Review the generated source and compare its values in TradingView. Pineify cannot reconstruct missing market volume or turn a wave-volume rule into evidence of profitable trading.

Weis Wave Volume questions

Sources and implementation scope

Sources checked October 17, 2026. Author publications establish attribution and version descriptions; the fixed-distance rules and numerical example are defined on this page.

Browse TradingView indicator guides