OPEN-SOURCE SCRIPT

Volume & Movement

473
# Volume & Movement

A separate TradingView Pine v6 indicator for comparing activity, sustained volume and candle behaviour. Uses the chart's own candles and feed volume.

## Install

1. Open a standard candlestick chart in TradingView.
2. Open **Pine Editor**, create a new indicator and replace its contents with `Volume_and_Movement.pine`.
3. Choose **Add to chart**. Save under **Volume & Movement** if you want to keep it in your account.

No extra data subscription, library or account connection is used by the script. The chart's own market-data availability still applies. Alerts require you to create an alert in TradingView; this script does not create alerts or orders automatically.

## Read the pane

The default bars compare each completed candle's volume with the immediately preceding candle:

| Reading | Meaning |
|---|---|
| 0.50× | Half as much volume |
| 1.00× | The same volume |
| 2.00× | Twice as much volume |
| 3.00× | Three times as much volume |

**Blue:** more than 10% above the previous candle. **Amber:** more than 10% below it. **Grey:** within that neutral zone, or no valid previous comparison. Colours describe the change in volume, not buying or selling. The neutral zone and all colours are adjustable.

The **slate line** compares the combined volume of the latest five candles with the five immediately before them. Example: the earlier group totals 500 and the latest group totals 800; the line reads 1.60×. These groups do not overlap within an individual comparison. Each new candle advances both windows one candle.

The dashed **1× line** is the equal-volume reference. The default scale is uncapped. If you set a visual cap, orange dots mark clipped readings; their exact values remain in the dashboard and Data Window.

You can change bar height to **Recent typical** or **Matching clock time**. The bar colours continue to show change against the previous candle. The group line always retains its own group-to-group comparison. These are distinct baselines, although all use a 1× reference.

## Purple markers

These are adjustable descriptive conditions, not predictions or trade recommendations:

| Marker | What happened | Default rule |
|---|---|---|
| **S — Busy / stalled** | High activity, small range and little net price progress | High volume; range at/below prior 30th percentile and ≤0.75× typical; close-to-close distance ≤0.5× typical range |
| **A — Busy / advancing** | High activity and a large candle closing near an edge | High volume; range at/above prior 80th percentile and ≥1.25× typical; body ≥60% of range; close in top/bottom 20% |
| **R — Busy / rejection** | High activity with a dominant wick and a recovered close | High volume; range ≥typical; wick ≥60% of range; close in upper 35% for a lower wick, or lower 35% for an upper wick |
| **L — Large move / light volume** | Large candle range despite unusually light activity | Low volume; range at/above prior 80th percentile and ≥1.25× typical |

High volume must exceed the prior 90th-percentile value **and** be at least 1.5× the baseline median. Low volume must be below the prior 20th-percentile value **and** at most 0.65× the median. Requiring both a percentile and a multiple avoids labelling tiny fluctuations as extremes. Equal values at a percentile boundary do not qualify as unusual volume.

Default baselines use the **previous 100 candles**, excluding the candle being assessed. Typical means the median. An optional setting uses the matching-time volume baseline once it has enough samples; otherwise the dashboard explicitly identifies the recent-history fallback. Candle-size baselines continue to use recent candles in either mode.

Classification priority is S, then R, then A, then L. A price gap between the previous close and the candle open exceeding half the typical candle range suppresses these shape labels and is identified in the dashboard. The volume readings still remain available where comparable.

## Time-of-day context

“Same clock time” compares volume with the median of prior candles opening at the same clock minute. Default: exchange timezone, previous 28 calendar days, weekdays together and Saturday/Sunday separately, at least three matching days.

For example, an exchange-time 10:00–10:15 candle is compared with previous matching 10:00–10:15 candles, rather than the quieter overnight candles. This is a custom median-based comparison; it is not an exact clone of TradingView's built-in Relative Volume at Time.

- Supported for native intraday charts from 1 minute through 4 hours. Other standard timeframes retain the previous-candle, group and recent-history readings.
- Only completed, full-duration candles enter time history. The current day never enters its own baseline. Missing sessions are skipped, not treated as zero.
- Matching uses the exact opening minute and the same full chart-candle duration. For example, a 09:30 candle is never substituted for a 09:00 candle.
- Day matching can use all days, weekday/weekend groups, or the same weekday. Same-weekday matching needs more calendar history to warm up.
- The available chart history limits the sample. “Warming” means not enough matching history or no positive median; it does not mean low volume.
- Exchange time follows the exchange's daylight-saving rules. Brisbane remains fixed. During a repeated daylight-saving clock hour, the last completed candle for that day's bucket is retained, so each day contributes at most one observation.

## Timing, gaps and data

By default, the unfinished live candle is hidden and the dashboard shows the latest closed candle. Optional live preview is faded and explicitly labelled LIVE; its volume is incomplete and is not extrapolated to a full candle. Markers and alerts always wait for a confirmed close.

By default, immediate and group comparisons do not cross intraday session gaps or unequal-duration candle boundaries. They become available again after comparable candles accumulate. You can override this in settings. An unavailable or zero denominator produces “—”, never an infinite ratio. Valid zero current volume can produce 0×.

Detailed mode adds body/wick percentages and the group's net price distance divided by all close-to-close distance travelled. 100% means each close moved in one direction; a small percentage means more back-and-forth movement. Neither this nor candle direction identifies actual buyer-initiated versus seller-initiated volume.

The volume belongs to the selected symbol and feed. It may represent units, contracts, quote currency or tick activity depending on the feed. Comparisons do not combine exchanges or reconstruct order flow. Standard time-based charts are required; synthetic chart types are rejected.

## Alerts and sensible starting settings

Start with **Previous candle**, groups of **5**, history **100**, default anomaly thresholds and closed candles. Enable detailed mode only when examining a candle. The Data Window gives exact historical values when you move the crosshair; the dashboard shows the latest eligible candle.

Alert choices: any unusual event, or S/A/R/L individually. The default alerts only when an anomaly appears or its type/direction changes. Disable that option for every qualifying closed candle. Configure notifications yourself in TradingView.

Thresholds are starting definitions to evaluate, not settings demonstrated to improve trading results. This version does not include EMA-band integration, automatic impulse/pullback segmentation, an order-flow feed, a scanner or trade execution.

## Verification

See `VERIFICATION.md` for the actual checks performed and any remaining TradingView compile/runtime limitation.

References: [TradingView bar states](tradingview.com/pine-script-docs/concepts/bar-states/), [chart information and volume](tradingview.com/pine-script-docs/concepts/chart-information/), [Relative Volume at Time](tradingview.com/support/solutions/43000705489-relative-volume-at-time/).

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.