PROTECTED SOURCE SCRIPT
OBV Detector [FelixHsu]

Overview
OBV Detector is a volume‐based momentum indicator that combines an On-Balance Volume (OBV) line with an Exponential Moving Average (EMA) of OBV to highlight hidden divergences, trend strength, and turning points. It refines the EMA/OBV interaction and adds flexible, time-frame-aware “auto parameters” for seamless use across multiple chart resolutions.
Key Features
Dual‐Line Display
OBV Line (plotted in red/green):
Reflects cumulative volume flow—green when price momentum is strong (CCI above threshold), red when weak.
OBV EMA (plotted in green/orange/red):
A smoothed version of OBV that filters noise and reveals trend direction. Its color encodes short-term strength:
Green: rising above a minimal slope threshold
Orange: slope near zero (sideways)
Red: falling below the negative slope threshold
Turn-Point Signals
A discrete marker appears on the EMA curve at every color-state change, instantly showing:
Strong→Neutral (any→orange): close all positions
Neutral→Strong (orange→green): exit shorts, enter longs
Strong→Weak (green→red): exit longs, enter shorts
Weak→Strong (red→green): exit shorts, enter longs
Automatic Time-Frame Parameters
The “Auto Parameters” toggle lets the script select recommended EMA periods and slope thresholds based on your chart’s resolution (1 min, 5 min, 15 min, 30 min, 60 min, etc.).
You may also disable Auto Parameters to enter your own EMA Length and EMA Slope Threshold (%) manually for bespoke tuning.
UI Controls
Auto Parameters: Enable/disable per-timeframe presets.
EMA Length: Number of bars for the OBV EMA calculation (if Auto = Off).
EMA Slope Threshold (%): Minimum percentage change per bar that constitutes a “meaningful” move (if Auto = Off).
Show Circles / Arrows / Crosses / Major Triangles: Optional overlays to visualize turning points, crossovers, and larger trend‐reversal signals (preserved from previous versions for advanced analysis).
Algorithmic Concept (High‐Level)
Volume Momentum (OBV) is used to detect whether “smart money” is accumulating or distributing.
Smoothing (EMA of OBV) reveals the underlying trend by removing erratic spikes.
Slope-Based Color Coding instantly highlights acceleration, deceleration, or consolidation phases.
Instant Signals fire on state changes without waiting for future bars, enabling rapid entry/exit decisions.
This elegant combination of volume, momentum, and trend filtering makes OBV Detector a versatile tool for both swing-traders and scalpers seeking objective, rule-based signals.
OBV Detector is a volume‐based momentum indicator that combines an On-Balance Volume (OBV) line with an Exponential Moving Average (EMA) of OBV to highlight hidden divergences, trend strength, and turning points. It refines the EMA/OBV interaction and adds flexible, time-frame-aware “auto parameters” for seamless use across multiple chart resolutions.
Key Features
Dual‐Line Display
OBV Line (plotted in red/green):
Reflects cumulative volume flow—green when price momentum is strong (CCI above threshold), red when weak.
OBV EMA (plotted in green/orange/red):
A smoothed version of OBV that filters noise and reveals trend direction. Its color encodes short-term strength:
Green: rising above a minimal slope threshold
Orange: slope near zero (sideways)
Red: falling below the negative slope threshold
Turn-Point Signals
A discrete marker appears on the EMA curve at every color-state change, instantly showing:
Strong→Neutral (any→orange): close all positions
Neutral→Strong (orange→green): exit shorts, enter longs
Strong→Weak (green→red): exit longs, enter shorts
Weak→Strong (red→green): exit shorts, enter longs
Automatic Time-Frame Parameters
The “Auto Parameters” toggle lets the script select recommended EMA periods and slope thresholds based on your chart’s resolution (1 min, 5 min, 15 min, 30 min, 60 min, etc.).
You may also disable Auto Parameters to enter your own EMA Length and EMA Slope Threshold (%) manually for bespoke tuning.
UI Controls
Auto Parameters: Enable/disable per-timeframe presets.
EMA Length: Number of bars for the OBV EMA calculation (if Auto = Off).
EMA Slope Threshold (%): Minimum percentage change per bar that constitutes a “meaningful” move (if Auto = Off).
Show Circles / Arrows / Crosses / Major Triangles: Optional overlays to visualize turning points, crossovers, and larger trend‐reversal signals (preserved from previous versions for advanced analysis).
Algorithmic Concept (High‐Level)
Volume Momentum (OBV) is used to detect whether “smart money” is accumulating or distributing.
Smoothing (EMA of OBV) reveals the underlying trend by removing erratic spikes.
Slope-Based Color Coding instantly highlights acceleration, deceleration, or consolidation phases.
Instant Signals fire on state changes without waiting for future bars, enabling rapid entry/exit decisions.
This elegant combination of volume, momentum, and trend filtering makes OBV Detector a versatile tool for both swing-traders and scalpers seeking objective, rule-based signals.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.