PROTECTED SOURCE SCRIPT
Px & Vol Up/Dn Ratio with MA

Px & Vol Up/Down Ratio with Moving Average
This custom indicator calculates the Price Up/Down Ratio and Volume Up/Down Ratio over a user-defined lookback period. It provides a unique perspective on market strength by comparing the magnitude of gains vs. losses (in both price and volume) — helping traders gauge the underlying momentum and accumulation/distribution behavior.
🔍 Core Features:
Price Ratio: Total positive price change divided by the absolute value of total negative price change.
Volume Ratio: Total volume on up days divided by total volume on down days.
Moving Average Overlay: Smooth each ratio with your choice of moving average — SMA, EMA, or WMA.
Customizable lookback period and moving average length for flexible analysis.
🧭 Use Case:
A rising Price Ratio above 1 indicates stronger positive price action than negative.
A rising Volume Ratio above 1 suggests increased participation on up moves — a sign of accumulation.
Divergences between Price and Volume ratios can provide early clues on trend reversals or weakening momentum.
🧱 Visual Aids:
Includes six key horizontal reference lines at levels: 0.5, 0.75, 1, 1.25, 1.5, 2 to benchmark current ratio strength.
Color-coded plots for clarity:
Blue for Price Ratio
Green for Volume Ratio
This custom indicator calculates the Price Up/Down Ratio and Volume Up/Down Ratio over a user-defined lookback period. It provides a unique perspective on market strength by comparing the magnitude of gains vs. losses (in both price and volume) — helping traders gauge the underlying momentum and accumulation/distribution behavior.
🔍 Core Features:
Price Ratio: Total positive price change divided by the absolute value of total negative price change.
Volume Ratio: Total volume on up days divided by total volume on down days.
Moving Average Overlay: Smooth each ratio with your choice of moving average — SMA, EMA, or WMA.
Customizable lookback period and moving average length for flexible analysis.
🧭 Use Case:
A rising Price Ratio above 1 indicates stronger positive price action than negative.
A rising Volume Ratio above 1 suggests increased participation on up moves — a sign of accumulation.
Divergences between Price and Volume ratios can provide early clues on trend reversals or weakening momentum.
🧱 Visual Aids:
Includes six key horizontal reference lines at levels: 0.5, 0.75, 1, 1.25, 1.5, 2 to benchmark current ratio strength.
Color-coded plots for clarity:
Blue for Price Ratio
Green for Volume Ratio
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。