OPEN-SOURCE SCRIPT

OBV Acceleration / Deceleration

394
Description:

Introduction
Classic On-Balance Volume (OBV) is a powerful tool for tracking smart money and volume flow. However, standard OBV relies on raw closing prices to determine whether volume was "bullish" or "bearish" for the day. This makes it highly susceptible to market noise, wicks, and fake-outs.
This open-source script, OBV Acceleration / Deceleration, rebuilds the OBV formula from the ground up. It filters price noise using a Fibonacci-weighted Master Average and introduces a Volume Kinetics engine to detect exactly when volume is accelerating (spiking) or decelerating (drying up)

How It Works: Core Logic & Features
This indicator is built on three core mechanical features. Here is the exact logic behind how they work:


1. The Fibonacci Master Average (Noise Filtering)
Instead of looking at the raw close price to decide if volume should be added or subtracted, this script calculates six separate Simple Moving Averages (SMAs) based on the first six numbers of the Fibonacci sequence (1, 1, 2, 3, 5, 8).
*The Logic: The script averages these six SMAs together to create a "Master Average."
*The Result: If the Master Average is pointing up, the volume is added to the OBV. If it points down, it is subtracted. This ensures that a single erratic price wick does not falsely flip the volume flow.

2. Volume Kinetics (Acceleration & Deceleration)
Standard OBV only tells you direction, not intensity. This script measures the "velocity" of the volume by tracking the absolute change in the OBV step bar-by-bar, and compares it to a 40-period historical average.
*Acceleration (Volume Spikes): If the current volume is greater than our customizable Expansion Factor (default 2.0x the average), it flags an Acceleration state. This indicates high momentum, institutional participation, or a heavy breakout.
*Deceleration (Volume Dry-Up): If the current volume drops below our Compression Factor (default 0.5x the average), it flags a Deceleration state. This mathematically highlights market exhaustion, tight consolidation, or a lack of interest.

3. OBV Moving Average & Cloud Fill
To help determine the broader momentum context, a 20-period SMA is applied directly to the custom OBV line.
*The Logic: A dynamic cloud fills the space between the OBV line and its SMA.
*The Result: When OBV is above its SMA, the cloud is Teal (Bullish momentum). When OBV is below its SMA, the cloud is Maroon (Bearish momentum).

Visual Guide (Reading the Dots)
The indicator plots color-coded dots directly on the OBV line to give you instant visual feedback on volume kinetics:
🟢 Bright Green Dot: Bullish Acceleration (High-volume buying spike).
🔴 Bright Red Dot: Bearish Acceleration (High-volume selling spike).
🟡 Yellow Dot: Deceleration / Exhaustion (Volume has severely dried up).
🔵 Teal Dot: Standard bullish volume flow.
🟤 Maroon Dot: Standard bearish volume flow.

Practical Trading Applications
Confirming Breakouts: If price breaks through a key resistance level and the indicator prints a Bright Green Dot, it confirms the breakout is supported by anomalous volume and is more likely to succeed.
Spotting Reversals (Exhaustion): When price approaches a major support or resistance level and prints a cluster of Yellow Dots, it means the volume pushing the trend has dried up. This often precedes a reversal or a deep pullback.
Trend Riding: Stay in trades as long as the OBV line remains on the correct side of its SMA (represented by the Teal or Maroon cloud fill), ignoring minor price pullbacks.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。