Price and Volume Swing

📘 𝐒𝐮𝐦𝐦𝐚𝐫𝐲
Price and Volume Swing (PAVS) is a Pine Script v6 indicator that combines price movement and trading volume to identify alternating swing highs and lows using a normalized momentum score.
The indicator calculates cumulative volume-weighted price returns and applies the Relative Strength Index (RSI) to produce a momentum score generally ranging from 0 to 100.
Upper and lower momentum levels determine swing transitions, while developing swing markers and connecting lines visualize changes in price structure.
A built-in PAVS Dashboard displays momentum readings and threshold-event direction across 16 timeframes.
PAVS is designed to help traders study price swings, momentum transitions, and differences between shorter- and longer-timeframe conditions.
📘 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
• Cumulative Price Volume Trend (PVT) calculation
• RSI-normalized momentum score
• Configurable upper and lower swing levels
• Alternating swing-high and swing-low detection
• Dynamic swing-extreme tracking
• Momentum readings displayed on swing markers
• Red and green swing-connecting lines
• Extreme momentum triangle markers
• Sixteen-timeframe PAVS Dashboard
• Color-coded momentum score backgrounds
• Directional arrows based on threshold-event history
• Adjustable momentum period
• Optional dashboard display
📘 𝐋𝐨𝐠𝐢𝐜
𝐀. 𝐏𝐫𝐢𝐜𝐞-𝐕𝐨𝐥𝐮𝐦𝐞 𝐌𝐨𝐦𝐞𝐧𝐭𝐮𝐦
PAVS begins by calculating cumulative volume-weighted price returns, equivalent to the Price Volume Trend (PVT) calculation.
Formula:
Price-Volume Total = Cumulative Sum [(Close − Previous Close) / Previous Close × Volume]
Positive price changes contribute positively to the cumulative series, while negative price changes contribute negatively.
The magnitude of each contribution depends on both the percentage price change and reported trading volume.
The indicator then applies RSI to the cumulative series.
Momentum Score = RSI(Price-Volume Total, Momentum Period)
Default Momentum Period: 14.
The resulting score describes the relative strength of recent upward and downward changes in the cumulative price-volume series.
This is a derived momentum measurement, not a direct representation of institutional trading, order-book activity, or aggressive buyer-versus-seller transactions.
𝐁. 𝐔𝐩𝐩𝐞𝐫 𝐚𝐧𝐝 𝐋𝐨𝐰𝐞𝐫 𝐒𝐰𝐢𝐧𝐠 𝐋𝐞𝐯𝐞𝐥𝐬
PAVS uses two configurable momentum levels.
Default Upper Swing Level: 70
Default Lower Swing Level: 30
Upper Band:
Momentum Score >= Upper Swing Level
Lower Band:
Momentum Score <= Lower Swing Level
These conditions establish the thresholds used to identify alternating swing phases.
A neutral reading between the two levels does not independently create a new swing event.
𝐂. 𝐀𝐥𝐭𝐞𝐫𝐧𝐚𝐭𝐢𝐧𝐠 𝐒𝐰𝐢𝐧𝐠 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧
PAVS tracks alternating upper and lower swing phases using momentum threshold events.
An upper swing begins when the previous phase was lower and the momentum score reaches the upper swing level.
A lower swing begins when the previous phase was upper and the momentum score reaches the lower swing level.
The first threshold event initializes the swing phase without creating a marker. The first marker appears when momentum subsequently reaches the opposite threshold.
This approach identifies momentum-defined swings rather than conventional fixed-length pivot highs and lows.
𝐃. 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐔𝐩𝐩𝐞𝐫 𝐒𝐰𝐢𝐧𝐠𝐬
When an upper swing begins, the indicator creates a red circular marker near the candle high.
The marker displays the momentum score associated with the event.
On any subsequent bar that meets the upper momentum threshold, an equal or higher price high updates the developing upper endpoint.
The marker position and displayed momentum score are updated accordingly.
The connected red swing segment also adjusts to the updated endpoint.
A developing upper endpoint can therefore update after momentum temporarily leaves the upper band and later returns, provided the qualifying price condition is met.
𝐄. 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐋𝐨𝐰𝐞𝐫 𝐒𝐰𝐢𝐧𝐠𝐬
When a lower swing begins, the indicator creates a blue circular marker near the candle low.
The marker displays the corresponding momentum score.
On any subsequent bar that meets the lower momentum threshold, an equal or lower price low updates the developing lower endpoint.
The marker position, momentum text, and connected green swing segment adjust accordingly.
A developing lower endpoint can therefore update after momentum temporarily leaves the lower band and later returns, provided the qualifying price condition is met.
𝐅. 𝐒𝐰𝐢𝐧𝐠 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐢𝐨𝐧𝐬
PAVS draws connecting lines between alternating upper and lower swing endpoints.
Red lines connect a previous lower swing to a developing upper swing.
Green lines connect a previous upper swing to a developing lower swing.
These lines visualize price movement between momentum-defined swing events.
They do not represent automatic trend forecasts, profit targets, or confirmed trade entries.
𝐆. 𝐄𝐱𝐭𝐫𝐞𝐦𝐞 𝐌𝐨𝐦𝐞𝐧𝐭𝐮𝐦 𝐌𝐚𝐫𝐤𝐞𝐫𝐬
PAVS highlights two additional momentum conditions.
Upper Stretch:
Momentum Score >= 90
A small red downward triangle appears above the corresponding candle.
Lower Stretch:
Momentum Score <= 10
A small blue upward triangle appears below the corresponding candle.
These conditions identify stretched momentum readings.
They do not independently confirm a reversal or continuation.
𝐇. 𝐏𝐀𝐕𝐒 𝐃𝐚𝐬𝐡𝐛𝐨𝐚𝐫𝐝
The PAVS Dashboard displays momentum information across 16 timeframes.
Seconds:
1s, 5s, 10s, 15s, 30s, 45s
Minutes:
1m, 5m, 15m, 30m, 45m
Hours:
1h, 2h, 3h, 4h
Daily:
1D
The dashboard contains two columns:
Period
Displays the requested timeframe.
Momentum / Swing
Displays the momentum score to one decimal place and a directional arrow based on threshold-event history.
𝐈. 𝐃𝐚𝐬𝐡𝐛𝐨𝐚𝐫𝐝 𝐂𝐨𝐥𝐨𝐫 𝐂𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧
Dashboard background colors classify the momentum score using fixed boundaries at 20, 30, 70, and 80.
• 80–100: Dark red — Extreme upper momentum
• 70–below 80: Red — Upper momentum
• Above 30–below 70: Gray — Neutral momentum
• Above 20–30: Blue — Lower momentum
• 0–20: Dark blue/purple — Extreme lower momentum
These dashboard color boundaries operate independently of the configurable Upper Swing Level and Lower Swing Level.
Changing the swing levels does not change the dashboard's color classification boundaries.
𝐉. 𝐒𝐰𝐢𝐧𝐠 𝐃𝐢𝐫𝐞𝐜𝐭𝐢𝐨𝐧 𝐀𝐫𝐫𝐨𝐰𝐬
The dashboard compares the most recent occurrences of the upper and lower swing-level conditions.
↑ indicates that the latest lower-threshold event occurred more recently than the latest upper-threshold event.
↓ indicates that the comparison did not establish a more recent lower-threshold event.
A downward arrow can also appear when there is insufficient threshold-event history. It should not automatically be interpreted as a confirmed upper-side event.
The arrows describe threshold-event recency rather than the immediate direction of price movement.
A timeframe may display a low momentum score with an upward arrow because its most recent qualifying threshold event occurred on the lower side.
These arrows are not independent buy or sell signals.
𝐊. 𝐋𝐢𝐯𝐞-𝐁𝐚𝐫 𝐁𝐞𝐡𝐚𝐯𝐢𝐨𝐫
The momentum score updates as price and volume data develop.
During an unfinished candle, the momentum score can change and may temporarily cross a swing level.
Swing transitions do not require a confirmed candle close.
Developing swing markers and connecting lines can change as qualifying price extremes occur.
Dashboard values may also change while the requested timeframe candles remain open.
Historical and live chart appearances can therefore differ, particularly during developing swing transitions.
📘 𝐔𝐬𝐚𝐠𝐞
PAVS can be used to study momentum-defined price swings and compare momentum conditions across multiple timeframes.
Suggested workflow:
1. Apply PAVS to a chart with available price and volume data.
2. Observe red upper-swing markers and blue lower-swing markers.
3. Follow the connecting lines to identify alternating swing phases.
4. Review the momentum scores displayed at swing endpoints.
5. Compare shorter- and longer-timeframe readings using the PAVS Dashboard.
6. Observe extreme momentum markers at scores of 90 and 10.
7. Combine PAVS with independent market-structure analysis and risk management.
The indicator does not automatically determine trade entries, stop losses, or profit targets.
📘 𝐒𝐞𝐭𝐭𝐢𝐧𝐠𝐬
Momentum Period (14)
Controls the RSI calculation length applied to cumulative price-volume returns.
Upper Swing Level (70)
Defines the momentum score required to establish an upper swing phase. Minimum: 51.
Lower Swing Level (30)
Defines the momentum score required to establish a lower swing phase. Maximum: 49.
Show PAVS Dashboard (Enabled)
Controls whether the multi-timeframe dashboard is displayed.
The dashboard uses fixed color boundaries at 20, 30, 70, and 80.
Extreme momentum markers use fixed levels of 10 and 90.
📘 𝐃𝐢𝐬𝐜𝐥𝐚𝐢𝐦𝐞𝐫
PAVS is intended for technical analysis and educational use.
The momentum score is calculated from price and reported volume. It does not directly measure institutional order flow, market depth, or actual aggressive buying and selling.
Swing markers and connecting lines may move as qualifying price extremes develop.
Live momentum readings and multi-timeframe values may change before their respective candles close.
Extreme momentum readings do not guarantee reversal or continuation.
The indicator does not execute trades, provide verified performance statistics, or constitute a complete trading strategy.
Market analysis and trading involve risk. Users should apply independent confirmation and appropriate risk management.
Official julzALGO Community:
discord.gg/FJkAYEAH
discord.gg/FJkAYEAH
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
Official julzALGO Community:
discord.gg/FJkAYEAH
discord.gg/FJkAYEAH
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。