Harrocop

OBV Oscillator Volume Filter

OBV Oscillator Volume Filter
Introduction
The On-Balance Volume (OBV) is a widely-used technical indicator that aims to relate price and volume in trading. Price and volume are two of the most basic and yet crucial concepts in price movement. Together, they can reveal a lot about the instruments trends and the market's sentiment. This On Balance Volume (OBV) Oscillator incorporates enhanced features like a volume filter using a rolling window to detect outliers in accumulated volume, making it an advanced and more refined version of the standard OBV.

Interpreting the OBV Indicator
The primary function of the OBV is to accumulate volume. In simpler terms:

When the market closes higher than the previous candle, all of that candle's volume is considered 'up-volume'.
Conversely, when the market closes lower than the previous day, all of that candle's volume is considered 'down-volume'.
A rising OBV suggests that volume is being accumulated, indicating bullish market sentiment. A declining OBV, on the other hand, points to a bearish sentiment.

Features of the Script
1. Moving Averages Selection:
The script provides users with the option to select among six types of moving averages (EMA, DEMA, TEMA, SMA, WMA, HMA) to calculate the OBV. This feature offers flexibility and enables traders to choose an MA type they're most comfortable with or find the most effective.

2. Smoothing Option:
To reduce the inherent noise in the indicator, there's an option to apply smoothing. It uses a Simple Moving Average (SMA) to produce a clearer signal, making it easier for traders to interpret and respond to. If you don't want to use smoothing, just simply change the input length of smoothing to 1 in the settings.

3. Outlier Detection:
One of the standout features is the use of a rolling window to detect volume outliers. This ensures that the OBV only reacts to significant volume changes and isn't overly influenced by random spikes or drops. The volume filter is calculated based on a % of the highest OBV volume of X number of bars back. Users can adjust the time (# bars) and the sensitivity (%) of the volume filter. A longer timeperiode (# bars) and a higher % (sensitivity) in the settings result to less signals presented by the indicator.

4. Divergence Detection:
The script automatically highlights both regular and hidden divergences on the chart. Divergences can be a powerful signal of potential price reversals. This feature aids traders in spotting potential buy or sell opportunities based on divergences between price and OBV.

Regular Bullish Divergence: When the price makes lower lows, but the OBV makes higher lows.
Hidden Bullish Divergence: When the price makes higher lows, but the OBV makes lower lows.
Regular Bearish Divergence: When the price makes higher highs, but the OBV makes lower highs.
Hidden Bearish Divergence: When the price makes lower highs, but the OBV makes higher highs.

5. Alerts for Trend Reversals:
The script incorporates alerts that notify traders when the OBV indicates potential trend reversals. This feature can be instrumental in catching early entries or exits.

Disclaimer
It's crucial to understand that no single indicator should be used in isolation. To increase the probability of making accurate market predictions, always use the OBV Oscillator in conjunction with other indicators and tools. Remember that all trading involves risk, and it's possible to lose your invested capital. Always seek advice from a financial advisor before making any trading decisions. By enhancing the OBV with features like the volume filter, multiple MA types, smoothing, and divergence detection, this script becomes a potent tool in a trader's arsenal. Use it wisely, and always ensure to maintain proper risk management.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?