OBV Divergence Indicator [TradingFinder] On-Balance Vol Reversal🔵 Introduction
The On-Balance Volume (OBV) indicator, introduced by Joe Granville in 1963, is a powerful technical analysis tool used to measure buying and selling pressure based on trading volume and price.
By aggregating trading volume—adding it on positive days and subtracting it on negative days—OBV creates a cumulative line that reflects market volume pressure, making it valuable for confirming trends, identifying entry and exit points, and forecasting potential price movements.
Divergences between price and OBV often provide significant signals. A bearish divergence occurs when the price forms higher highs while the OBV line forms lower highs. This discrepancy indicates that upward momentum is weakening, increasing the likelihood of a downward trend.
In contrast, a bullish divergence happens when the price makes lower lows, but the OBV line forms higher lows. This suggests increasing buying pressure and the potential for an upward trend reversal.
For instance, if the price is rising but the OBV trendline is falling, it may signal a bearish divergence, warning of a possible price decline. Conversely, if the price is falling while the OBV line is rising, this could signal a bullish divergence, indicating a possible price recovery. These signals are particularly useful for identifying market turning points.
OBV often acts as a leading indicator, moving ahead of price changes. For example, a rising OBV alongside stable or declining prices can signal an impending upward breakout.
Conversely, a declining OBV with rising prices may indicate that the current uptrend is losing strength. Traders using this strategy often consider entering positions at breakout levels while setting stop losses near recent swing highs or lows to manage risk effectively.
This integration highlights how OBV divergences can provide actionable insights for predicting price movements and managing trades efficiently.
Bullish Divergence :
Bearish Divergence :
🔵 How to Use
The OBV indicator, as a cumulative tool, assists analysts in comparing volume and price changes to identify new trends and key levels for entering or exiting trades. Beyond confirming existing trends, it is particularly effective in analyzing positive and negative divergences between price and volume, providing valuable signals for trading decisions.
🟣 Bullish Divergence
A bullish divergence occurs when the price continues its downward or stable trend, but the OBV line starts rising, forming a higher low compared to its previous low. This suggests increasing volume on up days relative to down days and often signals a reversal to the upside.
For instance, if an asset's price stabilizes near a support level but the OBV line shows an upward trend, this divergence could present an opportunity to enter a long position.
🟣 Bearish Divergence
A bearish divergence occurs when the price forms higher highs, but the OBV line declines, creating lower highs compared to previous peaks. This indicates decreasing volume on up days relative to down days and often acts as a warning for a reversal to the downside.
For example, if an asset’s price approaches a resistance level while OBV starts declining, this divergence may signal the beginning of a downtrend and could indicate a good time to exit long trades or enter short positions.
🔵 Setting
Period : The "Period" setting allows you to define the number of bars or intervals for "Periodic" and "EMA" modes. A shorter period captures more short-term movements, while a longer period smooths out the fluctuations and provides a broader view of market trends.
You can enable or disable labels to highlight key levels or divergences and tables to show numerical details like values and divergence types. These options allow for a customized chart display.
🔵 Table
The following table breaks down the main features of the oscillator. It covers four critical categories: Exist, Consecutive, Divergence Quality, and Change Phase Indicator.
Exist : If divergence is detected, a "+" will appear in this row.
Consecutive: Shows the number of consecutive divergences that have formed in a short period.
Divergence Quality : Evaluates the quality of the divergence based on the number of occurrences. One is labeled "Normal," two are "Good," and three or more are considered "Strong."
Change Phase Indicator : If a phase change is detected between two oscillation peaks, this is marked in the table.
🔵 Conclusion
The OBV (On Balance Volume) indicator is a simple yet effective tool in technical analysis that combines volume and price changes to provide a comprehensive view of market buying and selling pressure. By identifying positive and negative divergences, OBV enables analysts to detect early signs of trend reversals and refine their trading strategies.
Divergences in OBV often precede price changes, making it a leading indicator for predicting market movements. Using OBV alongside other technical tools can enhance decision-making accuracy and help traders identify better entry and exit points. However, it is essential to consider the limitations of OBV, such as the potential for signal errors and the impact of sudden news events.
Ultimately, OBV serves as a complementary tool in technical analysis, aiding in trend identification, signal confirmation, and risk management. A thoughtful application of this indicator, in combination with other analytical tools, can create valuable opportunities for profiting in financial markets.
Breadthindicators
Nifty Top Gainers/Losers [ar]Nifty Top Gainers/Losers - Real-time Market Performance Tracker
A powerful indicator that monitors and displays real-time performance of 40 major Nifty stocks in a clean, organized table format. Perfect for traders seeking instant market breadth insights.
Key Features:
• Dynamic advances/declines counter at the top
• Real-time percentage change calculations
• Color-coded display (green for gainers, red for losers)
• Customizable reference points (Previous Day Close/Today's Open)
• Optional background color based on market breadth
• Flexible top gainers/losers limit setting
Customization Options:
- Adjust colors for gainers and losers
- Set transparency for background
- Modify the number of top performers to display
- Add/remove symbols from the watchlist
- Choose calculation reference (Previous Day Close/Today's Open)
Ideal for:
- Day traders monitoring market momentum
- Investors tracking sector rotation
- Analysts studying market breadth
- Portfolio managers seeking quick market overview
This indicator helps identify market leaders and laggards at a glance, making it an essential tool for informed trading decisions.
NYSE TickThe NYSE Tick indicator is a market breadth indicator used to determine short-term bullish or bearish market sentiment. The NYSE Tick index compares the number of stocks on the New York Stock Exchange that are ticking up to the number of stocks ticking down at a specific moment in time. When the NYSE Tick is hovering around the zero line, roughly the same number of stocks are ticking up as are ticking down. When the overall market is rising it will usually present on the NYSE Tick as a rise in value that will generally stay mostly above the zero line for a period of time. The opposite is true when the general market is falling and can be seen as the NYSE Tick staying mostly below the zero line. This information can be very helpful for a short-term day trader who trades a market that also follows many of these same stocks, like the E-Mini S&P 500 Futures (ES), for example. While the index can theoretically rise or fall to over ±2,000 if all stocks on the NYSE are ticking up or down at the same time, it’s generally considered an extreme movement if the NYSE Tick is ±1,000. For this reason, the indicator has default reference lines at ±1,000 and halfway marks at ±500. In order to partially smooth out the movement and make movement trends more easily read, the indicator plots the values using Heikin Ashi candles instead of the standard bars or candlesticks. The price-line value displayed is an accurate live value, however, rather than the OHLC average value of a standard Heikin Ashi candle. Since the standard hours for the NYSE are Monday – Friday, 09:30 – 16:00 EST, the indicator only plots bars during this time.
Market Internals & InfoThis script provides various information on Market Internals and other related info. It was a part of the Daily Levels script but that script was getting very large so I decided to separate this piece of it into its own indicator. I plan on adding some additional features in the near future so stay tuned for those!
The script provides customizability to show certain market internals, tickers, and even Market Profile TPO periods.
Here is a summary of each setting:
NASDAQ and NYSE Breadth Ratio
- Ratio between Up Volume and Down Volume for NASDAQ and NYSE markets. This can help inform about the type of volume flowing in and out of these exchanges.
Advance/Decline Line (ADL)
The ADL focuses specifically on the number of advancing and declining stocks within an index, without considering their trading volume.
Here's how the ADL works:
It tracks the daily difference between the number of stocks that are up in price (advancing) and the number of stocks that are down in price (declining) within a particular index.
The ADL is a cumulative measure, meaning each day's difference is added to the previous day's total.
If there are more advancing stocks, the ADL goes up.
If there are more declining stocks, the ADL goes down.
By analyzing the ADL, investors can get a sense of how many stocks are participating in a market move.
Here's what the ADL can tell you:
Confirmation of Trends: When the ADL moves in the same direction as the underlying index (e.g., ADL rising with a rising index), it suggests broad participation in the trend and potentially stronger momentum.
Divergence: If the ADL diverges from the index (e.g., ADL falling while the index is rising), it can be a warning sign. This suggests that fewer stocks are participating in the rally, which could indicate a weakening trend.
Keep in mind:
The ADL is a backward-looking indicator, reflecting past market activity.
It's often used in conjunction with other technical indicators for a more complete picture.
TRIN Arms Index
The TRIN index, also called the Arms Index or Short-Term Trading Index, is a technical analysis tool used in the stock market to gauge market breadth and sentiment. It essentially compares the number of advancing stocks (gaining in price) to declining stocks (losing price) along with their trading volume.
Here's how to interpret the TRIN:
High TRIN (above 1.0): This indicates a weak market where declining stocks and their volume are dominating the market. It can be a sign of a potential downward trend.
Low TRIN (below 1.0): This suggests a strong market where advancing stocks and their volume are in control. It can be a sign of a potential upward trend.
TRIN around 1.0: This represents a more balanced market, where it's difficult to say which direction the market might be headed.
Important points to remember about TRIN:
It's a short-term indicator, primarily used for intraday trading decisions.
It should be used in conjunction with other technical indicators for a more comprehensive market analysis. High or low TRIN readings don't guarantee future price movements.
VIX/VXN
VIX and VXN are both indexes created by the Chicago Board Options Exchange (CBOE) to measure market volatility. They differ based on the underlying index they track:
VIX (Cboe Volatility Index): This is the more well-known index and is considered the "fear gauge" of the stock market. It reflects the market's expectation of volatility in the S&P 500 index over the next 30 days.
VXN (Cboe Nasdaq Volatility Index): This is a counterpart to the VIX, but instead gauges volatility expectations for the Nasdaq 100 index over the coming 30 days. The tech-heavy Nasdaq can sometimes diverge from the broader market represented by the S&P 500, hence the need for a separate volatility measure.
Both VIX and VXN are calculated based on the implied volatilities of options contracts listed on their respective indexes. Here's a general interpretation:
High VIX/VXN: Indicates a high level of fear or uncertainty in the market, suggesting investors expect significant price fluctuations in the near future.
Low VIX/VXN: Suggests a more complacent market with lower expectations of volatility.
Important points to remember about VIX and VXN:
They are forward-looking indicators, reflecting market sentiment about future volatility, not necessarily current market conditions.
High VIX/VXN readings don't guarantee a market crash, and low readings don't guarantee smooth sailing.
These indexes are often used by investors to make decisions about portfolio allocation and hedging strategies.
Inside/Outside Day
This provides a quick indication of it we are still trading inside or outside of yesterdays range and will show "Inside Day" or "Outside Day" based upon todays range vs. yesterday's range.
Custom Ticker Choices
Ability to add up to 5 other tickers that can be tracked within the table
Show Market Profile TPO
This only shows on timeframes less than 30m. It will show both the current TPO period and the remaining time within that period.
Table Customization
Provided drop downs to change the text size and also the location of the table.
Developing Market Profile / TPO [Honestcowboy]The Developing Market Profile Indicator aims to broaden the horizon of Market Profile / TPO research and trading. While standard Market Profiles aim is to show where PRICE is in relation to TIME on a previous session (usually a day). Developing Market Profile will change bar by bar and display PRICE in relation to TIME for a user specified number of past bars.
What is a market profile?
"Market Profile is an intra-day charting technique (price vertical, time/activity horizontal) devised by J. Peter Steidlmayer. Steidlmayer was seeking a way to determine and to evaluate market value as it developed in the day time frame. The concept was to display price on a vertical axis against time on the horizontal, and the ensuing graphic generally is a bell shape--fatter at the middle prices, with activity trailing off and volume diminished at the extreme higher and lower prices."
For education on market profiles I recommend you search the net and study some profitable traders who use it.
Key Differences
Does not have a value area but distinguishes each column in relation to the biggest column in percentage terms.
Updates bar by bar
Does not take sessions into account
Shows historical values for each bar
While there is an entire education system build around Market Profiles they usually focus on a daily profile and in some cases how the value area develops during the day (there are indicators showing the developing value area).
The idea of trading based on a developing value area is what inspired me to build the Developing Market Profile.
🟦 CALCULATION
Think of this Developing Market Profile the same way as you would think of a moving average. On each bar it will lookback 200 bars (or as user specified) and calculate a Market Profile from those bars (range).
🔹Market Profile gets calculated using these steps:
Get the highest high and lowest low of the price range.
Separate that range into user specified amount of price zones (all spaced evenly)
Loop through the ranges bars and on each bar check in which price zones price was, then add +1 to the zones price was in (we do this using the OccurenceArray)
After it looped through all bars in the range it will draw columns for each price zone (using boxes) and make them as wide as the OccurenceArray dictates in number of bars
🔹Coloring each column:
The script will find the biggest column in the Profile and use that as a reference for all other columns. It will then decide for each column individually how big it is in % compared to the biggest column. It will use that percentage to decide which color to give it, top 20% will be red, top 40% purple, top 60% blue, top 80% green and all the rest yellow. The user is able to adjust these numbers for further customisation.
The historical display of the profiles uses plotchar() and will not only use the color of the column at that time but the % rating will also decide transparancy for further detail when analysing how the profiles developed over time. Each of those historical profiles is calculated using its own 200 past bars. This makes the script very heavy and that is why it includes optimisation settings, more info below.
🟦 USAGE
My general idea of the markets is that they are ever changing and that in studying that changing behaviour a good trader is able to distinguish new behaviour from old behaviour and adapt his approach before losing traders "weak hands" do.
A Market Profile can visually show a trader what kind of market environment we currently are in. In training this visual feedback helps traders remember past market environments and how the market behaved during these times.
Use the history shown using plotchars in colors to get an idea of how the Market Profile looked at each bar of the chart.
This history will help in studying how price moves at different stages of the Market Profile development.
I'm in no way an expert in trading Market Profiles so take this information with a grain of salt. Below an idea of how I would trade using this indicator:
🟦 SETTINGS
🔹MARKET PROFILING
Lookback: The amount of bars the Market Profile will look in the past to calculate where price has been the most in that range
Resolution: This is the amount of columns the Market Profile will have. These columns are calculated using the highest and lowest point price has been for the lookback period
Resolution is limited to a maximum of 32 because of pinescript plotting limits (64). Each plotchar() because of using variable colors takes up 2 of these slots
🔹VISUAL SETTINGS
Profile Distance From Chart: The amount of bars the market profile will be offset from the current bar
Border width (MP): The line thickness of the Market Profile column borders
Character: This is the character the history will use to show past profiles, default is a square.
Color theme: You can pick 5 colors from biggest column of the Profile to smallest column of the profile.
Numbers: these are for % to decide column color. So on default top 20% will be red, top 40% purple... Always use these in descending order
Show Market Profile: This setting will enable/disable the current Market Profile (columns on right side of current bar)
Show Profile History: This setting will enable/disable the Profile History which are the colored characters you see on each bar
🔹OPTIMISATION AND DEBUGGING
Calculate from here: The Market Profile will only start to calculate bar by bar from this point. Setting is needed to optimise loading time and quite frankly without it the script would probably exceed tradingview loading time limits.
Min Size: This setting is there to avoid visual bugs in the script. Scaling the chart there can be issues where the Market Profile extends all the way to 0. To avoid this use a minimum size bigger than the bugged bottom box
Crypto McClellan Oscillator (SLN Fix)This is an adaption of the Mcclellan Oscillator for crypto. Instead of tracking the S&P500 it tracks a selection of cryptos to make sure the indicator follows this sector instead.
Full credit goes to the creator of this indicator: Fadior. It has since been fixed by SLN.
The following description explains the standard McClellan Oscillator. Full credit to Investopedia , my fav source of financial explanations.
The same principles applies to its use in the crypto sector, but please be cautious of the last point, the limitations. Since crypto is more volatile, that could amplify choppy behavior.
This is not financial advice, please be extremely cautious. This indicator is only suitable as a confirmation signal and needs support of other signals to be profitable.
This indicator usually produces the best signals on slightly above daily time frame. I personally like 2 or 3 day, but you have to find the settings suitable for your trading style.
What Is the McClellan Oscillator?
The McClellan Oscillator is a market breadth indicator that is based on the difference between the number of advancing and declining issues on a stock exchange, such as the New York Stock Exchange (NYSE) or NASDAQ.
The indicator is used to show strong shifts in sentiment in the indexes, called breadth thrusts. It also helps in analyzing the strength of an index trend via divergence or confirmation.
The McClellan Oscillator formula can be applied to any stock exchange or group of stocks.
A reading above zero helps confirm a rise in the index, while readings below zero confirm a decline in the index.
When the index is rising but the oscillator is falling, that warns that the index could start declining too. When the index is falling and the oscillator is rising, that indicates the index could start rising soon. This is called divergence.
A significant change, such as moving 100 points or more, from a negative reading to a positive reading is called a breadth thrust. It may indicate a strong reversal from downtrend to uptrend is underway on the stock exchange.
How to Calculate the McClellan Oscillator
To get the calculation started, track Advances - Declines on a stock exchange for 19 and 39 days. Calculate a simple average for these, not exponential moving average (EMA).
Use these simple values as the Prior Day EMA values in the 19- and 39-day EMA formulas.
Calculate the 19- and 39-day EMAs.
Calculate the McClellan Oscillator value.
Now that the value has been calculated, on the next calculation use this value for the Prior Day EMA. Start calculating EMAs for the formula instead of simple averages.
If using the adjusted formula, the steps are the same, except use ANA instead of using Advances - Declines.
What Does the McClellan Oscillator Tell You?
The McClellan Oscillator is an indicator based on market breadth which technical analysts can use in conjunction with other technical tools to determine the overall state of the stock market and assess the strength of its current trend.
Since the indicator is based on all the stocks in an exchange, it is compared to the price movements of indexes that reflect that exchange, or compared to major indexes such as the S&P 500.
Positive and negative values indicate whether more stocks, on average, are advancing or declining. The indicator is positive when the 19-day EMA is above the 39-day EMA, and negative when the 19-day EMA is below the 39-day EMA.
A positive and rising indicator suggests that stocks on the exchange are being accumulated. A negative and falling indicator signals that stocks are being sold. Typically such action confirms the current trend in the index.
Crossovers from positive to negative, or vice versa, may signal the trend has changed in the index or exchange being tracked. When the indicator makes a large move, typically of 100 points or more, from negative to positive territory, that is called a breadth thrust.
It means a large number of stocks moved up after a bearish move. Since the stock market tends to rise over time, this a positive signal and may indicate that a bottom in the index is in and prices are heading higher overall.
When index prices and the indicator are moving in different directions, then the current index trend may lack strength. Bullish divergence occurs when the oscillator is rising while the index is falling. This indicates the index could head higher soon since more stocks are starting to advance.
Bearish divergence is when the index is rising and the indicator is falling. This means fewer stocks are keeping the advance going and prices may start to head lower.
Limitations of Using the McClellan Oscillator
The indicator tends to produce lots of signals. Breadth thrusts, divergence, and crossovers all occur with some frequency, but not all these signals will result in the price/index moving in the expected direction.
The indicator is prone to producing false signals and therefore should be used in conjunction with price action analysis and other technical indicators.
The indicator can also be quite choppy, moving between positive and negative territory rapidly. Such action indicates a choppy market, but this isn't evident until the indicator has made this whipsaw move a few times.
Good luck and a big thanks to Fadior!