Divergence shortterm swing daytrading I've added a few lines to Mawreez' RSI Divergence Detector.
I edited the visual and filtered the signals in same direction of the current candle.
this indicator shows long and short signals based on divergences. It's better not to trade against powerful trend.
Wyszukaj w skryptach "Divergence"
Divergence of DecisionPoint Breadth Swenlin Trading [LazyBear]// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © 03.freeman
//This is indicator from LazyBear is very accurate for stocks and indexes.
//I added some code snippets for spot and draw divergences automatically
//
// @author LazyBear
//
//
Best use with daily time frame.
Enter when a divergence is found (Bull or Bear label) and wait at least a couple of candles before exit.
Next improvement: alerts ready made for webhooks and screener for multiple tickers.
Please use comment section for any feedback.
Stefan Krecher: Jeddingen Divergence v2This is an update to my script:
Stefan-Krecher-Jeddingen-Divergence/
The behaviour is exactly the same, I just added the option to create alerts based on this indicator
[RS]RSI Divergence V5 Thank You Richard Santos!!!
This is a great indicator guys.Its good for measuring divergence in an objective way.
The idea is to measure the high to high and the low to low (stock vs. indicator) with the low to high and high to low (stock vs. indicator). This is the basis of divergence.
I love this one.
I would also add you can draw angles on the indicator and the stocks. All in all a great indicator.
Richard Santos was nice enough to modify one of his scripts for this one. Credit goes to him.
You can also use this for measuring volatility when the lines narrow or widen.
Divergence BacktesterThere is n number of possible ways in which we can backtest divergence and this is just a start :)
In this script, we are trying to count how many times the pivots made HH, HL, LH, LL after a particular divergence state.
An example of using data is as below:
The script keeps track of each pivot sentiment and resulting next pivot state. As mentioned in the chart snapshot, we can look at two of the previous pivot states and collect stats on how each of these state impacted price action.
As mentioned before, this is just tip of iceberg. Further combinations for which we can do backtest are:
1. m X n combinations of last pivot and last to last pivot divergence state
2. divergence combined with double divergence state.
Only issue to explore further is lack of space on the chart as tables can take up huge space.
PS: As you can see based on historical stats, probability of divergence impacting the change of trend is very low in most cases.
Continuous DivergenceDivergence is generally measured on the RSI and limited to finding either:
1. higher highs on the price and lower highs on the RSI (bearish divergence)
2. lower lows on the price and higher lows on the RSI (bullish divergence)
Continuous Divergence (CD) does two things differently. Firstly, it uses the MFI as its primary source of data, due to its volume component giving it higher accuracy. Secondly, it doesn't measure discrete divergence - i.e. between peaks and troughs - but rather a continuous divergence measurement.
Essentially it is measuring at any given time, the correlation between the price and the MFI. This is smoothed with a moving average (configurable) to get cleaner lines.
CD is used to detect both a slowing down of momentum on the current trend, and a reversal of trend due to changing momentum.
Divergence MACD Sign/Alert [MsF]MACD divergence sign & alert notification.
With this router, you can choose which further indicators you want to see divergence in MACD.
In addition, in order to improve visibility, the sub-window is designed to display only the selected index and diversity.
Lookback Bars: When detecting divergence, you can set how many bars to look back in the past.
--------------
MACDダイバージェンスのサイン&アラートインジケータです。
このインジケータでは、MACDの中でさらにどの指標のダイバージェンスを見るか選択できます。"MACD"、"Signal"、"ヒストグラム"の3つから選べます。
なお、サブウィンドウには可視性向上のため、選択した指標とダイバージェンスのみを表示する仕様としています。
■設定について
Lookback Bars:ダイバージェンス検出する場合に、何個のバーを過去にさかのぼるか設定できます。
MACD and RSI divergence by Rexio v2Hi everyone!
I wrote this indicator for intraday trading and it cannot be use only by itself you need to at least draw some S/R lines to make it useful. It is based at MACD histogram and gives signal when it sees divergence on MACD/RSI/MACD's Histogram (or all at once - settings) when macd's histogram switchs trend. Im using it to playing with a trend most of the time looking for hidden divergence at higher time frame and after that looking for regular divergence at lower time frame.
Im not a computer programist nor professional trader so it is only for educational purposes only.
Divergence for Many Indicators v4 STHello Traders.
This is the Strategy version of Divergence for Many Indicators v4, an easy and comfortable indicator.
- - - -
*It's been modified a little bit from the original.
*I got permission from the original author.
*I'm not good at English, I'm sorry.
- - - -
< 4 things to check >
1. Since repainting is not performed, the first imprinted signal can be accurately seen.
2. It does not respond to continuous diversions.
3. If the opposite diversity is not imprinted, caution is required as it is designed not to indicate liquidation. Be careful when reading the figures shown in the strategy tester.
4. Added stop loss and take propirane.
< What changed? >
1. pivot period 5 - > 9
2. Money Flow index and Chaikin Money Flow are released.
- - - -
KOR SUB
< 4가지 확인 사항 >
1. 리페인팅이 없으므로 첫 번째로 각인된 신호를 정확히 볼 수 있습니다.
2. 연속된 다이버젼스에 대해서는 반응하지 않습니다.
3. 반대의 다이버젼스가 각인되지 않으면 청산 표시를 하지 않도록 설계되어 있으므로 주의를 요합니다.
4. 스탑 로스와 테이크 프로핏 항목을 추가하였습니다.
< 무엇이 변경되었나? >
1. 피봇 페리어드 값이 조금 수정되었습니다.
2. MFI & CMF 가 체크 해제된 상태입니다.
THANK YOU ^^
DivergenceSniper----DivergenceSnipper is an indicator that marks the divergences in any temporality, on an RSI, and possible retracements that are not very reliable, but to take into account, green arrows indicate divergence on the upside and red divergence on the downside, I hope it works.
----DivergenceSnipper es un indicador que te marca las divergencias en cualquier temporalidad, sobre un RSI, y posibles retrocesos que no son muy fiables, pero a tener en cuenta, flechas verdes indican divergencia al alza y rojas divergencia a la baja, espero les sirva.
Better Divergence On Any Indicator [DoctaBot]This is an expansion of the Tradingview built in Divergences indicator (bottom) with 2 MAJOR differences.
First, and most importantly, the built in indicator identifies pivots in your chosen oscillator, but then utilizes the corresponding candle's HIGH or LOW to identify potential divergences. I'm not a fan of this method because oscillator values are typically calculated using the candle CLOSE values, so, in my opinion, divergences should be identified using the candle CLOSE value as well, as they are in this script.
Second, the built in divergence indicator only looks back one oscillator pivot for potential divergences. I coded this to look back one additional pivot as well to identify more valid potential divergences. The script will only identify these types of "multiple pivot divergences" if the oscillator pivot in between the two diverging pivots DOES NOT intersect the line being drawn them.
Notes for chart:
#1: This built in Divergence indicator misses this hidden bearish divergence because of the pivot in between (marked with red vertical line). No divergence exists between the most recent pivots, but it does if we compare it to the next one back.
#2: The RSI14 is making a lower high here, the first criteria for a bearish divergence. The built in Divergence indicator then references the candles' HIGHS. Because the most recent HIGH exceeds the previous one, it is considered a higher high and incorrectly identified as a bearish divergence. If we use the candle CLOSE price to identify divergences, this does not qualify.
#3: Here, we see both of the updates in action. Neither of these bearish divergences are identified with the built in Divergence Indicator. The first divergence s missed due to the use of candle HIGHS rather than closes; the original HIGH is greater than the next HIGH, however, comparison of closes shows that it is, in fact, a higher CLOSE. The second divergence is missed because original indicator can only look back one pivot and, consequently, misses the divergence between the next one back.
Please note, you may notice while using this script that some of the older divergences do not show any lines between the oscillator pivots. THIS IS NOT A BUG! In order to draw divergence lines properly for multiple pivots back, I had to use the line.new functions rather than plot functions. These line functions will delete old lines when a certain number have been drawn on the chart so these old ones are automatically erased as time passes.
VMDM - Volume, Momentum & Divergence Master [BullByte]VMDM - Volume, Momentum and Divergence Master
Educational Multi-Layer Market Structure Analysis System
Multi-factor divergence engine that scores RSI momentum, volume pressure, and institutional footprints into one non-repainting confluence rating (0-100).
WHAT THIS INDICATOR IS
VMDM is an educational indicator designed to teach traders how to recognize high-probability reversal and continuation patterns by analyzing four independent market dimensions simultaneously. Instead of relying on a single indicator that may produce frequent false signals, VMDM creates a confluence-based scoring system that weights multiple confirmation factors, helping you understand which setups have stronger technical backing and which are lower quality.
This is NOT a trading system or signal generator. It is a learning tool that visualizes complex market structure concepts in an accessible format for both coders and non-coders.
THE PROBLEM IT SOLVES
Most traders face these common challenges:
Challenge 1 - Indicator Overload: Running RSI, volume analysis, and divergence detection separately creates chart clutter and conflicting signals. You waste time cross-referencing multiple windows trying to determine if all factors align.
Challenge 2 - False Divergences: Standard divergence indicators trigger on every minor pivot, creating noise. Many divergences fail because they lack supporting evidence from volume or market structure.
Challenge 3 - Missed Context: A bullish RSI divergence means nothing if it occurs during weak volume or in the middle of strong distribution. Context determines quality.
Challenge 4 - Repainting Confusion: Many divergence scripts repaint, showing perfect historical signals that never actually triggered in real-time, leading to false confidence.
Challenge 5 - Institutional Pattern Recognition: Absorption zones, stop hunts, and exhaustion patterns are taught in trading education but difficult to identify systematically without manual analysis.
VMDM addresses all five challenges by combining complementary analytical layers into one transparent, non-repainting, confluence-weighted system with visual clarity.
WHY THIS SPECIFIC COMBINATION - MASHUP JUSTIFICATION
This indicator is NOT a random mashup of popular indicators. Each of the four layers serves a specific analytical purpose and together they create a complete market structure assessment framework.
THE FOUR ANALYTICAL LAYERS
LAYER 1 - RSI MOMENTUM DIVERGENCE (Trend Exhaustion Detection)
Purpose: Identifies when price momentum is weakening before price itself reverses.
Why RSI: The Relative Strength Index measures momentum on a bounded 0-100 scale, making divergence detection mathematically consistent across all assets and timeframes. Unlike raw price oscillators, RSI normalizes momentum regardless of volatility regime.
How It Contributes: Divergence between price pivots and RSI pivots reveals early momentum exhaustion. A lower price low with a higher RSI low (bullish regular divergence) signals sellers are losing strength even as price makes new lows. This is the PRIMARY signal generator in VMDM.
Limitation If Used Alone: RSI divergence by itself produces many false signals because momentum can remain weak during continued trends. It needs confirmation from volume and structural evidence.
LAYER 2 - VOLUME PRESSURE ANALYSIS (Buying vs Selling Intensity)
Purpose: Quantifies whether the current bar's volume reflects buying pressure or selling pressure based on where price closed within the bar's range.
Methodology: Instead of just measuring volume size, VMDM calculates WHERE in the bar range the close occurred. A close near the high on high volume indicates strong buying absorption. A close near the low indicates selling pressure. The calculation accounts for wick size (wicks reduce pressure quality) and uses percentile ranking over a lookback period to normalize pressure strength on a 0-100 scale.
Formula Concept:
Buy Pressure = Volume × (Close - Low) / (High - Low) × Wick Quality Factor
Sell Pressure = Volume × (High - Close) / (High - Low) × Wick Quality Factor
Net Pressure = Buy Pressure - Sell Pressure
Pressure Strength = Percentile Rank of Net Pressure over lookback period
Why Percentile Ranking: Absolute volume varies by asset and session. Percentile ranking makes 85th percentile pressure on low-volume crypto comparable to 85th percentile pressure on high-volume forex.
How It Contributes: When a bullish divergence occurs at a pivot low AND pressure strength is above 60 (strong buying), this adds 25 confluence points. It confirms that the divergence is occurring during actual accumulation, not just weak selling.
Limitation If Used Alone: Pressure analysis shows current bar intensity but cannot identify trend exhaustion or reversal timing. High buying pressure can exist during a strong uptrend with no reversal imminent.
LAYER 3 - BEHAVIORAL FOOTPRINT PATTERNS (Volume Anomaly Detection)
CRITICAL DISCLAIMER: The terms "institutional footprint," "absorption," "stop hunt," and "exhaustion" used in this indicator are EDUCATIONAL LABELS for specific price and volume behavioral patterns. These patterns are detected through technical analysis of publicly available price, volume, and bar structure data. This indicator does NOT have access to actual institutional order flow, market maker data, broker stop-loss locations, or any non-public data source. These pattern names are used because they are common terminology in trading education to describe these technical behaviors. The analysis is interpretive and based on observable price action, not privileged information.
Purpose: Detect volume anomalies and price patterns that historically correlate with potential reversal zones or trend continuation failure.
Pattern Type 1 - Absorption (Labeled as "ACCUMULATION" or "DISTRIBUTION")
Detection Criteria: Volume is more than 2x the moving average AND bar range is less than 50 percent of the average bar range.
Interpretation: High volume compressed into a tight range suggests large participants are absorbing supply (accumulation) or distribution (distribution) without allowing price to move significantly. This often precedes directional moves once absorption completes.
Visual: Colored box zone highlighting the absorption area.
Pattern Type 2 - Stop Hunt (Labeled as "BULL HUNT" or "BEAR HUNT")
Detection Criteria: Price penetrates a recent 10-bar high or low by a small margin (0.2 percent), then closes back inside the range on above-average volume (1.5x+).
Interpretation: Price briefly spikes beyond recent structure (likely triggering stop losses placed just beyond obvious levels) then reverses. This is a classic false breakout pattern often seen before reversals.
Visual: Label at the wick extreme showing hunt direction.
Pattern Type 3 - Exhaustion (Labeled as "SELL EXHAUST" or "BUY EXHAUST")
Detection Criteria: Lower wick is more than 2.5x the body size with volume above 1.8x average and RSI below 35 (sell exhaustion), OR upper wick more than 2.5x body size with volume above 1.8x average and RSI above 65 (buy exhaustion).
Interpretation: Large wicks with high volume and extreme RSI suggest aggressive buying or selling was met with equally aggressive rejection. This exhaustion often marks short-term extremes.
Visual: Label showing exhaustion type.
How These Contribute: When a divergence forms at a pivot AND one of these behavioral patterns is active, the confluence score increases by 20 points. This confirms the divergence is occurring during structural anomaly activity, not just normal price flow.
Limitation If Used Alone: These patterns can occur mid-trend and do not indicate direction without momentum context. Absorption in a strong uptrend may just be continuation accumulation.
LAYER 4 - CONFLUENCE SCORING MATRIX (Quality Weighting System)
Purpose: Translate all detected conditions into a single 0-100 quality score so you can objectively compare setups.
Scoring Breakdown:
Divergence Present: +30 points (primary signal)
Pressure Confirmation: +25 points (volume supports direction)
Behavioral Footprint Active: +20 points (structural anomaly present)
RSI Extreme: +15 points (RSI below 30 or above 70 at pivot)
Volume Spike: +10 points (current volume above 1.5x average)
Maximum Possible Score: 100 points
Why These Weights: The weights reflect reliability hierarchy based on backtesting observation. Divergence is the core signal (30 points), but without volume confirmation (25 points) many fail. Behavioral patterns add meaningful context (20 points). RSI extremes and volume spikes are secondary confirmations (15 and 10 points).
Quality Tiers:
90-100: TEXTBOOK (all factors aligned)
75-89: HIGH QUALITY (strong confluence)
60-74: VALID (meets minimum threshold)
Below 60: DEVELOPING (not displayed unless threshold lowered)
How It Contributes: The confluence score allows you to filter noise. You can set your minimum quality threshold in settings. Higher thresholds (75+) show fewer but higher-quality patterns. Lower thresholds (50-60) show more patterns but include lower-confidence setups. This teaches you to distinguish strong setups from weak ones.
Limitation: Confluence scoring is historical observation-based, not predictive guarantee. A 95-point setup can still fail. The score represents technical alignment, not future certainty.
WHY THIS COMBINATION WORKS TOGETHER
Each layer addresses a limitation in the others:
RSI Divergence identifies WHEN momentum is exhausting (timing)
Volume Pressure confirms WHETHER the exhaustion is accompanied by opposite-side accumulation (confirmation)
Behavioral Footprint shows IF structural anomalies support the reversal hypothesis (context)
Confluence Scoring weights ALL factors into an objective quality metric (filtering)
Using only RSI divergence gives you timing without confirmation. Using only volume pressure gives you intensity without directional context. Using only pattern detection gives you anomalies without trend exhaustion context. Using all four together creates a complete analytical framework where each layer compensates for the others' weaknesses.
This is not a mashup for the sake of combining indicators. It is a structured analytical system where each component has a defined role in a multi-dimensional market assessment process.
HOW TO READ THE INDICATOR - VISUAL ELEMENTS GUIDE
VMDM displays up to five visual layer types. You can enable or disable each layer independently in settings under "Visual Layers."
VISUAL LAYER 1 - MARKET STRUCTURE (Pivot Points and Lines)
What You See:
Small labels at swing highs and lows marked "PH" (Pivot High) and "PL" (Pivot Low) with horizontal dashed lines extending right from each pivot.
What It Means:
These are CONFIRMED pivots, not real-time. A pivot low appears AFTER the required right-side confirmation bars pass (default 3 bars). This creates a delay but prevents repainting. The pivot only appears once it is mathematically confirmed.
The horizontal lines represent support (from pivot lows) and resistance (from pivot highs) levels where price previously found significant rejection.
Color Coding:
Green label and line: Pivot Low (potential support)
Red label and line: Pivot High (potential resistance)
How To Use:
These pivots are the foundation for divergence detection. Divergence is only calculated between confirmed pivots, ensuring all signals are non-repainting. The lines help you see historical structure levels.
VISUAL LAYER 2 - PRESSURE ZONES (Background Color)
What You See:
Subtle background color shading on bars - light green or light red tint.
What It Means:
This visualizes volume pressure strength in real-time.
Color Coding:
Light Green Background: Pressure Strength above 70 (strong buying pressure - price closing near highs on volume)
Light Red Background: Pressure Strength below 30 (strong selling pressure - price closing near lows on volume)
No Color: Neutral pressure (pressure between 30-70)
How To Use:
When a bullish divergence pattern appears during green pressure zones, it suggests the divergence is forming during accumulation. When a bearish divergence appears during red zones, distribution is occurring. Pressure zones help you filter divergences - those forming in supportive pressure environments have higher probability.
VISUAL LAYER 3 - DIVERGENCE LINES (Dotted Connectors)
What You See:
Dotted lines connecting two pivot points (either two pivot lows or two pivot highs).
What It Means:
A divergence has been detected between those two pivots. The line connects the price pivots where RSI showed opposite behavior.
Color Coding:
Bright Green Line: Bullish divergence (regular or hidden)
Bright Red Line: Bearish divergence (regular or hidden)
How To Use:
The divergence line appears ONLY after the second pivot is confirmed (delayed by right-side confirmation bars). This is intentional to prevent repainting. When you see the line appear, it means:
For Bullish Regular Divergence:
Price made a lower low (second pivot lower than first)
RSI made a higher low (RSI at second pivot higher than first)
Interpretation: Downtrend losing momentum
For Bullish Hidden Divergence:
Price made a higher low (second pivot higher than first)
RSI made a lower low (RSI at second pivot lower than first)
Interpretation: Uptrend continuation likely (pullback within uptrend)
For Bearish Regular Divergence:
Price made a higher high (second pivot higher than first)
RSI made a lower high (RSI at second pivot lower than first)
Interpretation: Uptrend losing momentum
For Bearish Hidden Divergence:
Price made a lower high (second pivot lower than first)
RSI made a higher high (RSI at second pivot higher than first)
Interpretation: Downtrend continuation likely (bounce within downtrend)
If "Show Consolidated Analysis Label" is disabled, a small label will appear on the divergence line showing the divergence type abbreviation.
VISUAL LAYER 4 - BEHAVIORAL FOOTPRINT MARKERS
What You See:
Boxes, labels, and markers at specific bars showing pattern detection.
ABSORPTION ZONES (Boxes):
Colored rectangular boxes spanning one or more bars.
Purple Box: Accumulation absorption zone (high volume, tight range, bullish close)
Red Box: Distribution absorption zone (high volume, tight range, bearish close)
If absorption continues for multiple consecutive bars, the box extends and a counter appears in the label showing how many bars the absorption lasted.
What It Means: Large volume is being absorbed without significant price movement. This often precedes directional breakouts once the absorption phase completes.
STOP HUNT MARKERS (Labels):
Small labels below or above wicks labeled "BULL HUNT" or "BEAR HUNT" (may show bar count if consecutive).
What It Means:
BULL HUNT : Price spiked below recent lows then reversed back up on volume - likely triggered sell stops before reversing
BEAR HUNT : Price spiked above recent highs then reversed back down on volume - likely triggered buy stops before reversing
EXHAUSTION MARKERS (Labels):
Labels showing "SELL EXHAUST" or "BUY EXHAUST."
What It Means:
SELL EXHAUST : Large lower wick with high volume and low RSI - aggressive selling met with strong rejection
BUY EXHAUST : Large upper wick with high volume and high RSI - aggressive buying met with strong rejection
How To Use:
These markers help you identify WHERE structural anomalies occurred. When a divergence signal appears AT THE SAME TIME as one of these patterns, the confluence score increases. You are looking for alignment - divergence + behavioral pattern + pressure confirmation = high-quality setup.
VISUAL LAYER 5 - CONSOLIDATED ANALYSIS LABEL (Main Pattern Signal)
What You See:
A large label appearing at pivot points (or in real-time mode, at current bar) containing full pattern analysis.
Label Appearance:
Depending on your "Use Compact Label Format" setting:
COMPACT MODE (Single Line):
Example: "BULLISH REGULAR | Q:HIGH QUALITY C:82"
Breakdown:
BULLISH REGULAR: Divergence type detected
Q:HIGH QUALITY: Pattern quality tier
C:82: Confluence score (82 out of 100)
FULL MODE (Multi-Line Detailed):
Example:
PATTERN DETECTED
-------------------
BULLISH REGULAR
Quality: HIGH QUALITY
Price: Lower Low
Momentum: Higher Low
Signal: Weakening Downtrend
CONFLUENCE: 82/100
-------------------
Divergence: 30
Pressure: 25
Institutional: 20
RSI Extreme: 0
Volume: 10
Breakdown:
Top section: Pattern type and quality
Middle section: Divergence explanation (what price did vs what RSI did)
Bottom section: Confluence score with itemized breakdown showing which factors contributed
Label Position:
In Confirmed modes: Label appears AT the pivot point (delayed by confirmation bars)
In Real-time mode: Label appears at current bar as conditions develop
Label Color:
Gold: Textbook quality (90+ confluence)
Green: High quality (75-89 confluence)
Blue: Valid quality (60-74 confluence)
How To Use:
This is your primary decision-making label. When it appears:
Check the divergence type (regular divergences are reversal signals, hidden divergences are continuation signals)
Review the quality tier (textbook and high quality have better historical win rates)
Examine the confluence breakdown to see which factors are present and which are missing
Look at the chart context (trend, support/resistance, timeframe)
Use this information to assess whether the setup aligns with your strategy
The label does NOT tell you to buy or sell. It tells you a technical pattern has formed and provides the quality assessment. Your trading decision must incorporate risk management, market context, and your strategy rules.
UNDERSTANDING THE THREE DETECTION MODES
VMDM offers three signal detection modes in settings to accommodate different trading styles and learning objectives.
MODE 1: "Confluence Only (Real-Time)"
How It Works: Displays signals AS THEY DEVELOP on the current bar without waiting for pivot confirmation. The system calculates confluence score from pressure, volume, RSI extremes, and behavioral patterns. Divergence signals are NOT required in this mode.
Delay: ZERO - signals appear immediately.
Use Case: Real-time scanning for high-confluence zones without divergence requirement. Useful for intraday traders who want immediate alerts when multiple factors align.
Tradeoff: More frequent signals but includes setups without confirmed divergence. Higher false signal rate. Signals can change as the bar develops (not repainting in historical bars, but current bar updates).
Visual Behavior: Labels appear at the current bar. No divergence lines unless divergence happens to be present.
MODE 2: "Divergence + Confluence (Confirmed)" - DEFAULT RECOMMENDED
How It Works: Full system engagement. Signals appear ONLY when:
A pivot is confirmed (requires right-side confirmation bars to pass)
Divergence is detected between current pivot and previous pivot
Total confluence score meets or exceeds your minimum threshold
Delay: Equal to your "Pivot Right Bars" setting (default 3 bars). This means signals appear 3 bars AFTER the actual pivot formed.
Use Case: Highest-quality, non-repainting signals for swing traders and learners who want to study confirmed pattern completion.
Tradeoff: Delayed signals. You will not receive the signal until confirmation occurs. In fast-moving markets, price may have already moved significantly by the time the signal appears.
Visual Behavior: Labels appear at the historical pivot location (in the past). Divergence lines connect the two pivots. This is the most educational mode because it shows completed, confirmed patterns.
Non-Repainting Guarantee: Yes. Once a signal appears, it never disappears or changes.
MODE 3: "Divergence + Confluence (Relaxed)"
How It Works: Same as Confirmed mode but with adaptive thresholds. If confluence is very high (10 points above threshold), the signal may appear even if some factors are weak. If divergence is present but confluence is slightly below threshold (within 10 points), it may still appear.
Delay: Same as Confirmed mode (right-side confirmation bars).
Use Case: Slightly more signals than Confirmed mode for traders willing to accept near-threshold setups.
Tradeoff: More signals but lower average quality than Confirmed mode.
Visual Behavior: Same as Confirmed mode.
DASHBOARD GUIDE - READING THE METRICS
The dashboard appears in the corner of your chart (position selectable in settings) and provides real-time market state analysis.
You can choose between four dashboard detail levels in settings: Off, Compact, Optimized (default), Full.
DASHBOARD ROW EXPLANATIONS
ROW 1 - Header Information
Left: Current symbol and timeframe
Center: "VMDM "
Right: Version number
ROW 2 - Mode and Delay
Shows which detection mode you are using and the signal delay.
Example: "CONFIRMED | Delay: 3 bars"
This reminds you that signals in confirmed mode appear 3 bars after the pivot forms.
ROW 3 - Market Regime
Format: "TREND UP HV" or "RANGING NV"
First Part - Trend State:
TREND UP: 20 EMA above 50 EMA with strong separation
TREND DOWN: 20 EMA below 50 EMA with strong separation
RANGING: EMAs close together, low trend strength
TRANSITION: Between trending and ranging states
Second Part - Volatility State:
HV: High Volatility (current ATR more than 1.3x the 50-bar average ATR)
NV: Normal Volatility (current ATR between 0.7x and 1.3x average)
LV: Low Volatility (current ATR less than 0.7x average)
Third Column: Volatility ratio (example: "1.45x" means current ATR is 1.45 times normal)
How To Use: Regime context helps you interpret signals. Reversal divergences are more reliable in ranging or transitional regimes. Continuation divergences (hidden) are more reliable in trending regimes. High volatility means wider stops may be needed.
ROW 4 - Pressure
Shows current volume pressure state.
Format: "BUYING | ██████████░░░░░░░░░"
States:
BUYING : Pressure strength above 60 (closes near highs)
SELLING : Pressure strength below 40 (closes near lows)
NEUTRAL : Pressure strength between 40-60
Bar Visualization: Each block represents 10 percentile points. A full bar (10 filled blocks) = 100th percentile pressure.
Color: Green for buying, red for selling, gray for neutral.
How To Use: When pressure aligns with divergence direction (bullish divergence during buying pressure), confluence is stronger.
ROW 5 - Volume and RSI
Format: "1.8x | RSI 68 | OB"
First Value: Current volume ratio (1.8x = volume is 1.8 times the moving average)
Second Value: Current RSI reading
Third Value: RSI state
OB: Overbought (RSI above 70)
OS: Oversold (RSI below 30)
Blank: Neutral RSI
How To Use: Volume spikes (above 1.5x) during divergence formation add confluence. RSI extremes at pivots add confluence.
ROW 6 - Behavioral Footprint
Format: "BULL HUNT | 2 bars"
Shows the most recent behavioral pattern detected and how long ago.
States:
ACCUMULATION / DISTRIBUTION: Absorption detected
BULL HUNT / BEAR HUNT: Stop hunt detected
SELL EXHAUST / BUY EXHAUST: Exhaustion detected
SCANNING: No recent pattern
NOW: Pattern is active on current bar
How To Use: When footprint activity is recent (within 50 bars) or active now, it adds context to divergence signals forming in that area.
ROW 7 - Current Pattern
Shows the divergence type currently detected (if any).
Examples: "BULLISH REGULAR", "BEARISH HIDDEN", "Scanning..."
Quality: Shows pattern quality (TEXTBOOK, HIGH QUALITY, VALID)
How To Use: This tells you what type of signal is active. Regular divergences are reversal setups. Hidden divergences are continuation setups.
ROW 8 - Session Summary
Format: "14 events | A3 H8 E3"
First Value: Total institutional events this session
Breakdown:
A: Absorption events
H: Stop hunt events
E: Exhaustion events
How To Use: High event counts suggest an active, volatile session with frequent structural anomalies. Low counts suggest quiet, orderly price action.
ROW 9 - Confluence Score (Optimized/Full mode only)
Format: "78/100 | ████████░░"
Shows current real-time confluence score even if no pattern is confirmed yet.
How To Use: Watch this in real-time to see how close you are to pattern formation. When it exceeds your threshold and divergence forms, a signal will appear (after confirmation delay).
ROW 10 - Patterns Studied (Optimized/Full mode only)
Format: "47 patterns | 12 bars ago"
First Value: Total confirmed patterns detected since chart loaded
Second Value: How many bars since the last confirmed pattern appeared
How To Use: Helps you understand pattern frequency on your selected symbol and timeframe. If many bars have passed since last pattern, market may be trending without reversal opportunities.
ROW 11 - Bull/Bear Ratio (Optimized/Full mode only)
Format: "28:19 | BULL"
Shows count of bullish vs bearish patterns detected.
Balance:
BULL: More bullish patterns detected (suggests market has had more bullish reversals/continuations)
BEAR: More bearish patterns detected
BAL: Equal counts
How To Use: Extreme imbalances can indicate directional bias in the studied period. A heavily bullish ratio in a downtrend might suggest frequent failed rallies (bearish continuation). Context matters.
ROW 12 - Volume Ratio Detail (Optimized/Full mode only)
Shows current volume vs average volume in absolute terms.
Example: "1.4x | 45230 / 32300"
How To Use: Confirms whether current activity is above or below normal.
ROW 13 - Last Institutional Event (Full mode only)
Shows the most recent institutional pattern type and how many bars ago it occurred.
Example: "DISTRIBUTION | 23 bars"
How To Use: Tracks recency of last anomaly for context.
SETTINGS GUIDE - EVERY PARAMETER EXPLAINED
PERFORMANCE SECTION
Enable All Visuals (Master Toggle)
Default: ON
What It Does: Master kill switch for ALL visual elements (labels, lines, boxes, background colors, dashboard). When OFF, only plot outputs remain (invisible unless you open data window).
When To Change: Turn OFF on mobile devices, 1-second charts, or slow computers to improve performance. You can still receive alerts even with visuals disabled.
Impact: Dramatic performance improvement when OFF, but you lose all visual feedback.
Maximum Object History
Default: 50 | Range: 10-100
What It Does: Limits how many of each object type (labels, lines, boxes) are kept in memory. Older objects beyond this limit are deleted.
When To Change: Lower to 20-30 on fast timeframes (1-minute charts) to prevent slowdown. Increase to 100 on daily charts if you want more historical pattern visibility.
Impact: Lower values = better performance but less historical visibility. Higher values = more history visible but potential slowdown on fast timeframes.
Alert Cooldown (Bars)
Default: 5 | Range: 1-50
What It Does: Minimum number of bars that must pass before another alert of the same type can fire. Prevents alert spam when multiple patterns form in quick succession.
When To Change: Increase to 20+ on 1-minute charts to reduce noise. Decrease to 1-2 on daily charts if you want every pattern alerted.
Impact: Higher cooldown = fewer alerts. Lower cooldown = more alerts.
USER EXPERIENCE SECTION
Show Enhanced Tooltips
Default: ON
What It Does: Enables detailed hover-over tooltips on labels and visual elements.
When To Change: Turn OFF if you encounter Pine Script compilation errors related to tooltip arguments (rare, platform-specific issue).
Impact: Minimal. Just adds helpful hover text.
MARKET STRUCTURE DETECTION SECTION
Pivot Left Bars
Default: 3 | Range: 2-10
What It Does: Number of bars to the LEFT of the center bar that must be higher (for pivot low) or lower (for pivot high) than the center bar for a pivot to be valid.
Example: With value 3, a pivot low requires the center bar's low to be lower than the 3 bars to its left.
When To Change:
Increase to 5-7 on noisy timeframes (1-minute charts) to filter insignificant pivots
Decrease to 2 on slow timeframes (daily charts) to catch more pivots
Impact: Higher values = fewer, more significant pivots = fewer signals. Lower values = more frequent pivots = more signals but more noise.
Pivot Right Bars
Default: 3 | Range: 2-10
What It Does: Number of bars to the RIGHT of the center bar that must pass for confirmation. This creates the non-repainting delay.
Example: With value 3, a pivot is confirmed 3 bars AFTER it forms.
When To Change:
Increase to 5-7 for slower, more confirmed signals (better for swing trading)
Decrease to 2 for faster signals (better for intraday, but still non-repainting)
Impact: Higher values = longer delay but more reliable confirmation. Lower values = faster signals but less confirmation. This setting directly controls your signal delay in Confirmed and Relaxed modes.
Minimum Confluence Score
Default: 60 | Range: 40-95
What It Does: The threshold score required for a pattern to be displayed. Patterns with confluence scores below this threshold are not shown.
When To Change:
Increase to 75+ if you only want high-quality textbook setups (fewer signals)
Decrease to 50-55 if you want to see more developing patterns (more signals, lower average quality)
Impact: This is your primary signal filter. Higher threshold = fewer, higher-quality signals. Lower threshold = more signals but includes weaker setups. Recommended starting point is 60-65.
TECHNICAL PERIODS SECTION
RSI Period
Default: 14 | Range: 5-50
What It Does: Lookback period for RSI calculation.
When To Change:
Decrease to 9-10 for faster, more sensitive RSI that detects shorter-term momentum changes
Increase to 21-28 for slower, smoother RSI that filters noise
Impact: Lower values make RSI more volatile (more frequent extremes and divergences). Higher values make RSI smoother (fewer but more significant divergences). 14 is industry standard.
Volume Moving Average Period
Default: 20 | Range: 10-200
What It Does: Lookback period for calculating average volume. Current volume is compared to this average to determine volume ratio.
When To Change:
Decrease to 10-14 for shorter-term volume comparison (more sensitive to recent volume changes)
Increase to 50-100 for longer-term volume comparison (smoother, less sensitive)
Impact: Lower values make volume ratio more volatile. Higher values make it more stable. 20 is standard.
ATR Period
Default: 14 | Range: 5-100
What It Does: Lookback period for Average True Range calculation used for volatility measurement and label positioning.
When To Change: Rarely needs adjustment. Use 7-10 for faster volatility response, 21-28 for slower.
Impact: Affects volatility ratio calculation and visual label spacing. Minimal impact on signals.
Pressure Percentile Lookback
Default: 50 | Range: 10-300
What It Does: Lookback period for calculating volume pressure percentile ranking. Your current pressure is ranked against the pressure of the last X bars.
When To Change:
Decrease to 20-30 for shorter-term pressure context (more responsive to recent changes)
Increase to 100-200 for longer-term pressure context (smoother rankings)
Impact: Lower values make pressure strength more sensitive to recent bars. Higher values provide more stable, long-term pressure assessment. Capped at 300 for performance reasons.
SIGNAL DETECTION SECTION
Signal Detection Mode
Default: "Divergence + Confluence (Confirmed)"
Options:
Confluence Only (Real-time)
Divergence + Confluence (Confirmed)
Divergence + Confluence (Relaxed)
What It Does: Selects which detection logic mode to use (see "Understanding The Three Detection Modes" section above).
When To Change: Use Confirmed for learning and non-repainting signals. Use Real-time for live scanning without divergence requirement. Use Relaxed for slightly more signals than Confirmed.
Impact: Fundamentally changes when and how signals appear.
VISUAL LAYERS SECTION
All toggles default to ON. Each controls visibility of one visual layer:
Show Market Structure: Pivot markers and support/resistance lines
Show Pressure Zones: Background color shading
Show Divergence Lines: Dotted lines connecting pivots
Show Institutional Footprint Markers: Absorption boxes, hunt labels, exhaustion labels
Show Consolidated Analysis Label: Main pattern detection label
Use Compact Label Format
Default: OFF
What It Does: Switches consolidated label between single-line compact format and multi-line detailed format.
When To Change: Turn ON if you find full labels too large or distracting.
Impact: Visual clarity vs. information density tradeoff.
DASHBOARD SECTION
Dashboard Mode
Default: "Optimized"
Options: Off, Compact, Optimized, Full
What It Does: Controls how much information the dashboard displays.
Off: No dashboard
Compact: 8 rows (essential metrics only)
Optimized: 12 rows (recommended balance)
Full: 13 rows (every available metric)
Dashboard Position
Default: "Top Right"
Options: Top Right, Top Left, Bottom Right, Bottom Left
What It Does: Screen corner where dashboard appears.
HOW TO USE VMDM - PRACTICAL WORKFLOW
STEP 1 - INITIAL SETUP
Add VMDM to your chart
Select your detection mode (Confirmed recommended for learning)
Set your minimum confluence score (start with 60-65)
Adjust pivot parameters if needed (default 3/3 is good for most timeframes)
Enable the visual layers you want to see
STEP 2 - CHART ANALYSIS
Let the indicator load and analyze historical data
Review the patterns that appear historically
Examine the confluence scores - notice which patterns had higher scores
Observe which patterns occurred during supportive pressure zones
Notice the divergence line connections - understand what price vs RSI did
STEP 3 - PATTERN RECOGNITION LEARNING
When a consolidated analysis label appears:
Read the divergence type (regular or hidden, bullish or bearish)
Check the quality tier (textbook, high quality, or valid)
Review the confluence breakdown - which factors contributed
Look at the chart context - where is price relative to structure, trend, etc.
Observe the behavioral footprint markers nearby - do they support the pattern
STEP 4 - REAL-TIME MONITORING
Watch the dashboard for real-time regime and pressure state
Monitor the current confluence score in the dashboard
When it approaches your threshold, be alert for potential pattern formation
When a new pattern appears (after confirmation delay), evaluate it using the workflow above
Use your trading strategy rules to decide if the setup aligns with your criteria
STEP 5 - POST-PATTERN OBSERVATION
After a pattern appears:
Mark the level on your chart
Observe what price does after the pattern completes
Did price respect the reversal/continuation signal
What was the confluence score of patterns that worked vs. those that failed
Learn which quality tiers and confluence levels produce better results on your specific symbol and timeframe
RECOMMENDED TIMEFRAMES AND ASSET CLASSES
VMDM is timeframe-agnostic and works on any asset with volume data. However, optimal performance varies:
BEST TIMEFRAMES
15-Minute to 1-Hour: Ideal balance of signal frequency and reliability. Pivot confirmation delay is acceptable. Sufficient volume data for pressure analysis.
4-Hour to Daily: Excellent for swing trading. Very high-quality signals. Lower frequency but higher significance. Recommended for learning because patterns are clearer.
1-Minute to 5-Minute: Works but requires adjustment. Increase pivot bars to 5-7 for filtering. Decrease max object history to 30 for performance. Expect more noise.
Weekly/Monthly: Works but very infrequent signals. Increase confluence threshold to 70+ to ensure only major patterns appear.
BEST ASSET CLASSES
Forex Majors: Excellent volume data and clear trends. Pressure analysis works well.
Crypto (Major Pairs): Good volume data. High volatility makes divergences more pronounced. Works very well.
Stock Indices (SPY, QQQ, etc.): Excellent. Clean price action and reliable volume.
Individual Stocks: Works well on high-volume stocks. Low-volume stocks may produce unreliable pressure readings.
Commodities (Gold, Oil, etc.): Works well. Clear trends and reactions.
WHAT THIS INDICATOR CANNOT DO - LIMITATIONS
LIMITATION 1 - It Does Not Predict The Future
VMDM identifies when technical conditions align historically associated with potential reversals or continuations. It does not predict what will happen next. A textbook 95-confluence pattern can still fail if fundamental events, news, or larger timeframe structure override the setup.
LIMITATION 2 - Confirmation Delay Means You Miss Early Entry
In Confirmed and Relaxed modes, the non-repainting design means you receive signals AFTER the pivot is confirmed. Price may have already moved significantly by the time you receive the signal. This is the tradeoff for non-repainting reliability. You can use Real-time mode for faster signals but sacrifice divergence confirmation.
LIMITATION 3 - It Does Not Tell You Position Sizing or Risk Management
VMDM provides technical pattern analysis. It does not calculate stop loss levels, take profit targets, or position sizing. You must apply your own risk management rules. Never risk more than you can afford to lose based on a technical signal.
LIMITATION 4 - Volume Pressure Analysis Requires Reliable Volume Data
On assets with thin volume or unreliable volume reporting, pressure analysis may be inaccurate. Stick to major liquid assets with consistent volume data.
LIMITATION 5 - It Cannot Detect Fundamental Events
VMDM is purely technical. It cannot predict earnings reports, central bank decisions, geopolitical events, or other fundamental catalysts that can override technical patterns.
LIMITATION 6 - Divergence Requires Two Pivots
The indicator cannot detect divergence until at least two pivots of the same type have formed. In strong trends without pullbacks, you may go long periods without signals.
LIMITATION 7 - Institutional Pattern Names Are Interpretive
The behavioral footprint patterns are named using common trading education terminology, but they are detected through technical analysis, not actual institutional data access. The patterns are interpretations based on price and volume behavior.
CONCEPT FOUNDATION - WHY THIS APPROACH WORKS
MARKET PRINCIPLE 1 - Momentum Divergence Precedes Price Reversal
Price is the final output of market forces, but momentum (the rate of change in those forces) shifts first. When price makes a new low but the momentum behind that move is weaker (higher RSI low), it signals that sellers are losing strength even though they temporarily pushed price lower. This precedes reversal. This is a fundamental principle in technical analysis taught by Charles Dow, widely observed in market behavior.
MARKET PRINCIPLE 2 - Volume Reveals Conviction
Price can move on low volume (low conviction) or high volume (high conviction). When price makes a new low on declining volume while RSI shows improving momentum, it suggests the new low is not confirmed by participant conviction. Adding volume pressure analysis to momentum divergence adds a confirmation layer that filters false divergences.
MARKET PRINCIPLE 3 - Anomalies Mark Structural Extremes
When volume spikes significantly but range contracts (absorption), or when price spikes beyond structure then reverses (stop hunt), or when aggressive moves are met with large-wick rejection (exhaustion), these anomalies often mark short-term extremes. Combining these structural observations with momentum analysis creates context.
MARKET PRINCIPLE 4 - Confluence Improves Probability
No single technical factor is reliable in isolation. RSI divergence alone fails frequently. Volume analysis alone cannot time entries. Combining multiple independent factors into a weighted system increases the probability that observed patterns have structural significance rather than random noise.
THE EDUCATIONAL VALUE
By visualizing all four layers simultaneously and breaking down the confluence scoring transparently, VMDM teaches you to think in terms of multi-dimensional analysis rather than single-indicator reliance. Over time, you will learn to recognize these patterns manually and understand which combinations produce better results on your traded assets.
INSTITUTIONAL TERMINOLOGY - IMPORTANT CLARIFICATION
This indicator uses the following terms that are common in trading education:
Institutional Footprint
Absorption (Accumulation / Distribution)
Stop Hunt
Exhaustion
CRITICAL DISCLAIMER:
These terms are EDUCATIONAL LABELS for specific price action and volume behavior patterns detected through technical analysis of publicly available chart data (open, high, low, close, volume). This indicator does NOT have access to:
Actual institutional order flow or order book data
Market maker positions or intentions
Broker stop-loss databases
Non-public trading data
Proprietary institutional information
The patterns labeled as "institutional footprint" are interpretations based on observable price and volume behavior that educational trading literature often associates with potential large-participant activity. The detection is algorithmic pattern recognition, not privileged data access.
When this indicator identifies "absorption," it means it detected high volume within a small range - a condition that MAY indicate large orders being filled but is not confirmation of actual institutional participation.
When it identifies a "stop hunt," it means price briefly penetrated a structural level then reversed - a pattern that MAY have triggered stop losses but is not confirmation that stops were specifically targeted.
When it identifies "exhaustion," it means high volume with large rejection wicks - a pattern that MAY indicate aggressive participation meeting strong opposition but is not confirmation of institutional involvement.
These are technical analysis interpretations, not factual statements about market participant identity or intent.
DISCLAIMER AND RISK WARNING
EDUCATIONAL PURPOSE ONLY
This indicator is designed as an educational tool to help traders learn to recognize technical patterns, understand multi-factor analysis, and practice systematic market observation. It is NOT a trading system, signal service, or financial advice.
NO PERFORMANCE GUARANTEE
Past pattern behavior does not guarantee future results. A pattern that historically preceded price movement in one direction may fail in the future due to changing market conditions, fundamental events, or random variance. Confluence scores reflect historical technical alignment, not future certainty.
TRADING INVOLVES SUBSTANTIAL RISK
Trading financial instruments involves substantial risk of loss. You can lose more than your initial investment. Never trade with money you cannot afford to lose. Always use proper risk management including stop losses, position sizing, and portfolio diversification.
NO PREDICTIVE CLAIMS
This indicator does NOT predict future price movement. It identifies when technical conditions align in patterns that historically have been associated with potential reversals or continuations. Market behavior is probabilistic, not deterministic.
BACKTESTING LIMITATIONS
If you backtest trading strategies using this indicator, ensure you account for:
Realistic commission costs
Realistic slippage (difference between signal price and actual fill price)
Sufficient sample size (minimum 100 trades for statistical relevance)
Reasonable position sizing (risking no more than 1-2 percent of account per trade)
The confirmation delay inherent in the indicator (you cannot enter at the exact pivot in Confirmed mode)
Backtests that do not account for these factors will produce unrealistic results.
AUTHOR LIABILITY
The author (BullByte) is not responsible for any trading losses incurred using this indicator. By using this indicator, you acknowledge that all trading decisions are your sole responsibility and that you understand the risks involved.
NOT FINANCIAL ADVICE
Nothing in this indicator, its code, its description, or its visual outputs constitutes financial, investment, or trading advice. Consult a licensed financial advisor before making investment decisions.
FREQUENTLY ASKED QUESTIONS
Q: Why do signals appear in the past, not at the current bar
A: In Confirmed and Relaxed modes, signals appear at confirmed pivots, which requires waiting for right-side confirmation bars (default 3). This creates a delay but prevents repainting. Use Real-time mode if you want current-bar signals without pivot confirmation.
Q: Can I use this for automated trading
A: You can create alert-based automation, but understand that Confirmed mode signals appear AFTER the pivot with delay, so your entry will not be at the pivot price. Real-time mode signals can change as the current bar develops. Automation requires careful consideration of these factors.
Q: How do I know which confluence score to use
A: Start with 60. Observe which patterns work on your symbol/timeframe. If too many false signals, increase to 70-75. If too few signals, decrease to 55. Quality vs. quantity tradeoff.
Q: Do regular divergences mean I should enter a reversal trade immediately
A: No. Regular divergences indicate momentum exhaustion, which is a WARNING sign that trend may reverse, not a confirmation that it will. Use confluence score, market context, support/resistance, and your strategy rules to make entry decisions. Many divergences fail.
Q: What's the difference between regular and hidden divergence
A: Regular divergence = price and momentum move in opposite directions at extremes = potential reversal signal. Hidden divergence = price and momentum move in opposite directions during pullbacks = potential continuation signal. Hidden divergence suggests the pullback is just a correction within the larger trend.
Q: Why does the pressure zone color sometimes conflict with the divergence direction
A: Pressure is real-time current bar analysis. Divergence is confirmed pivot analysis from the past. They measure different things at different times. A bullish divergence confirmed 3 bars ago might appear during current selling pressure. This is normal.
Q: Can I use this on stocks without volume data
A: No. Volume is required for pressure analysis and behavioral pattern detection. Use only on assets with reliable volume reporting.
Q: How often should I expect signals
A: Depends on timeframe and settings. Daily charts might produce 5-10 signals per month. 1-hour charts might produce 20-30. 15-minute charts might produce 50-100. Adjust confluence threshold to control frequency.
Q: Can I modify the code
A: Yes, this is open source. You can modify for personal use. If you publish a modified version, please credit the original and ensure your publication meets TradingView guidelines.
Q: What if I disagree with a pattern's confluence score
A: The scoring weights are based on general observations and may not suit your specific strategy or asset. You can modify the code to adjust weights if you have data-driven reasons to do so.
Final Notes
VMDM - Volume, Momentum and Divergence Master is an educational multi-layer market analysis system designed to teach systematic pattern recognition through transparent, confluence-weighted signal detection. By combining RSI momentum divergence, volume pressure quantification, behavioral footprint pattern recognition, and quality scoring into a unified framework, it provides a comprehensive learning environment for understanding market structure.
Use this tool to develop your analytical skills, understand how multiple technical factors interact, and learn to distinguish high-quality setups from noise. Remember that technical analysis is probabilistic, not predictive. No indicator replaces proper education, risk management, and trading discipline.
Trade responsibly. Learn continuously. Risk only what you can afford to lose.
-BullByte
Gufran - Volume DivergenceThis indicator detects bullish and bearish divergences by analyzing price action, volume trends, and RSI (Relative Strength Index) for added confirmation. It highlights key market reversals or trend continuations by identifying when price movement diverges from volume dynamics, providing traders with actionable insights for entry and exit points.
Key Features:
Divergence Detection:
Bullish Divergence: Price makes a lower low, but volume shows higher lows, signaling potential upward reversals.
Bearish Divergence: Price makes a higher high, but volume shows lower highs, signaling potential downward reversals.
RSI Confirmation:
Bullish Signals: Confirmed when RSI is in the oversold zone.
Bearish Signals: Confirmed when RSI is in the overbought zone (optional relaxation of RSI conditions available).
Normalized Volume Analysis:
Volume is scaled to the price range, ensuring clear and meaningful visualization alongside price action.
Customizable Parameters:
Lookback Period: Define how far back the script looks to identify divergences.
Volume Significance: Adjust the threshold for significant volume movements.
RSI Levels: Fine-tune overbought and oversold thresholds for optimal signal accuracy.
Gap Control: Avoid clutter by setting a minimum number of candles between successive divergence signals.
Clear Visual Representation:
Bullish Divergence: Marked with green labels and connecting lines.
Bearish Divergence: Marked with red labels and connecting lines.
Dotted lines show normalized volume divergence, while solid lines indicate price divergence.
Ideal For:
Traders who rely on volume dynamics to validate price movements.
Those looking for an added layer of confidence using RSI to filter false signals.
Swing and intraday traders aiming to identify market reversal zones or continuation patterns.
Customization Options:
Lookback Period: Adjustable range for detecting highs and lows.
Volume Threshold: Define the multiplier for significant volume changes.
RSI Settings: Tailor overbought/oversold levels to suit your trading style.
Relax RSI Condition: Toggle stricter or more flexible conditions for bearish divergences.
How to Use:
Add the indicator to your chart and configure the parameters to fit the asset and timeframe you are trading.
Look for:
Green “Bullish Div” labels near price lows for potential buying opportunities.
Red “Bearish Div” labels near price highs for potential selling opportunities.
Use this indicator in combination with other tools like support/resistance levels, trendlines, or moving averages for a comprehensive trading strategy.
Disclaimer:
This indicator is a tool for educational purposes and should not be used as a standalone trading signal. Always conduct proper risk management and consider additional technical/fundamental analysis before making trading decisions.
Strength of Divergence Across Multiple Indicators (+CMF&VWMACD)Modified Version of Strength of Divergence Across Multiple Indicators by reees
Purpose:
This Pine Script indicator is designed to identify and evaluate the strength of bullish and bearish divergences across multiple technical indicators. Divergences occur when the price of an asset is moving in one direction while a technical indicator is moving in the opposite direction, potentially signaling a trend reversal.
Key Features:
1. Multiple Indicator Support: The script now analyzes divergences for the following indicators:
* RSI (Relative Strength Index)
* OBV (On-Balance Volume)
* MACD (Moving Average Convergence/Divergence)
* STOCH (Stochastic Oscillator)
* CCI (Commodity Channel Index)
* MFI (Money Flow Index)
* AO (Awesome Oscillator)
* CMF (Chaikin Money Flow) - Newly added
* VWMACD (Volume-Weighted MACD) - Newly added
2. Customizable Divergence Parameters:
* Bullish/Bearish: Enable or disable the detection of bullish and bearish divergences independently.
* Regular/Hidden: Detect both regular and hidden divergences (hidden divergences can indicate trend continuation).
* Broken Trendline Exclusion: Optionally ignore divergences where the trendline connecting price pivots is broken by an intermediate pivot.
* Pivot Lookback Periods: Adjust the number of bars used to identify valid pivot highs and lows for divergence calculations.
* Weighting: Assign different weights to regular vs. hidden divergences and to the relative change in price vs. the indicator.
3. Indicator-Specific Settings:
* Weight: Each indicator can be assigned a weight, influencing its contribution to the overall divergence strength calculation.
* Extreme Value: Define a threshold above which an indicator's divergence is considered "extreme," giving it a higher strength rating.
4. Divergence Strength Calculation:
* For each indicator, the script calculates a divergence "degree" based on the magnitude of the divergence and the user-defined weightings.
* The total divergence strength is the sum of the individual indicator divergence degrees.
* Strength is categorized as "Extreme," "Very strong," "Strong," "Moderate," "Weak," or "Very weak."
5. Visualization:
* Divergence Lines: The script draws lines on the chart connecting the price and indicator pivots that form a divergence (optional, with customizable transparency).
* Labels: Labels display the total divergence strength and a breakdown of each indicator's contribution. The size and visibility of labels are based on the strength.
6. Alerts:
* The script can generate alerts when the total divergence strength exceeds a user-defined threshold.
New Indicators (CMF and VWMACD):
* Chaikin Money Flow (CMF):
* Purpose: Measures the buying and selling pressure by analyzing the relationship between price, volume, and the accumulation/distribution line.
* Divergence: A bullish CMF divergence occurs when the price makes a lower low, but the CMF makes a higher low (suggesting increasing buying pressure). A bearish divergence is the opposite.
* Volume-Weighted MACD (VWMACD):
* Purpose: Similar to the standard MACD but uses volume-weighted moving averages instead of simple moving averages, giving more weight to periods with higher volume.
* Divergence: Divergences are interpreted similarly to the standard MACD, but the VWMACD can be more sensitive to volume changes.
How It Works (Simplified):
1. Pivot Detection: The script identifies pivot highs and lows in both price and the selected indicators using the specified lookback periods.
2. Divergence Check: For each indicator:
* It checks if a series of pivots in price and the indicator are diverging (e.g., price makes a lower low, but the indicator makes a higher low for a bullish divergence).
* It calculates the divergence degree based on the difference in price and indicator values, weightings, and whether it's a regular or hidden divergence.
3. Strength Aggregation: The script sums up the divergence degrees of all enabled indicators to get the total divergence strength.
4. Visualization and Alerts: It draws lines and labels on the chart to visualize the divergences and generates alerts if the total strength exceeds the set threshold.
Benefits:
* Comprehensive Divergence Analysis: By considering multiple indicators, the script provides a more robust assessment of potential trend reversals.
* Customization: The many adjustable parameters allow traders to fine-tune the script to their specific trading style and preferences.
* Objective Strength Evaluation: The divergence strength calculation and categorization offer a more objective way to evaluate the significance of divergences.
* Early Warning System: Divergences can often precede significant price movements, making this script a valuable tool for anticipating potential trend changes.
* Volume Confirmation: The inclusion of CMF and VWMACD add volume-based confirmation to the divergence signals, potentially increasing their reliability.
Limitations:
* Lagging Indicators: Most of the indicators used are lagging, meaning they are based on past price data. Divergences may sometimes occur after a significant price move has already begun.
* False Signals: No indicator is perfect, and divergences can sometimes produce false signals, especially in choppy or ranging markets.
* Subjectivity: While the script aims for objectivity, some settings (like weightings and extreme values) still involve a degree of subjective judgment.
Relative Strength Index (RSI) + Realtime DivergencesRelative Strength Index (RSI) + Realtime Divergences
This version of the RSI indicator includes the following features:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the RSI oscillator has crossed above or below its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- Fadeout oscillator feature will fade out all but the most recent history, leaving your chart free of visual noise.
- Flip oscillator feature can be used with the Tradingview 'Flip chart' feature (Alt+i) in order to flip both the chart and the oscillator, too. This feature is to help traders manually spot divergences that may have a strong natural bias in one direction.
- Optional centerline and range bands.
- Various optional moving average types, bollinger bands etc.
This indicator adds additional features onto the standard RSI whose core calculations remain unchanged. Namely, the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the RSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
What is the Relative Strength Index ( RSI )?
Investopedia describes the Relative Strength Index as follows:
“The relative strength index (RSI) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI is displayed as an oscillator (a line graph) on a scale of zero to 100. The indicator was developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, New Concepts in Technical Trading Systems.
The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.”
The RSI is also commonly used to spot divergences.
You can read more about the RSI and its calculations here
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable pivot periods.
You can adjust the default pivot periods to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
Disclaimer: This script includes code from the stock RSI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
RF+ Divergence Scalping SystemRF+ Divergence Scalping System + Custom Signals + Alerts.
This chart overlay indicator has been developed for the low timeframe divergence scalper.
Built upon the realtime divergence drawing code from the Divergence for Many indicator originally authored by Lonsometheblue, this chart overlay indicator bundles several additional unique features and modifications to serve as an all-in-one divergence scalping system. The current key features at the time of publishing are listed below (features are optional and can be enabled or disabled):
- Fully configurable realtime divergence drawing and alerting feature that can draw divergences directly on the chart using data sourced from up to 11 oscillators selected by the user, which have been included specifically for their ability to detect divergences, including oscillators not presently included in the original Divergence for Many indicator, such as the Ultimate Oscillator and TSI.
- Optional on chart table showing a summary of key statuses of various indicators, and nearby divergences.
- 2 x Range Filters with custom settings used for low timeframe trend detection.
- 3 x configurable multi-timeframe Stochastic RSI overbought and oversold signals with presentation options.
- On-chart pivot points drawn automatically.
- Automatically adjusted pivot period for up to 4 configurable time frames to fine tune divergences drawn for optimal divergence detection.
- Real-price line for use with Heikin Ashi candles, with styling options.
- Real-price close dots for use with Heikin Ashi candles, with styling options.
- A selection of custom signals that can be printed on-chart and alerted.
- Sessions indicator for the London, New York, Tokyo and Sydney trading sessions, including daylight savings toggle, and unique ‘invert background color’ option, which colours the entire chart - except the trading session you have selected, leaving your chart clear of distracting background color.
- Up to 4 fully configurable moving averages.
- Additional configurable settings for numerous built in indicators, allowing you to alter the lengths and source types, including the UO, TSI, MFI, TSV, 2 x Range Filters.
- Configurable RSI Trend detection signal filter used in a number of the signals, which filters buy signals where the RSI is over the RSI moving average, and only prints sell signals where RSI is under the moving average.
- Customisable on-chart watermark, with inputs for a custom title, subtitle, and also an optional symbol | timeframe | date feature.
The Oscillators able to be selected for use in drawing divergences at the time of publishing are as follows:
- Ultimate Oscillator (UO)
- True Strength Indicator (TSI)
- Money Flow Index (MFI)
- Cumulative Delta Volume (CDV)
- Time Segmented Volume (TSV)
- Commodity Channel Index (CCI)
- Awesome Oscillator
- Relative Strength Index (RSI)
- Stochastic
- On Balance Volume (OBV)
- MACD Histogram
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, also when the triple timeframe Stochastic RSI overbought and oversold confluences occur, as well as when custom signals are printed.
Configurable pivot period values.
You can adjust the default pivot period values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable time frames, in a bid to optimize the divergences drawn when the indicator is loaded onto any of the 4 time frames selected. These time frames and their associated pivot periods can be fully reconfigured within the settings menu. By default, these have been further optimized for the low timeframe scalper trading on the 1-15 minute time frames.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
How do traders use overbought and oversold levels in their trading?
The oversold level is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at, or crossing down from an overbought level as a confluence for entry into a short position, and the Stochastic RSI at, or crossing up from an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI.
This indicator is intended for use in conjunction with related panel indicators including the TSI+ (True Strength Indicator + Realtime Divergences), UO+ (Ultimate Oscillator + Realtime Divergences), and optionally the STRSI+ (MTF Stochastic RSI + Realtime Divergences) and MFI+ (Money Flow Index + Realtime Divergences) available via this authors’ Tradingview profile, under the scripts section. The realtime divergence drawing code will not identify all divergences, so it is suggested that you also have panel indicators to observe. Each panel indicator also offers additional means of entry confirmation into divergence trades, for example, the Stochastic can indicate when it is crossing down from overbought or up from oversold, the TSi can indicate when the 2 TSI bands cross over one another upward or downward, and the UO and MFI can indicate an entry confluence when they are nearing, or crossing their centerlines, for more confidence in your divergence trade entries.
Additional information on the settings for this indicator can be found via the tooltips within the settings menu itself. Further information on feature updates, and usage tips & tricks will be added to the comments section below in due course.
Disclaimer: This indicator uses code adapted from the Divergence for Many v4 indicator authored by Lonesometheblue, and several stock indicators authored by Tradingview. With many thanks.
Mawreez' RSI Divergence DetectorThe idea behind this indicator is to have an expression for the amount of divergence on a given chart at every point in time . To achieve this, it adds up the magnitudes any valid divergence of any kind; bullish, bearish or their hidden variants. Where a valid divergence consists of a line on the source series (almost always the closing price), and a line on an oscillator (here: the RSI). The slopes of said lines must have opposite signs, that is to say, one line must be sloping up while the other slopes down. Said lines may not cross their respective series.
The length of the RSI is configurable (default length: 14). The lengths of the divergences are configurable (default: minimum length 3 and maximum length 28 - the latter being twice the default length of the RSI).
This indicator will detect divergences which are still building up. Be duly warned: upcoming divergences may still get invalidated. Another case that one should be very mindful of is that an upcoming divergence may still increase in magnitude before it plays out. Possibly over several more timesteps, there may even be entire additional drives.
The value of this indicator indeed reflects the magnitude of divergence on a chart. However, there is no reason to think the magnitude of a divergence affects the likelihood of said divergence playing out.
The color of the indicator indicates the kind of divergence. The default colors are
green for bullish divergence,
maroon (dark red) for bearish divergence,
lime/light green for hidden bullish divergence,
dark pink for hidden bearish divergence.
Please let me know if you would like to see a version of this indicator that plots both the RSI and this histogram. I will do this for personal use, but I am being a bit of a purist with this publication.
In fact, please don't hesitate to make any comment or to give any kind of suggestion.
CCI Divergence Detector
A technical analysis tool that identifies divergences between price action and the Commodity Channel Index (CCI) oscillator. Unlike standard divergence indicators, this system employs advanced gradient visualization, multi-layer wave effects, and comprehensive customization options to provide traders with crystal-clear divergence signals and market momentum insights.
Core Detection Mechanism
CCI-Based Analysis: The indicator utilizes the Commodity Channel Index as its primary oscillator, calculated from user-configurable source data (default: HLC3) with adjustable length parameters. The CCI provides reliable momentum readings that effectively highlight price-momentum divergences.
Dynamic Pivot Detection: The system employs adaptive pivot detection with three sensitivity levels (High/Normal/Low) to identify significant highs and lows in both price and CCI values. This dynamic approach ensures optimal divergence detection across different market conditions and timeframes.
Dual Divergence Analysis:
Regular Bullish Divergences: Detected when price makes lower lows while CCI makes higher lows, indicating potential upward reversal
Regular Bearish Divergences: Identified when price makes higher highs while CCI makes lower highs, signaling potential downward reversal
Strength Classification System: Each detected divergence is automatically classified into three strength categories (Weak/Moderate/Strong) based on:
-Price differential magnitude
-CCI differential magnitude
-Time duration between pivot points
-User-configurable strength multiplier
Advanced Visual System
Multi-Layer Wave Effects: The indicator features a revolutionary wave visualization system that creates depth through multiple gradient layers around the CCI line. The wave width dynamically adjusts based on ATR volatility, providing intuitive visual feedback about market conditions.
Professional Color Gradient System: Nine independent color inputs control every visual aspect:
Bullish Colors (Light/Medium/Dark): Control oversold areas, wave effects, and strong bullish signals
Bearish Colors (Light/Medium/Dark): Manage overbought zones, wave fills, and strong bearish signals
Neutral Colors (Light/Medium/Dark): Handle table elements, zero line, and transitional states
Intelligent Color Mapping: Colors automatically adapt based on CCI values:
Overbought territory (>100): Bearish color gradients with increasing intensity
Neutral positive (0 to 100): Blend from neutral to bearish tones
Oversold territory (<-100): Bullish color gradients with increasing intensity
Neutral negative (-100 to 0): Transition from neutral to bullish tones
Key Features & Components
Advanced Configuration System: Eight organized input groups provide granular control:
General Settings: System enable, pivot length, confidence thresholds
Oscillator Selection: CCI parameters, overbought/oversold levels, normalization options
Detection Parameters: Divergence types, minimum strength requirements
Sensitivity Tuning: Pivot sensitivity, divergence threshold, confirmation bars
Visual System: Line thickness, labels, backgrounds, table display
Wave Effects: Dynamic width, volatility response, layer count, glow effects
Transparency Controls: Independent transparency for all visual elements
Smoothing & Filtering: CCI smoothing types, noise filtering, wave smoothing
Professional Alert System: Comprehensive alert functionality with dynamic messages including:
-Divergence type and strength classification
-Current CCI value and confidence percentage
-Customizable alert frequency and conditions
Enhanced Information Table: Real-time display showing:
-Current CCI length and value
-Market status (Overbought/Normal/Oversold)
-Active sensitivity setting
Configurable table positioning (4 corner options)
Visual Elements Explained
Primary CCI Line: Main oscillator plot with gradient coloring that reflects market momentum and CCI intensity. Line thickness is user-configurable (1-8 pixels).
Wave Effect Layers: Multi-layer gradient fills creating a dynamic wave around the
CCI line:
-Outer layers provide broad market context
-Inner layers highlight immediate momentum
-Core layers show precise CCI movement
-All layers respond to volatility and momentum changes
Divergence Lines & Labels:
-Solid lines connecting divergence pivot points
-Color-coded based on divergence type and strength
-Labels displaying divergence type and strength classification
-Customizable transparency and size options
Reference Lines:
-Zero line with neutral color coding
-Overbought level (default: 100) with bearish coloring
-Oversold level (default: -100) with bullish coloring
Background Gradient: Optional background coloring that reflects CCI intensity and market conditions with user-controlled transparency (80-99%).
Configuration Options
Sensitivity Controls:
Pivot sensitivity: High/Normal/Low detection levels
Divergence threshold: 0.1-2.0 sensitivity range
Confirmation bars: 1-5 bar confirmation requirement
Strength multiplier: 0.1-3.0 calculation adjustment
Visual Customization:
Line transparency: 0-90% for main elements
Wave transparency: 0-95% for fill effects
Background transparency: 80-99% for subtle background
Label transparency: 0-50% for text elements
Glow transparency: 50-95% for glow effects
Advanced Processing:
Five smoothing types: None/SMA/EMA/RMA/WMA
Noise filtering with adjustable threshold (0.1-10.0)
CCI normalization for enhanced gradient scaling
Dynamic wave width with ATR-based volatility response
Interpretation Guidelines
Divergence Signals:
Strong divergences: High-confidence reversal signals requiring immediate attention
Moderate divergences: Reliable signals suitable for most trading strategies
Weak divergences: Early warning signals best combined with additional confirmation
Wave Intensity: Wave width and color intensity provide real-time volatility and momentum feedback. Wider, more intense waves indicate higher market volatility and stronger momentum.
Color Transitions: Smooth color transitions between bullish, neutral, and bearish states help identify market regime changes and momentum shifts.
CCI Levels: Traditional overbought (>100) and oversold (<-100) levels remain relevant, but the gradient system provides more nuanced momentum reading between these extremes.
Technical Specifications
Compatible Timeframes: All timeframes supported
Maximum Labels: 500 (for divergence marking)
Maximum Lines: 500 (for divergence drawing)
Pine Script Version: v5 (latest optimization)
Overlay Mode: False (separate pane indicator)
Usage Recommendations
This indicator works best when:
-Combined with price action analysis and support/resistance levels
-Used across multiple timeframes for confirmation
-Integrated with proper risk management protocols
-Applied in trending markets for divergence-based reversal signals
-Utilized with other technical indicators for comprehensive analysis
Risk Disclaimer: Trading involves substantial risk of loss. This indicator is provided for analytical purposes only and does not constitute financial advice. Divergence signals, while powerful, are not guaranteed to predict future price movements. Past performance is not indicative of future results. Always use proper risk management and never trade with capital you cannot afford to lose.
MTF CCI + Realtime DivergencesMulti-timeframe Commodity Channel Index (CCI) + Realtime Divergences + Alerts
This version of the CCI includes the following features:
- Optional 2x sets of triple-timeframe overbought and oversold signals with fully configurable timeframes and overbought and oversold thresholds, can indicate where 3 selected timeframes are all overbought or all oversold at the same time, with alert option.
- Optional divergence lines drawn directly onto the oscillator in realtime, with alert options.
- Configurable pivot periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- 'Hide oscillator' feature allows traders to hide the oscillator itself, leaving only the background colours indicating the overbought and oversold periods and/or MTF overbought and oversold confluences, as seen in the chart image.
- Also includes standard configurable CCI options, including CCI length and source type. Defaults set to length 20, and hlc3 source type.
- Optional Flip oscillator feature, allows users to flip the oscillator upside down, for use with Tradingviews 'Flip chart' feature (Alt+i), for the purpose of manually spotting divergences, where the trader has a strong natural bias in one direction, so that they can flip both the chart and the oscillator.
- Optional 'Fade oscillator' feature, which will fade out all but the most recent period, reducing visual noise on the chart.
While this version of the CCI has the ability to draw divergences in realtime along with related alerts so you can be notified as divergences occur without spending all day watching the charts, the main purpose of this indicator was to provide the triple-timeframe overbought and oversold confluence signals, in an attempt to add more confluence, weight and reliability to the single timeframe overbought and oversold states, commonly used for trade entry confluence. It's primary purpose is intended for scalping reversal trades on lower timeframes, typically between 1-15 minutes, which can be used in conjunction with the regular divergences the indicator can highlight. The triple timeframe overbought can often indicate near term reversals to the downside, with the triple timeframe oversold often indicating neartime reversals to the upside. The default timeframes for this confluence are set to check the 1m, 5m and 15m timeframes together, ideal for scalping the < 15 minute charts. The default settings for the MTF #1 timeframes (1m, 5m and 15m) are best used on a <5 minute chart.
Its design and use case is based upon the original MTF Stoch RSI + Realtime Divergences found here .
Commodity Channel Index (CCI)
Investopedia has described the popular oscillator as follows:
“The Commodity Channel Index (CCI) is a momentum-based oscillator used to help determine when an investment vehicle is reaching a condition of being overbought or oversold.
Developed by Donald Lambert, this technical indicator assesses price trend direction and strength, allowing traders to determine if they want to enter or exit a trade, refrain from taking a trade, or add to an existing position. In this way, the indicator can be used to provide trade signals when it acts in a certain way.”
You can read more about the CCI, its use cases and calculations here .
How do traders use overbought and oversold levels in their trading?
The oversold level, that is traditionally when the CCI is above the 100 level is typically interpreted as being 'overbought', and below the -100 level is typically considered 'oversold'. Traders will often use the CCI at an overbought level as a confluence for entry into a short position, and the CCI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the CCI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the CCI. While traditionally, the overbought and oversold levels are below -100 for oversold, and above 100 for overbought, he default threshold settings of this indicator have been increased to provide fewer, stronger signals, especially suited to the low timeframes and highly volatile assets.
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, and also when the triple timeframe overbought and oversold confluences occur.
Configurable pivot period.
You can adjust the default pivot period values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable timeframes, in a bid to optimise the divergences drawn when the indicator is loaded onto any of the 4 timeframes. These timeframes and the auto adjusted pivot periods on each of them can also be reconfigured within the settings menu.
Disclaimer: This script includes code adapted from the Divergence for Many Indicators v4 by LonesomeTheBlue . With special thanks.
MFI + Realtime DivergencesMoney Flow Index (MFI) + Realtime Divergences + Alerts
This version of the MFI indicator adds the following 5 additional features to the stock MFI:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Background colouring option to indicate when the MFI oscillator has crossed above or below its centerline, or optionally when both the MFI has crossed its centerline and an external oscillator, which can be linked via the settings, has also crossed its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the standard MFI , whose core calculations remain unchanged. Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the TSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
What is the Money Flow Index ( MFI )?
Investopedia describes the True Strength Indicator as follows:
“The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume data for identifying overbought or oversold signals in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100.
Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .”
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable pivot periods.
You can adjust the default pivot periods to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock MFI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
MTF Stoch RSI + Realtime DivergencesMulti-timeframe Stochastic RSI + Realtime Divergences + Alerts + Pivot lookback periods.
This version of the Stochastic RSI adds the following additional features to the stock UO by Tradingview:
- Optional 3 x Multiple-timeframe overbought and oversold signals, indicating where 3 selected timeframes are all overbought (>80) or all oversold (<20) at the same time, with alert option.
- Optional divergence lines drawn directly onto the oscillator in realtime, with alert options.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- Indications where the Stoch RSI is crossing down from above the overbought threshold (<80) and crossing above the oversold threshold (>20) levels on a given user selected timeframe, by printing gold dots on the indicator.
- Also includes standard configurable Stoch RSI options, including k length, d length, RSI length, Stochastic length, and source type (close, hl2, etc)
While this version of the Stochastic RSI has the ability to draw divergences in realtime along with related settings and alerts so you can be notified as divergences occur without spending all day watching the charts, the main purpose of this indicator was to provide the triple multiple-timeframe overbought and oversold confluence signals and alerts, in an attempt to add more confluence, weight and reliability to the single timeframe overbought and oversold states, commonly used for trade entry confluence. It's primary purpose is intended for scalping on lower timeframes, typically between 1-15 minutes. The triple timeframe overbought can often indicate near term reversals to the downside, with the triple timeframe oversold often indicating neartime reversals to the upside. The default timeframes for this confluence are set to check the 1 minute, 5 minute, and 15 minute timeframes, ideal for scalping the < 15 minute charts.
The Stochastic RSI
The popular oscillator has been described as follows:
“The Stochastic RSI is an indicator used in technical analysis that ranges between zero and one (or zero and 100 on some charting platforms) and is created by applying the Stochastic oscillator formula to a set of relative strength index (RSI) values rather than to standard price data. Using RSI values within the Stochastic formula gives traders an idea of whether the current RSI value is overbought or oversold. The Stochastic RSI oscillator was developed to take advantage of both momentum indicators in order to create a more sensitive indicator that is attuned to a specific security's historical performance rather than a generalized analysis of price change.”
How do traders use overbought and oversold levels in their trading?
The oversold level, that is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at an overbought level as a confluence for entry into a short position, and the Stochastic RSI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI.
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, and also when the triple timeframe overbought and oversold confluences occur.
Configurable pivot lookback values.
You can adjust the default pivot lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable timeframes, in a bid to optimise the divergences drawn when the indicator is loaded onto any of the 4 timeframes. These timeframes and the auto adjusted pivot periods on each of them can also be reconfigured within the settings menu.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock UO by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
Ultimate Oscillator + Realtime DivergencesUltimate Oscillator (UO) + Realtime Divergences + Alerts + Lookback periods.
This version of the Ultimate Oscillator adds the following 5 additional features to the stock UO by Tradingview:
- Optional divergence lines drawn directly onto the oscillator in realtime
- Configurable alerts to notify you when divergences occur, as well as centerline crossovers.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the UO has crossed the centerline, or optionally when both the UO and an external oscillator, which can be linked via the settings, have both crossed their centerlines.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the stock Ultimate Oscillator by Tradingview, whose core calculations remain unchanged. Namely the configurable option to automatically and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified as divergences occur without spending all day watching the charts. Furthermore, this version of the Ultimate Oscillator comes with configurable lookback periods, which can be configured in order to adjust the length of the divergences, in order to suit shorter or higher timeframe trading approaches.
The Ultimate Oscillator
Tradingview describes the Ultimate Oscillator as follows:
“The Ultimate Oscillator indicator (UO) indicator is a technical analysis tool used to measure momentum across three varying timeframes. The problem with many momentum oscillators is that after a rapid advance or decline in price, they can form false divergence trading signals. For example, after a rapid rise in price, a bearish divergence signal may present itself, however price continues to rise. The ultimate Oscillator attempts to correct this by using multiple timeframes in its calculation as opposed to just one timeframe which is what is used in most other momentum oscillators.”
More information on the history, use cases and calculations of the Ultimate Oscillator can be found here: www.tradingview.com
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable lookback values.
You can adjust the default lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock UO by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.






















