PROTECTED SOURCE SCRIPT
Cập nhật Smart OBV beta.3

write description for this indicator for tradingview
OBV Structure Commander [Contrarian Edition]
The OBV Structure Commander is an advanced volume-analysis tool designed to identify high-probability institutional accumulation and distribution zones. Unlike standard trendline indicators, this script focuses on horizontal support and resistance within the On-Balance Volume (OBV) series—levels that represent significant historical watermarks of buying and selling pressure.
By combining structural memory with Contrarian Grading, the indicator filters out market noise and highlights signals where volume momentum is either confirming price action or providing a leading warning of an impending reversal.
Core Philosophy: Volume Precedes Price
This indicator is built on the principle that smart money accumulation often shows up in volume before price breaks out. By monitoring horizontal "flips" (where old resistance becomes new support) and OBV-Price divergences, the script identifies "coiled spring" setups before they become obvious on the price chart.
Key Features
Institutional Memory: The script maintains a database of up to 300 significant historical peaks and troughs. It identifies "confluence zones" where current OBV action matches historical levels, even if they occurred months or years ago.
Contrarian Signal Grading (1-10):
At the Top (High OBV): The system automatically boosts the grade of Sell signals (Rejections) and nerfs Buy signals (Breakouts), protecting you from "buying the top."
At the Bottom (Low OBV): The system boosts the grade of Buy signals (Bounces) and nerfs Sell signals (Breakdowns), preventing panic-selling at local bottoms.
Divergence Detection: Automatically flags Bullish and Bearish divergences. If the price makes a new low while OBV holds a structural support level, the indicator assigns an instant 10/10 "DIV" grade.
S/R Flips: Differentiates between standard bounces and "flips" (Support-Resistance swaps). Flips are visualized with dashed lines to indicate a stronger structural shift.
Dynamic Tolerance: Uses a Standard Deviation (StDev) multiplier to define "close enough" matches. This ensures that levels are caught even if they don't hit the exact mathematical digit, accounting for market volatility.
How to Use
Spotting the Bounce (BUY/SELL): Look for Green labels at the bottom of the OBV range or Red labels at the top. High-grade signals (7-10) indicate a major structural defense by large players.
The Divergence Play: A "DIV 10" label is the highest confidence signal. It suggests that while price action looks weak, the volume support remains perfectly intact, often leading to a sharp reversal.
Breakout Confirmation (BO/BD): When OBV clears a long-standing horizontal resistance (BO), it provides a "leading breakout" signal that often precedes the price breakout.
Settings Guide
Match Tolerance: Increase this to catch "messy" zones; decrease it for surgical precision.
Min Gap (Bars): Prevents noise by ensuring the script only connects points separated by a meaningful amount of time (e.g., 74+ bars).
Range Lookback: Defines the window used to determine if the OBV is currently "High" or "Low" for the Contrarian grading bonus.
OBV Structure Commander [Contrarian Edition]
The OBV Structure Commander is an advanced volume-analysis tool designed to identify high-probability institutional accumulation and distribution zones. Unlike standard trendline indicators, this script focuses on horizontal support and resistance within the On-Balance Volume (OBV) series—levels that represent significant historical watermarks of buying and selling pressure.
By combining structural memory with Contrarian Grading, the indicator filters out market noise and highlights signals where volume momentum is either confirming price action or providing a leading warning of an impending reversal.
Core Philosophy: Volume Precedes Price
This indicator is built on the principle that smart money accumulation often shows up in volume before price breaks out. By monitoring horizontal "flips" (where old resistance becomes new support) and OBV-Price divergences, the script identifies "coiled spring" setups before they become obvious on the price chart.
Key Features
Institutional Memory: The script maintains a database of up to 300 significant historical peaks and troughs. It identifies "confluence zones" where current OBV action matches historical levels, even if they occurred months or years ago.
Contrarian Signal Grading (1-10):
At the Top (High OBV): The system automatically boosts the grade of Sell signals (Rejections) and nerfs Buy signals (Breakouts), protecting you from "buying the top."
At the Bottom (Low OBV): The system boosts the grade of Buy signals (Bounces) and nerfs Sell signals (Breakdowns), preventing panic-selling at local bottoms.
Divergence Detection: Automatically flags Bullish and Bearish divergences. If the price makes a new low while OBV holds a structural support level, the indicator assigns an instant 10/10 "DIV" grade.
S/R Flips: Differentiates between standard bounces and "flips" (Support-Resistance swaps). Flips are visualized with dashed lines to indicate a stronger structural shift.
Dynamic Tolerance: Uses a Standard Deviation (StDev) multiplier to define "close enough" matches. This ensures that levels are caught even if they don't hit the exact mathematical digit, accounting for market volatility.
How to Use
Spotting the Bounce (BUY/SELL): Look for Green labels at the bottom of the OBV range or Red labels at the top. High-grade signals (7-10) indicate a major structural defense by large players.
The Divergence Play: A "DIV 10" label is the highest confidence signal. It suggests that while price action looks weak, the volume support remains perfectly intact, often leading to a sharp reversal.
Breakout Confirmation (BO/BD): When OBV clears a long-standing horizontal resistance (BO), it provides a "leading breakout" signal that often precedes the price breakout.
Settings Guide
Match Tolerance: Increase this to catch "messy" zones; decrease it for surgical precision.
Min Gap (Bars): Prevents noise by ensuring the script only connects points separated by a meaningful amount of time (e.g., 74+ bars).
Range Lookback: Defines the window used to determine if the OBV is currently "High" or "Low" for the Contrarian grading bonus.
Phát hành các Ghi chú
- Tick confirmation countPhát hành các Ghi chú
- major updateMã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.