"Divergence"に関するスクリプトを検索
[RS]Leading Momentum Oscilator V0EXPERIMENTAL: Momentum oscilator based on offset, can also be used for divergence/convergence
ridenz rsi"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.
If the stock is rising and making new highs, ideally the RSI is reaching new highs as well. If the stock is making new highs, but the RSI starts making lower highs, this warns the price uptrend may be weakening. This is negative divergence.
Positive divergence is the opposite situation. Imagine the price of a stock is making new lows while the RSI makes higher lows with each swing in the stock price. Investors may conclude that the lower lows in the stock price are losing their downward momentum and a trend reversal may soon follow.
Divergence is one of the common uses of many technical indicators, primarily the oscillators."
Spirit Time SMT 1M DIVDivergences from 90Min-1Min
apparently i have to explain more of what this does.
pretty self explanatory
Hope this enough text
Divergence TridentA Combination of MACD + VFI + WaveTrend
Tradingview hates me and is making me explain this in greater detail so maybe this is enough????
Divergence from Moving AverageSimple script to monitor the difference between closing price and sma(20), sma(20) and sma(60), sma(60) and sma(120). The zero axis provides times when the moving average converge.
Divergence Volume of BiznesFilosofThis indicator warns in advance about impending trouble. And also prepares in advance for a new rally. It also shows the ratio of volumes in dollars to the actual volume of the instrument. We can see when whales accumulate positions and carry extra passengers into the market.
More details about this indicator on my channel in YouTube.
===
Этот индикатор предупреждает заранее о надвигающейся беде. А также готовит заранее к новому ралли. Также он показывает соотношение объемов в долларах к фактическому объёму инструмента. Мы можем видеть когда киты накапливают позиции и выносят лишних пассажиров в срынка.
Более подробно про этот индикатор на моём канале в Ютуб.
Hidden Impulse═══════════════════════════════════════════════════════════════════
HIDDEN IMPULSE - Multi-Timeframe Momentum Detection System
═══════════════════════════════════════════════════════════════════
OVERVIEW
Hidden Impulse is an advanced momentum oscillator that combines the Schaff Trend Cycle (STC) and Force Index into a comprehensive multi-timeframe trading system. Unlike standard implementations of these indicators, this script introduces three distinct trading setups with specific entry conditions, multi-timeframe confirmation, and trend filtering.
═══════════════════════════════════════════════════════════════════
ORIGINALITY & KEY FEATURES
This indicator is original in the following ways:
1. DUAL-TIMEFRAME STC ANALYSIS
Standard STC implementations work on a single timeframe. This script
simultaneously analyzes STC on both your trading timeframe and a higher
timeframe, providing trend context and filtering out low-probability signals.
2. FORCE INDEX INTEGRATION
The script combines STC with Force Index (volume-weighted price momentum)
to confirm the strength behind price moves. This combination helps identify
when momentum shifts are backed by genuine buying/selling pressure.
3. THREE DISTINCT TRADING SETUPS
Rather than generic overbought/oversold signals, the indicator provides
three specific, rule-based setups:
- Setup A: Classic trend-following entries with multi-timeframe confirmation
- Setup B: Divergence-based reversal entries (highest probability)
- Setup C: Mean-reversion bounce trades at extreme levels
4. INTELLIGENT FILTERING
All signals are filtered through:
- 50 EMA trend direction (prevents counter-trend trades)
- Higher timeframe STC alignment (ensures macro trend agreement)
- Force Index confirmation (validates volume support)
═══════════════════════════════════════════════════════════════════
HOW IT WORKS - TECHNICAL EXPLANATION
SCHAFF TREND CYCLE (STC) CALCULATION:
The STC is a cyclical oscillator that combines MACD concepts with stochastic
smoothing to create earlier and smoother trend signals.
Step 1: Calculate MACD
- Fast MA = EMA(close, Length1) — default 23
- Slow MA = EMA(close, Length2) — default 50
- MACD Line = Fast MA - Slow MA
Step 2: First Stochastic Smoothing
- Apply stochastic calculation to MACD
- Stoch1 = 100 × (MACD - Lowest(MACD, Smoothing)) / (Highest(MACD, Smoothing) - Lowest(MACD, Smoothing))
- Smooth result with EMA(Stoch1, Smoothing) — default 10
Step 3: Second Stochastic Smoothing
- Apply stochastic calculation again to the smoothed stochastic
- This creates the final STC value between 0-100
The dual stochastic smoothing makes STC more responsive than MACD while
being smoother than traditional stochastics.
FORCE INDEX CALCULATION:
Force Index measures the power behind price movements by incorporating volume:
Force Raw = (Close - Close ) × Volume
Force Index = EMA(Force Raw, Period) — default 13
Interpretation:
- Positive Force Index = Buying pressure (bulls in control)
- Negative Force Index = Selling pressure (bears in control)
- Force Index crossing zero = Momentum shift
- Divergences with price = Weakening momentum (reversal signal)
TREND FILTER:
A 50-period EMA serves as the trend filter:
- Price above EMA50 = Uptrend → Only LONG signals allowed
- Price below EMA50 = Downtrend → Only SHORT signals allowed
This prevents counter-trend trading which accounts for most losing trades.
═══════════════════════════════════════════════════════════════════
THE THREE TRADING SETUPS - DETAILED
SETUP A: CLASSIC MOMENTUM ENTRY
Concept: Enter when STC exits oversold/overbought zones with trend confirmation
LONG CONDITIONS:
1. Higher timeframe STC > 25 (macro trend is up)
2. Primary timeframe STC crosses above 25 (momentum turning up)
3. Force Index crosses above 0 OR already positive (volume confirms)
4. Price above 50 EMA (local trend is up)
SHORT CONDITIONS:
1. Higher timeframe STC < 75 (macro trend is down)
2. Primary timeframe STC crosses below 75 (momentum turning down)
3. Force Index crosses below 0 OR already negative (volume confirms)
4. Price below 50 EMA (local trend is down)
Best for: Trending markets, continuation trades
Win rate: Moderate (60-65%)
Risk/Reward: 1:2 to 1:3
───────────────────────────────────────────────────────────────────
SETUP B: DIVERGENCE REVERSAL (HIGHEST PROBABILITY)
Concept: Identify exhaustion points where price makes new extremes but
momentum (Force Index) fails to confirm
BULLISH DIVERGENCE:
1. Price makes a lower low (LL) over 10 bars
2. Force Index makes a higher low (HL) — refuses to follow price down
3. STC is below 25 (oversold condition)
Trigger: STC starts rising AND Force Index crosses above zero
BEARISH DIVERGENCE:
1. Price makes a higher high (HH) over 10 bars
2. Force Index makes a lower high (LH) — refuses to follow price up
3. STC is above 75 (overbought condition)
Trigger: STC starts falling AND Force Index crosses below zero
Why this works: Divergences signal that the current trend is losing steam.
When volume (Force Index) doesn't confirm new price extremes, a reversal
is likely.
Best for: Reversal trading, range-bound markets
Win rate: High (70-75%)
Risk/Reward: 1:3 to 1:5
───────────────────────────────────────────────────────────────────
SETUP C: QUICK BOUNCE AT EXTREMES
Concept: Catch rapid mean-reversion moves when price touches EMA50 in
extreme STC zones
LONG CONDITIONS:
1. Price touches 50 EMA from above (pullback in uptrend)
2. STC < 15 (extreme oversold)
3. Force Index > 0 (buyers stepping in)
SHORT CONDITIONS:
1. Price touches 50 EMA from below (pullback in downtrend)
2. STC > 85 (extreme overbought)
3. Force Index < 0 (sellers stepping in)
Best for: Scalping, quick mean-reversion trades
Win rate: Moderate (55-60%)
Risk/Reward: 1:1 to 1:2
Note: Use tighter stops and quick profit-taking
═══════════════════════════════════════════════════════════════════
HOW TO USE THE INDICATOR
STEP 1: CONFIGURE TIMEFRAMES
Primary Timeframe (STC - Primary Timeframe):
- Leave empty to use your current chart timeframe
- This is where you'll take trades
Higher Timeframe (STC - Higher Timeframe):
- Default: 30 minutes
- Recommended ratios:
* 5min chart → 30min higher TF
* 15min chart → 1H higher TF
* 1H chart → 4H higher TF
* Daily chart → Weekly higher TF
───────────────────────────────────────────────────────────────────
STEP 2: ADJUST STC PARAMETERS FOR YOUR MARKET
Default (23/50/10) works well for stocks and forex, but adjust for:
CRYPTO (volatile):
- Length 1: 15
- Length 2: 35
- Smoothing: 8
(Faster response for rapid price movements)
STOCKS (standard):
- Length 1: 23
- Length 2: 50
- Smoothing: 10
(Balanced settings)
FOREX MAJORS (slower):
- Length 1: 30
- Length 2: 60
- Smoothing: 12
(Filters out noise in 24/7 markets)
───────────────────────────────────────────────────────────────────
STEP 3: ENABLE YOUR PREFERRED SETUPS
Toggle setups based on your trading style:
Conservative Trader:
✓ Setup B (Divergence) — highest win rate
✗ Setup A (Classic) — only in strong trends
✗ Setup C (Bounce) — too aggressive
Trend Trader:
✓ Setup A (Classic) — primary signals
✓ Setup B (Divergence) — for entries on pullbacks
✗ Setup C (Bounce) — not suitable for trending
Scalper:
✓ Setup C (Bounce) — quick in-and-out
✓ Setup B (Divergence) — high probability scalps
✗ Setup A (Classic) — too slow
───────────────────────────────────────────────────────────────────
STEP 4: READ THE SIGNALS
ON THE CHART:
Labels appear when conditions are met:
Green labels:
- "LONG A" — Setup A long entry
- "LONG B DIV" — Setup B divergence long (best signal)
- "LONG C" — Setup C bounce long
Red labels:
- "SHORT A" — Setup A short entry
- "SHORT B DIV" — Setup B divergence short (best signal)
- "SHORT C" — Setup C bounce short
IN THE INDICATOR PANEL (bottom):
- Blue line = Primary timeframe STC
- Orange dots = Higher timeframe STC (optional)
- Green/Red bars = Force Index histogram
- Dashed lines at 25/75 = Entry/Exit zones
- Background shading = Oversold (green) / Overbought (red)
INFO TABLE (top-right corner):
Shows real-time status:
- STC values for both timeframes
- Force Index direction
- Price position vs EMA
- Current trend direction
- Active signal type
═══════════════════════════════════════════════════════════════════
TRADING STRATEGY & RISK MANAGEMENT
ENTRY RULES:
Priority ranking (best to worst):
1st: Setup B (Divergence) — wait for these
2nd: Setup A (Classic) — in confirmed trends only
3rd: Setup C (Bounce) — scalping only
Confirmation checklist before entry:
☑ Signal label appears on chart
☑ TREND in info table matches signal direction
☑ Higher timeframe STC aligned (check orange dots or table)
☑ Force Index confirming (check histogram color)
───────────────────────────────────────────────────────────────────
STOP LOSS PLACEMENT:
Setup A (Classic):
- LONG: Below recent swing low
- SHORT: Above recent swing high
- Typical: 1-2 ATR distance
Setup B (Divergence):
- LONG: Below the divergence low
- SHORT: Above the divergence high
- Typical: 0.5-1.5 ATR distance
Setup C (Bounce):
- LONG: 5-10 pips below EMA50
- SHORT: 5-10 pips above EMA50
- Typical: 0.3-0.8 ATR distance
───────────────────────────────────────────────────────────────────
TAKE PROFIT TARGETS:
Conservative approach:
- Exit when STC reaches opposite level
- LONG: Exit when STC > 75
- SHORT: Exit when STC < 25
Aggressive approach:
- Hold until opposite signal appears
- Trail stop as STC moves in your favor
Partial profits:
- Take 50% at 1:2 risk/reward
- Let remaining 50% run to target
───────────────────────────────────────────────────────────────────
WHAT TO AVOID:
❌ Trading Setup A in sideways/choppy markets
→ Wait for clear trend or use Setup B only
❌ Ignoring higher timeframe STC
→ Always check orange dots align with your direction
❌ Taking signals against the major trend
→ If weekly trend is down, be cautious with longs
❌ Overtrading Setup C
→ Maximum 2-3 bounce trades per session
❌ Trading during low volume periods
→ Force Index becomes unreliable
═══════════════════════════════════════════════════════════════════
ALERTS CONFIGURATION
The indicator includes 8 alert types:
Individual setup alerts:
- "Setup A - LONG" / "Setup A - SHORT"
- "Setup B - DIV LONG" / "Setup B - DIV SHORT" ⭐ recommended
- "Setup C - BOUNCE LONG" / "Setup C - BOUNCE SHORT"
Combined alerts:
- "ANY LONG" — fires on any long signal
- "ANY SHORT" — fires on any short signal
Recommended alert setup:
- Create "Setup B - DIV LONG" and "Setup B - DIV SHORT" alerts
- These are the highest probability signals
- Set "Once Per Bar Close" to avoid false alerts
═══════════════════════════════════════════════════════════════════
VISUALIZATION SETTINGS
Show Labels on Chart:
Toggle on/off the signal labels (green/red)
Disable for cleaner chart once you're familiar with the indicator
Show Higher TF STC:
Toggle the orange dots showing higher timeframe STC
Useful for visual confirmation of multi-timeframe alignment
Info Panel:
Cannot be disabled — always shows current status
Positioned top-right to avoid chart interference
═══════════════════════════════════════════════════════════════════
EXAMPLE TRADE WALKTHROUGH
SETUP B DIVERGENCE LONG EXAMPLE:
1. Market Context:
- Price in downtrend, below 50 EMA
- Multiple lower lows forming
- STC below 25 (oversold)
2. Divergence Formation:
- Price makes new low at $45.20
- Force Index refuses to make new low (higher low forms)
- This indicates selling pressure weakening
3. Signal Trigger:
- STC starts turning up
- Force Index crosses above zero
- Label appears: "LONG B DIV"
4. Trade Execution:
- Entry: $45.50 (current price at signal)
- Stop Loss: $44.80 (below divergence low)
- Target 1: $47.90 (STC reaches 75) — risk/reward 1:3.4
- Target 2: Opposite signal or trail stop
5. Trade Management:
- Price rallies to $47.20
- STC reaches 68 (approaching target zone)
- Take 50% profit, move stop to breakeven
- Exit remaining at $48.10 when STC crosses 75
Result: 3.7R gain
═══════════════════════════════════════════════════════════════════
ADVANCED TIPS
1. MULTI-TIMEFRAME CONFLUENCE
For highest probability trades, wait for:
- Primary TF signal
- Higher TF STC aligned (>25 for longs, <75 for shorts)
- Even higher TF trend in same direction (manual check)
2. VOLUME CONFIRMATION
Watch the Force Index histogram:
- Increasing bar size = Strengthening momentum
- Decreasing bar size = Weakening momentum
- Use this to gauge signal strength
3. AVOID THESE MARKET CONDITIONS
- Major news events (Force Index becomes erratic)
- Market open first 30 minutes (volatility spikes)
- Low liquidity instruments (Force Index unreliable)
- Extreme trending days (wait for pullbacks)
4. COMBINE WITH SUPPORT/RESISTANCE
Best signals occur near:
- Key horizontal levels
- Fibonacci retracements
- Previous day's high/low
- Psychological round numbers
5. SESSION AWARENESS
- Asia session: Use lower timeframes, Setup C works well
- London session: Setup A and B both effective
- New York session: All setups work, highest volume
═══════════════════════════════════════════════════════════════════
INDICATOR WINDOWS LAYOUT
MAIN CHART:
- Price action
- 50 EMA (green/red)
- Signal labels
- Info panel
INDICATOR WINDOW:
- STC oscillator (blue line, 0-100 scale)
- Higher TF STC (orange dots, optional)
- Force Index histogram (green/red bars)
- Reference levels (25, 50, 75)
- Background zones (green oversold, red overbought)
═══════════════════════════════════════════════════════════════════
PERFORMANCE OPTIMIZATION
For best results:
Backtesting:
- Test on your specific instrument and timeframe
- Adjust STC parameters if win rate < 55%
- Record which setup works best for your market
Position Sizing:
- Risk 1-2% per trade
- Setup B can use 2% risk (higher win rate)
- Setup C should use 1% risk (lower win rate)
Trade Frequency:
- Setup B: 2-5 signals per week (be patient)
- Setup A: 5-10 signals per week
- Setup C: 10+ signals per week (scalping)
═══════════════════════════════════════════════════════════════════
CREDITS & REFERENCES
This indicator builds upon established technical analysis concepts:
Schaff Trend Cycle:
- Developed by Doug Schaff (1996)
- Original concept published in Technical Analysis of Stocks & Commodities
- Implementation based on standard STC formula
Force Index:
- Developed by Dr. Alexander Elder
- Described in "Trading for a Living" (1993)
- Classic volume-momentum indicator
The multi-timeframe integration, three-setup system, and specific
entry conditions are original contributions of this indicator.
═══════════════════════════════════════════════════════════════════
DISCLAIMER
This indicator is a technical analysis tool and does not guarantee profits.
Past performance is not indicative of future results. Always:
- Use proper risk management
- Test on demo account first
- Combine with fundamental analysis
- Never risk more than you can afford to lose
═══════════════════════════════════════════════════════════════════
SUPPORT & QUESTIONS
If you find this indicator helpful, please:
- Leave a like and comment
- Share your feedback and results
- Report any bugs or issues
For questions about usage or optimization for specific markets,
feel free to comment below.
═════════════════════════════════════════════════════════════
On-Balance Volume (OBV) — Background TrendWhat OBV Means
OBV stands for On-Balance Volume.
It’s a volume-based indicator that helps you see whether money is flowing into or out of a stock or index.
Think of OBV as a “running total” of buying and selling pressure.
⚙️ How It Works
OBV starts at zero and then adds or subtracts each day’s trading volume based on the day’s closing price:
If today’s close is higher than yesterday’s → OBV goes up by that day’s volume.
If today’s close is lower → OBV goes down by that day’s volume.
If the price is unchanged → OBV doesn’t move.
Over time, this creates a line that moves up and down with volume pressure.
📈 What OBV Tells You
Rising OBV → Buying Pressure
More volume is happening on up days.
It means traders are accumulating shares.
Often a bullish signal.
Falling OBV → Selling Pressure
More volume is happening on down days.
It means traders are distributing (selling) shares.
Often a bearish signal.
Flat OBV → No clear direction
Volume is balanced.
The market is waiting for a breakout.
🧠 How Traders Use It
Trend Confirmation:
When price goes up and OBV goes up too → the move is healthy and supported by volume.
If price goes up but OBV stays flat or falls → the move might be weak or false.
Divergences:
If price makes a new high but OBV doesn’t → it’s a warning that the trend may reverse soon.
Signal Line Crossovers (like your chart):
You can smooth OBV with an EMA (moving average).
When OBV crosses above its EMA → possible buy signal.
When OBV crosses below → possible sell signal.
🟢 In Simple Terms
OBV tells you “is the smart money buying or selling?”
Green / rising = buyers in control.
Red / falling = sellers in control.
It’s a quick way to confirm if price trends are backed by real trading activity — not just short-term noise.
WaveTrend With Divs & RSI(STOCH) Divs by WeloTradesWaveTrend with Divergences & RSI(STOCH) Divergences by WeloTrades
Overview
The "WaveTrend With Divergences & RSI(STOCH) Divergences" is an advanced Pine Script™ indicator designed for TradingView, offering a multi-dimensional analysis of market conditions. This script integrates several technical indicators—WaveTrend, Money Flow Index (MFI), RSI, and Stochastic RSI—into a cohesive tool that identifies both regular and hidden divergences across these indicators. These divergences can indicate potential market reversals and provide critical trading opportunities.
This indicator is not just a simple combination of popular tools; it offers extensive customization options, organized data presentation, and valuable trading signals that are easy to interpret. Whether you're a day trader or a long-term investor, this script enhances your ability to make informed decisions.
Originality and Usefulness
The originality of this script lies in its integration and the synergy it creates among the indicators used. Rather than merely combining multiple indicators, this script allows them to work together, enhancing each other's strengths. For example, by identifying divergences across WaveTrend, RSI, and Stochastic RSI simultaneously, the script provides multiple layers of confirmation, which reduces the likelihood of false signals and increases the reliability of trading signals.
The usefulness of this script is apparent in its ability to offer a consolidated view of market dynamics. It not only simplifies the analytical process by combining different indicators but also provides deeper insights through its divergence detection features. This comprehensive approach is designed to help traders identify potential market reversals, confirm trends, and ultimately make more informed trading decisions.
How the Components Work Together
1. Cross-Validation of Signals
WaveTrend: This indicator is primarily used to identify overbought and oversold conditions, as well as potential buy and sell signals. WaveTrend's ability to smooth price data and reduce noise makes it a reliable tool for identifying trend reversals.
RSI & Stochastic RSI: These momentum oscillators are used to measure the speed and change of price movements. While RSI identifies general overbought and oversold conditions, Stochastic RSI offers a more granular view by tracking the RSI’s level relative to its high-low range over a period of time. When these indicators align with WaveTrend signals, it adds a layer of confirmation that enhances the reliability of the signals.
Money Flow Index (MFI): This volume-weighted indicator assesses the inflow and outflow of money in an asset, giving insights into buying and selling pressure. By analyzing the MFI alongside WaveTrend and RSI indicators, the script can cross-validate signals, ensuring that buy or sell signals are supported by actual market volume.
Example Bullish scenario:
When a bullish divergence is detected on the RSI and confirmed by a corresponding bullish signal on the WaveTrend, along with an increasing Money Flow Index, the probability of a successful trade setup increases. This cross-validation minimizes the risk of acting on false signals, which might occur when relying on a single indicator.
Example Bearish scenario:
When a bearish divergence is detected on the RSI and confirmed by a corresponding bearish signal on the WaveTrend, along with an decreasing Money Flow Index, the probability of a successful trade setup increases. This cross-validation minimizes the risk of acting on false signals, which might occur when relying on a single indicator.
2. Divergence Detection and Market Reversals
Regular Divergences: Occur when the price action and an indicator (like RSI or WaveTrend) move in opposite directions. Regular bullish divergence signals a potential upward reversal when the price makes a lower low while the indicator makes a higher low. Conversely, regular bearish divergence suggests a downward reversal when the price makes a higher high, but the indicator makes a lower high.
Hidden Divergences: These occur when the price action and indicator move in the same direction, but with different momentum. Hidden bullish divergence suggests the continuation of an uptrend, while hidden bearish divergence suggests the continuation of a downtrend. By detecting these divergences across multiple indicators, the script identifies potential trend reversals or continuations with greater accuracy.
Example: The script might detect a regular bullish divergence on the WaveTrend while simultaneously identifying a hidden bullish divergence on the RSI. This combination suggests that while a trend reversal is possible, the overall market sentiment remains bullish, providing a nuanced view of the market.
A Regular Bullish Divergence Example:
A Hidden Bullish Divergence Example:
A Regular Bearish Divergence Example:
A Hidden Bearish Divergence Example:
3. Trend Strength and Sentiment Analysis
WaveTrend: Measures the strength and direction of the trend. By identifying the extremes of market sentiment (overbought and oversold levels), WaveTrend provides early signals for potential reversals.
Money Flow Index (MFI): Assesses the underlying sentiment by analyzing the flow of money. A rising MFI during an uptrend confirms strong buying pressure, while a falling MFI during a downtrend confirms selling pressure. This helps traders assess whether a trend is likely to continue or reverse.
RSI & Stochastic RSI: Offer a momentum-based perspective on the trend’s strength. High RSI or Stochastic RSI values indicate that the asset may be overbought, suggesting a potential reversal. Conversely, low values indicate oversold conditions, signaling a possible upward reversal.
Example:
During a strong uptrend, the WaveTrend & RSI's might signal overbought conditions, suggesting caution. If the MFI also shows decreasing buying pressure and the RSI reaches extreme levels, these indicators together suggest that the trend might be weakening, and a reversal could be imminent.
Example:
During a strong downtrend, the WaveTrend & RSI's might signal oversold conditions, suggesting caution. If the MFI also shows increasing buying pressure and the RSI reaches extreme levels, these indicators together suggest that the trend might be weakening, and a reversal could be imminent.
Conclusion
The "WaveTrend With Divergences & RSI(STOCH) Divergences" script offers a powerful, integrated approach to technical analysis by combining trend, momentum, and sentiment indicators into a single tool. Its unique value lies in the cross-validation of signals, the ability to detect divergences, and the comprehensive view it provides of market conditions. By offering traders multiple layers of analysis and customization options, this script is designed to enhance trading decisions, reduce false signals, and provide clearer insights into market dynamics.
WAVETREND
Display of WaveTrend:
Display of WaveTrend Setting:
WaveTrend Indicator Explanation
The WaveTrend indicator helps identify overbought and oversold conditions, as well as potential buy and sell signals. Its flexibility allows traders to adapt it to various strategies, making it a versatile tool in technical analysis.
WaveTrend Input Settings:
WT MA Source: Default: HLC3
What it is: The data source used for calculating the WaveTrend Moving Average.
What it does: Determines the input data to smooth price action and filter noise.
Example: Using HLC3 (average of High, Low, Close) provides a smoother data representation compared to using just the closing price.
Length (WT MA Length): Default: 3
What it is: The period used to calculate the Moving Average.
What it does: Adjusts the sensitivity of the WaveTrend indicator, where shorter lengths respond more quickly to price changes.
Example: A length of 3 is ideal for short-term analysis, providing quick reactions to price movements.
WT Channel Length & Average: Default: WT Channel Length = 9, Average = 12
What it is: Lengths used to calculate the WaveTrend channel and its average.
What it does: Smooths out the WaveTrend further, reducing false signals by averaging over a set period.
Example: Higher values reduce noise and help in identifying more reliable trends.
Channel: Style, Width, and Color:
What it is: Customization options for the WaveTrend channel's appearance.
What it does: Adjusts how the channel is displayed, including line style, width, and color.
Example: Choosing an area style with a distinct color can make the WaveTrend indicator clearly visible on the chart.
WT Buy & Sell Signals:
What it is: Settings to enable and customize buy and sell signals based on WaveTrend.
What it does: Allows for the display of buy/sell signals and customization of their shapes and colors.
When it gives a Buy Signal: Generated when the WaveTrend line crosses below an oversold level and then rises back, indicating a potential upward price movement.
When it gives a Sell Signal: Triggered when the WaveTrend line crosses above an overbought level and then declines, suggesting a possible downward trend.
Example: The script identifies these signals based on mean reversion principles, where prices tend to revert to the mean after reaching extremes. Traders can use these signals to time their entries and exits effectively.
WAVETREND OVERBOUGTH AND OVERSOLD LEVELS
Display of WaveTrend with Overbought & Oversold Levels:
Display of WaveTrend Overbought & Oversold Levels Settings:
WaveTrend Overbought & Oversold Levels Explanation
WT OB & OS Levels: Default: OB Level 1 = 53, OB Level 2 = 60, OS Level 1 = -53, OS Level 2 = -60
What it is: The default overbought and oversold levels used by the WaveTrend indicator to signal potential market reversals.
What it does: When the WaveTrend crosses above the OB levels, it indicates an overbought condition, potentially signaling a reversal or selling opportunity. Conversely, when it crosses below the OS levels, it indicates an oversold condition, potentially signaling a reversal or buying opportunity.
Example: A trader might use these levels to time entry or exit points, such as selling when the WaveTrend crosses into the overbought zone or buying when it crosses into the oversold zone.
Show OB/OS Levels: Default: True
What it is: Toggle options to show or hide the overbought and oversold levels on your chart.
What it does: When enabled, these levels will be visually represented on your chart, helping you to easily identify when the market reaches these critical thresholds.
Example: Displaying these levels can help you quickly see when the WaveTrend is approaching or has crossed into overbought or oversold territory, allowing for more informed trading decisions.
Line Style, Width, and Color for OB/OS Levels:
What it is: Options to customize the appearance of the OB and OS levels on your chart, including line style (solid, dotted, dashed), line width, and color.
What it does: These settings allow you to adjust how prominently these levels are displayed on your chart, which can help you better visualize and respond to overbought or oversold conditions.
Example: Setting a thicker, dashed line in a contrasting color can make these levels stand out more clearly, aiding in quick visual identification.
Example of Use:
Scenario: A trader wants to identify potential selling points when the market is overbought. They set the OB levels at 53 and 60, choosing a solid, red line style to make these levels clear on their chart. As the WaveTrend crosses above 53, they monitor for further price action, and upon crossing 60, they consider initiating a sell order.
WAVETREND DIVERGENCES
Display of WaveTrend Divergence:
Display of WaveTrend Divergence Setting:
WaveTrend Divergence Indicator Explanation
The WaveTrend Divergence feature helps identify potential reversal points in the market by highlighting divergences between the price and the WaveTrend indicator. Divergences can signal a shift in market momentum, indicating a possible trend reversal. This component allows traders to visualize and customize divergence detection on their charts.
WaveTrend Divergence Input Settings:
Potential Reversal Range: Default: 28
What it is: The number of bars to look back when detecting potential tops and bottoms.
What it does: Sets the range for identifying possible reversal points based on historical data.
Example: A setting of 28 looks back across the last 28 bars to find reversal points, offering a balance between responsiveness and reliability.
Reversal Minimum LVL OB & OS: Default: OB = 35, OS = -35
What it is: The minimum overbought and oversold levels required for detecting potential reversals.
What it does: Adjusts the thresholds that trigger a reversal signal based on the WaveTrend indicator.
Example: A higher OB level reduces the sensitivity to overbought conditions, potentially filtering out false reversal signals.
Lookback Bar Left & Right: Default: Left = 10, Right = 1
What it is: The number of bars to the left and right used to confirm a top or bottom.
What it does: Helps determine the position of peaks and troughs in the price action.
Example: A larger left lookback captures more extended price action before the peak, while a smaller right lookback focuses on the immediate past.
Lookback Range Min & Max: Default: Min = 5, Max = 60
What it is: The minimum and maximum range for the lookback period when identifying divergences.
What it does: Fine-tunes the detection of divergences by controlling the range over which the indicator looks back.
Example: A wider range increases the chances of detecting divergences across different market conditions.
R.Div Minimum LVL OB & OS: Default: OB = 53, OS = -53
What it is: The threshold levels for detecting regular divergences.
What it does: Adjusts the sensitivity of the regular divergence detection.
Example: Higher thresholds make the detection more conservative, identifying only stronger divergence signals.
H.Div Minimum LVL OB & OS: Default: OB = 20, OS = -20
What it is: The threshold levels for detecting hidden divergences.
What it does: Similar to regular divergence settings but for hidden divergences, which can indicate potential reversals that are less obvious.
Example: Lower thresholds make the hidden divergence detection more sensitive, capturing subtler market shifts.
Divergence Label Options:
What it is: Options to display and customize labels for regular and hidden divergences.
What it does: Allows users to visually differentiate between regular and hidden divergences using customizable labels and colors.
Example: Using different colors and symbols for regular (R) and hidden (H) divergences makes it easier to interpret signals on the chart.
Text Size and Color:
What it is: Customization options for the size and color of divergence labels.
What it does: Adjusts the readability and visibility of divergence labels on the chart.
Example: Larger text size may be preferred for charts with a lot of data, ensuring divergence labels stand out clearly.
FAST & SLOW MONEY FLOW INDEX
Display of Fast & Slow Money Flow:
Display of Fast & Slow Money Flow Setting:
Fast Money Flow Indicator Explanation
The Fast Money Flow indicator helps traders identify the flow of money into and out of an asset over a shorter time frame. By tracking the volume-weighted average of price movements, it provides insights into buying and selling pressure in the market, which can be crucial for making timely trading decisions.
Fast Money Flow Input Settings:
Fast Money Flow: Length: Default: 9
What it is: The period used for calculating the Fast Money Flow.
What it does: Determines the sensitivity of the Money Flow calculation. A shorter length makes the indicator more responsive to recent price changes, while a longer length provides a smoother signal.
Example: A length of 9 is suitable for traders looking to capture quick shifts in market sentiment over a short period.
Fast MFI Area Multiplier: Default: 5
What it is: A multiplier applied to the Money Flow area calculation.
What it does: Adjusts the size of the Money Flow area on the chart, effectively amplifying or reducing the visual impact of the indicator.
Example: A higher multiplier can make the Money Flow more prominent on the chart, aiding in the quick identification of significant money flow changes.
Y Position (Y Pos): Default: 0
What it is: The vertical position adjustment for the Fast Money Flow plot on the chart.
What it does: Allows you to move the Money Flow plot up or down on the chart to avoid overlap with other indicators.
Example: Adjusting the Y Position can be useful if you have multiple indicators on the chart and need to maintain clarity.
Fast MFI Style, Width, and Color:
What it is: Customization options for how the Fast Money Flow is displayed on the chart.
What it does: Enables you to choose between different plot styles (line or area), set the line width, and select colors for positive and negative money flow.
Example: Using different colors for positive (green) and negative (red) money flow helps to visually distinguish between periods of buying and selling pressure.
Slow Money Flow Indicator Explanation
The Slow Money Flow indicator tracks the flow of money into and out of an asset over a longer time frame. It provides a broader perspective on market sentiment, smoothing out short-term fluctuations and highlighting longer-term trends.
Slow Money Flow Input Settings:
Slow Money Flow: Length: Default: 12
What it is: The period used for calculating the Slow Money Flow.
What it does: A longer period smooths out short-term fluctuations, providing a clearer view of the overall money flow trend.
Example: A length of 12 is often used by traders looking to identify sustained trends rather than short-term volatility.
Slow MFI Area Multiplier: Default: 5
What it is: A multiplier applied to the Slow Money Flow area calculation.
What it does: Adjusts the size of the Money Flow area on the chart, helping to emphasize the indicator’s significance.
Example: Increasing the multiplier can help highlight the Money Flow in markets with less volatile price action.
Y Position (Y Pos): Default: 0
What it is: The vertical position adjustment for the Slow Money Flow plot on the chart.
What it does: Allows for vertical repositioning of the Money Flow plot to maintain chart clarity when used with other indicators.
Example: Adjusting the Y Position ensures that the Slow Money Flow indicator does not overlap with other key indicators on the chart.
Slow MFI Style, Width, and Color:
What it is: Customization options for the visual display of the Slow Money Flow on the chart.
What it does: Allows you to choose the plot style (line or area), set the line width, and select colors to differentiate positive and negative money flow.
Example: Customizing the colors for the Slow Money Flow allows traders to quickly distinguish between buying and selling trends in the market.
RSI
Display of RSI:
Display of RSI Setting:
RSI Indicator Explanation
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It is typically used to identify overbought or oversold conditions in the market, providing traders with potential signals for buying or selling.
RSI Input Settings:
RSI Source: Default: Close
What it is: The data source used for calculating the RSI.
What it does: Determines which price data (e.g., close, open) is used in the RSI calculation, affecting how the indicator reflects market conditions.
Example: Using the closing price is standard practice, as it reflects the final agreed-upon price for a given time period.
MA Type (Moving Average Type): Default: SMA
What it is: The type of moving average applied to the RSI for smoothing purposes.
What it does: Changes the smoothing technique of the RSI, impacting how quickly the indicator responds to price movements.
Example: Using an Exponential Moving Average (EMA) will make the RSI more sensitive to recent price changes compared to a Simple Moving Average (SMA).
RSI Length: Default: 14
What it is: The period over which the RSI is calculated.
What it does: Adjusts the sensitivity of the RSI. A shorter length (e.g., 7) makes the RSI more responsive to recent price changes, while a longer length (e.g., 21) smooths out the indicator, reducing the number of signals.
Example: A 14-period RSI is commonly used for identifying overbought and oversold conditions, providing a balance between sensitivity and reliability.
RSI Plot Style, Width, and Color:
What it is: Options to customize the appearance of the RSI line on the chart.
What it does: Allows you to adjust the visual representation of the RSI, including the line width and color.
Example: Setting a thicker line width and a bright color like yellow can make the RSI more visible on the chart, aiding in quick analysis.
Display of RSI with RSI Moving Average:
RSI Moving Average Explanation
The RSI Moving Average adds a smoothing layer to the RSI, helping to filter out noise and provide clearer signals. It is particularly useful for confirming trend strength and identifying potential reversals.
RSI Moving Average Input Settings:
MA Length: Default: 14
What it is: The period over which the Moving Average is calculated on the RSI.
What it does: Adjusts the smoothing of the RSI, helping to reduce false signals and provide a clearer trend indication.
Example: A 14-period moving average on the RSI can smooth out short-term fluctuations, making it easier to spot genuine overbought or oversold conditions.
MA Plot Style, Width, and Color:
What it is: Customization options for how the RSI Moving Average is displayed on the chart.
What it does: Allows you to adjust the line width and color, helping to differentiate the Moving Average from the main RSI line.
Example: Using a contrasting color for the RSI Moving Average (e.g., magenta) can help it stand out against the main RSI line, making it easier to interpret the indicator.
STOCHASTIC RSI
Display of Stochastic RSI:
Display of Stochastic RSI Setting:
Stochastic RSI Indicator Explanation
The Stochastic RSI (Stoch RSI) is a momentum oscillator that measures the level of the RSI relative to its high-low range over a set period of time. It is used to identify overbought and oversold conditions, providing potential buy and sell signals based on momentum shifts.
Stochastic RSI Input Settings:
Stochastic RSI Length: Default: 14
What it is: The period over which the Stochastic RSI is calculated.
What it does: Adjusts the sensitivity of the Stochastic RSI. A shorter length makes the indicator more responsive to recent price changes, while a longer length smooths out the fluctuations, reducing noise.
Example: A length of 14 is commonly used to identify momentum shifts over a medium-term period, providing a balanced view of potential overbought or oversold conditions.
Display of Stochastic RSI %K Line:
Stochastic RSI %K Line Explanation
The %K line in the Stochastic RSI is the main line that tracks the momentum of the RSI over the chosen period. It is the faster-moving component of the Stochastic RSI, often used to identify entry and exit points.
Stochastic RSI %K Input Settings:
%K Length: Default: 3
What it is: The period used for smoothing the %K line of the Stochastic RSI.
What it does: Smoothing the %K line helps reduce noise and provides a clearer signal for potential market reversals.
Example: A smoothing length of 3 is common, offering a balance between responsiveness and noise reduction, making it easier to spot significant momentum shifts.
%K Plot Style, Width, and Color:
What it is: Customization options for the visual representation of the %K line.
What it does: Allows you to adjust the appearance of the %K line on the chart, including line width and color, to fit your visual preferences.
Example: Setting a blue color and a medium width for the %K line makes it stand out clearly on the chart, helping to identify key points of momentum change.
%K Fill Color (Above):
What it is: The fill color that appears above the %K line on the chart.
What it does: Adds visual clarity by shading the area above the %K line, making it easier to interpret the direction and strength of momentum.
Example: Using a light blue fill color above the %K line can help emphasize bullish momentum, making it visually prominent.
Display of Stochastic RSI %D Line:
Stochastic RSI %D Line Explanation
The %D line in the Stochastic RSI is a moving average of the %K line and acts as a signal line. It is slower-moving compared to the %K line and is often used to confirm signals or identify potential reversals when it crosses the %K line.
Stochastic RSI %D Input Settings:
%D Length: Default: 3
What it is: The period used for smoothing the %D line of the Stochastic RSI.
What it does: Smooths out the %D line, making it less sensitive to short-term fluctuations and more reliable for identifying significant market signals.
Example: A length of 3 is often used to provide a smoothed signal line that can help confirm trends or reversals indicated by the %K line.
%D Plot Style, Width, and Color:
What it is: Customization options for the visual representation of the %D line.
What it does: Allows you to adjust the appearance of the %D line on the chart, including line width and color, to match your preferences.
Example: Setting an orange color and a thicker line width for the %D line can help differentiate it from the %K line, making crossover points easier to spot.
%D Fill Color (Below):
What it is: The fill color that appears below the %D line on the chart.
What it does: Adds visual clarity by shading the area below the %D line, making it easier to interpret bearish momentum.
Example: Using a light orange fill color below the %D line can highlight bearish conditions, making it visually easier to identify.
RSI & STOCHASTIC RSI OVERBOUGHT AND OVERSOLD LEVELS
Display of RSI & Stochastic with Overbought & Oversold Levels:
Display of RSI & Stochastic Overbought & Oversold Settings:
RSI & Stochastic Overbought & Oversold Levels Explanation
The Overbought (OB) and Oversold (OS) levels for RSI and Stochastic RSI indicators are key thresholds that help traders identify potential reversal points in the market. These levels are used to determine when an asset is likely overbought or oversold, which can signal a potential trend reversal.
RSI & Stochastic Overbought & Oversold Input Settings:
RSI & Stochastic Level 1 Overbought (OB) & Oversold (OS): Default: OB Level = 170, OS Level = 130
What it is: The first set of thresholds for determining overbought and oversold conditions for both RSI and Stochastic RSI indicators.
What it does: When the RSI or Stochastic RSI crosses above the overbought level, it suggests that the asset might be overbought, potentially signaling a sell opportunity. Conversely, when these indicators drop below the oversold level, it suggests the asset might be oversold, potentially signaling a buy opportunity.
Example: If the RSI crosses above 170, traders might look for signs of a potential trend reversal to the downside, while a cross below 130 might indicate a reversal to the upside.
RSI & Stochastic Level 2 Overbought (OB) & Oversold (OS): Default: OB Level = 180, OS Level = 120
What it is: The second set of thresholds for determining overbought and oversold conditions for both RSI and Stochastic RSI indicators.
What it does: These levels provide an additional set of reference points, allowing traders to differentiate between varying degrees of overbought and oversold conditions, potentially leading to more refined trading decisions.
Example: When the RSI crosses above 180, it might indicate an extreme overbought condition, which could be a stronger signal for a sell, while a cross below 120 might indicate an extreme oversold condition, which could be a stronger signal for a buy.
RSI & Stochastic Overbought (OB) Band Customization:
OB Level 1: Width, Style, and Color:
What it is: Customization options for the visual appearance of the first overbought band on the chart.
What it does: Allows you to set the line width, style (solid, dotted, dashed), and color for the first overbought band, enhancing its visibility on the chart.
Example: A dashed red line with medium width can clearly indicate the first overbought level, helping traders quickly identify when this threshold is crossed.
OB Level 2: Width, Style, and Color:
What it is: Customization options for the visual appearance of the second overbought band on the chart.
What it does: Allows you to set the line width, style, and color for the second overbought band, providing a clear distinction from the first band.
Example: A dashed red line with a slightly thicker width can represent a more significant overbought level, making it easier to differentiate from the first level.
RSI & Stochastic Oversold (OS) Band Customization:
OS Level 1: Width, Style, and Color:
What it is: Customization options for the visual appearance of the first oversold band on the chart.
What it does: Allows you to set the line width, style (solid, dotted, dashed), and color for the first oversold band, making it visually prominent.
Example: A dashed green line with medium width can highlight the first oversold level, helping traders identify potential buying opportunities.
OS Level 2: Width, Style, and Color:
What it is: Customization options for the visual appearance of the second oversold band on the chart.
What it does: Allows you to set the line width, style, and color for the second oversold band, providing an additional visual cue for extreme oversold conditions.
Example: A dashed green line with a thicker width can represent a more significant oversold level, offering a stronger visual cue for potential buying opportunities.
RSI DIVERGENCES
Display of RSI Divergence Labels:
Display of RSI Divergence Settings:
RSI Divergence Lookback Explanation
The RSI Divergence settings allow traders to customize the parameters for detecting divergences between the RSI (Relative Strength Index) and price action. Divergences occur when the price moves in the opposite direction to the RSI, potentially signaling a trend reversal. These settings help refine the accuracy of divergence detection by adjusting the lookback period and range. ( NOTE: This setting only imply to the RSI. This doesn't effect the STOCHASTIC RSI. )
RSI Divergence Lookback Input Settings:
Lookback Left: Default: 10
What it is: The number of bars to look back from the current bar to detect a potential divergence.
What it does: Defines the left-side lookback period for identifying pivot points in the RSI, which are used to spot divergences. A longer lookback period may capture more significant trends but could also miss shorter-term divergences.
Example: A setting of 10 bars means the script will consider pivot points up to 10 bars before the current bar to check for divergence patterns.
Lookback Right: Default: 1
What it is: The number of bars to look forward from the current bar to complete the divergence pattern.
What it does: Defines the right-side lookback period for confirming a potential divergence. This setting helps ensure that the identified divergence is valid by allowing the script to check subsequent bars for confirmation.
Example: A setting of 1 bar means the script will look at the next bar to confirm the divergence pattern, ensuring that the signal is reliable.
Lookback Range Min: Default: 5
What it is: The minimum range of bars required to detect a valid divergence.
What it does: Sets a lower bound on the range of bars considered for divergence detection. A lower minimum range might capture more frequent but possibly less significant divergences.
Example: Setting the minimum range to 5 ensures that only divergences spanning at least 5 bars are considered, filtering out very short-term patterns.
Lookback Range Max: Default: 60
What it is: The maximum range of bars within which a divergence can be detected.
What it does: Sets an upper bound on the range of bars considered for divergence detection. A larger maximum range might capture more significant divergences but could also include less relevant long-term patterns.
Example: Setting the maximum range to 60 bars allows the script to detect divergences over a longer timeframe, capturing more extended divergence patterns that could indicate major trend reversals.
RSI Divergence Explanation
RSI divergences occur when the RSI indicator and price action move in opposite directions, signaling potential trend reversals. This section of the settings allows traders to customize the appearance and detection of both regular and hidden bullish and bearish divergences.
RSI Divergence Input Settings:
R. Bullish Div Label: Default: True
What it is: An option to display labels for regular bullish divergences.
What it does: Enables or disables the visibility of labels that mark regular bullish divergences, where the price makes a lower low while the RSI makes a higher low, indicating a potential upward reversal.
Example: A trader might use this to spot buying opportunities in a downtrend when a bullish divergence suggests the trend may be reversing.
Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bullish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Selecting a green label color and a distinct line width makes bullish divergences easily recognizable on your chart.
R. Bearish Div Label: Default: True
What it is: An option to display labels for regular bearish divergences.
What it does: Enables or disables the visibility of labels that mark regular bearish divergences, where the price makes a higher high while the RSI makes a lower high, indicating a potential downward reversal.
Example: A trader might use this to spot selling opportunities in an uptrend when a bearish divergence suggests the trend may be reversing.
Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bearish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Choosing a red label color and a specific line width makes bearish divergences clearly stand out on your chart.
H. Bullish Div Label: Default: False
What it is: An option to display labels for hidden bullish divergences.
What it does: Enables or disables the visibility of labels that mark hidden bullish divergences, where the price makes a higher low while the RSI makes a lower low, indicating potential continuation of an uptrend.
Example: A trader might use this to confirm an existing uptrend when a hidden bullish divergence signals continued buying strength.
Hidden Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bullish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A softer green color with a thinner line width might be chosen to subtly indicate hidden bullish divergences, keeping the chart clean while providing useful information.
H. Bearish Div Label: Default: False
What it is: An option to display labels for hidden bearish divergences.
What it does: Enables or disables the visibility of labels that mark hidden bearish divergences, where the price makes a lower high while the RSI makes a higher high, indicating potential continuation of a downtrend.
Example: A trader might use this to confirm an existing downtrend when a hidden bearish divergence signals continued selling pressure.
Hidden Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bearish divergence labels.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A muted red color with a thinner line width might be selected to indicate hidden bearish divergences without overwhelming the chart.
Divergence Text Size and Color: Default: S (Small)
What it is: Settings to adjust the size and color of text labels for RSI divergences.
What it does: Allows you to customize the size and color of text labels that display the divergence information on the chart.
Example: Choosing a small text size with a bright white color can make divergence labels easily readable without taking up too much space on the chart.
STOCHASTIC DIVERGENCES
Display of Stochastic RSI Divergence Labels:
Display of Stochastic RSI Divergence Settings:
Stochastic RSI Divergence Explanation
Stochastic RSI divergences occur when the Stochastic RSI indicator and price action move in opposite directions, signaling potential trend reversals. These settings allow traders to customize the detection and visual representation of both regular and hidden bullish and bearish divergences in the Stochastic RSI.
Stochastic RSI Divergence Input Settings:
R. Bullish Div Label: Default: True
What it is: An option to display labels for regular bullish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark regular bullish divergences, where the price makes a lower low while the Stochastic RSI makes a higher low, indicating a potential upward reversal.
Example: A trader might use this to spot buying opportunities in a downtrend when a bullish divergence in the Stochastic RSI suggests the trend may be reversing.
Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bullish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Selecting a blue label color and a distinct line width makes bullish divergences in the Stochastic RSI easily recognizable on your chart.
R. Bearish Div Label: Default: True
What it is: An option to display labels for regular bearish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark regular bearish divergences, where the price makes a higher high while the Stochastic RSI makes a lower high, indicating a potential downward reversal.
Example: A trader might use this to spot selling opportunities in an uptrend when a bearish divergence in the Stochastic RSI suggests the trend may be reversing.
Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of regular bearish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: Choosing an orange label color and a specific line width makes bearish divergences in the Stochastic RSI clearly stand out on your chart.
H. Bullish Div Label: Default: False
What it is: An option to display labels for hidden bullish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark hidden bullish divergences, where the price makes a higher low while the Stochastic RSI makes a lower low, indicating potential continuation of an uptrend.
Example: A trader might use this to confirm an existing uptrend when a hidden bullish divergence in the Stochastic RSI signals continued buying strength.
Hidden Bullish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bullish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A softer blue color with a thinner line width might be chosen to subtly indicate hidden bullish divergences, keeping the chart clean while providing useful information.
H. Bearish Div Label: Default: False
What it is: An option to display labels for hidden bearish divergences in the Stochastic RSI.
What it does: Enables or disables the visibility of labels that mark hidden bearish divergences, where the price makes a lower high while the Stochastic RSI makes a higher high, indicating potential continuation of a downtrend.
Example: A trader might use this to confirm an existing downtrend when a hidden bearish divergence in the Stochastic RSI signals continued selling pressure.
Hidden Bearish Label Color, Line Width, and Line Color:
What it is: Settings to customize the appearance of hidden bearish divergence labels in the Stochastic RSI.
What it does: Allows you to choose the color of the labels, adjust the width of the divergence lines, and select the color for these lines.
Example: A muted orange color with a thinner line width might be selected to indicate hidden bearish divergences without overwhelming the chart.
Divergence Text Size and Color: Default: S (Small)
What it is: Settings to adjust the size and color of text labels for Stochastic RSI divergences.
What it does: Allows you to customize the size and color of text labels that display the divergence information on the chart.
Example: Choosing a small text size with a bright white color can make divergence labels easily readable without taking up too much space on the chart.
Alert System:
Custom Alerts for Divergences and Reversals:
What it is: The script includes customizable alert conditions to notify you of detected divergences or potential reversals based on WaveTrend, RSI, and Stochastic RSI.
What it does: Helps you stay informed of key market movements without constantly monitoring the charts, enabling timely decisions.
Example: Setting an alert for regular bearish divergence on the WaveTrend could notify you of a potential sell opportunity as soon as it is detected.
How to Use Alerts:
Set up custom alerts in TradingView based on these conditions to be notified of potential trading opportunities. Alerts are triggered when the indicator detects conditions that match the selected criteria, such as divergences or potential reversals.
By following the detailed guidelines and examples above, you can effectively use and customize this powerful indicator to suit your trading strategy.
For further understanding and customization, refer to the input settings within the script and adjust them to match your trading style and preferences.
How Components Work Together
Synergy and Cross-Validation: The indicator combines multiple layers of analysis to validate trading signals. For example, a WaveTrend buy signal that coincides with a bullish divergence in RSI and positive fast money flow is likely to be more reliable than any single indicator’s signal. This cross-validation reduces the likelihood of false signals and enhances decision-making.
Comprehensive Market Analysis: Each component plays a role in analyzing different aspects of the market. WaveTrend focuses on trend strength, Money Flow indicators assess market sentiment, while RSI and Stochastic RSI offer detailed views of price momentum and potential reversals.
Ideal For
Traders who require a reliable, multifaceted tool for detecting market trends and reversals.
Investors seeking a deeper understanding of market dynamics across different timeframes and conditions, whether in forex, equities, or cryptocurrency markets.
This script is designed to provide a comprehensive tool for technical analysis, combining multiple indicators and divergence detection into one versatile and customizable script. It is especially useful for traders who want to monitor various indicators simultaneously and look for convergence or divergence signals across different technical tools.
Acknowledgements
Special thanks to these amazing creators for inspiration and their creations:
I want to thank these amazing creators for creating there amazing indicators , that inspired me and also gave me a head start by making this indicator! Without their amazing indicators it wouldn't be possible!
vumanchu: VuManChu Cipher B Divergences.
MisterMoTa: RSI + Divergences + Alerts .
DevLucem: Plain Stochastic Divergence.
Note
This indicator is designed to be a powerful tool in your trading arsenal. However , it is essential to backtest and adjust the settings according to your trading strategy before applying it to live trading . If you have any questions or need further assistance, feel free to reach out.
Smart MACD Volume Trader# Smart MACD Volume Trader
## Overview
Smart MACD Volume Trader is an enhanced momentum indicator that combines the classic MACD (Moving Average Convergence Divergence) oscillator with an intelligent high-volume filter. This combination significantly reduces false signals by ensuring that trading signals are only generated when price momentum is confirmed by substantial volume activity.
The indicator supports over 24 different instruments including major and exotic forex pairs, precious metals (gold and silver), energy commodities (crude oil, natural gas), and industrial metals (copper). For forex and commodity traders, the indicator automatically maps to CME and COMEX futures contracts to provide accurate institutional-grade volume data.
## Originality and Core Concept
Traditional MACD indicators generate signals based solely on price momentum, which can result in numerous false signals during low-activity periods or ranging markets. This indicator addresses this critical weakness by introducing a volume confirmation layer with automatic institutional volume integration.
**What makes this approach original:**
- Signals are triggered only when MACD crossovers coincide with elevated volume activity
- Implements a lookback mechanism to detect volume spikes within recent bars
- Automatically detects and maps 24+ forex pairs and commodities to their corresponding CME and COMEX futures contracts
- Provides real institutional volume data for forex pairs where spot volume is unreliable
- Combines two independent market dimensions (price momentum and volume) into a single, actionable signal
- Includes intelligent asset detection that works across multiple exchanges and ticker formats
**The underlying principle:** Volume validates price movement. When institutional money enters the market, it creates volume signatures. By requiring high volume confirmation and using actual institutional volume data from futures markets, this indicator filters out weak price movements and focuses on trades backed by genuine market participation. The automatic futures mapping ensures that forex and commodity traders always have access to the most accurate volume data available, without manual configuration.
## How It Works
### MACD Component
The indicator calculates MACD using standard methodology:
1. **Fast EMA (default: 12 periods)** - Tracks short-term price momentum
2. **Slow EMA (default: 26 periods)** - Tracks longer-term price momentum
3. **MACD Line** - Difference between Fast EMA and Slow EMA
4. **Signal Line (default: 9-period SMA)** - Smoothed average of MACD line
**Crossover signals:**
- **Bullish:** MACD line crosses above Signal line (momentum turning positive)
- **Bearish:** MACD line crosses below Signal line (momentum turning negative)
### Volume Filter Component
The volume filter adds an essential confirmation layer:
1. **Volume Moving Average** - Calculates exponential MA of volume (default: 20 periods)
2. **High Volume Threshold** - Multiplies MA by ratio (default: 2.0x or 200%)
3. **Volume Detection** - Identifies bars where current volume exceeds threshold
4. **Lookback Period** - Checks if high volume occurred in recent bars (default: 5 bars)
**Signal logic:**
- Buy/Sell signals only trigger when BOTH conditions are met:
- MACD crossover/crossunder occurs
- High volume detected within lookback period
### Automatic CME Futures Integration
For forex traders, spot FX volume data can be unreliable or non-existent. This indicator solves this problem by automatically detecting forex pairs and mapping them to corresponding CME futures contracts with real institutional volume data.
**Supported Major Forex Pairs (7):**
- EURUSD → CME:6E1! (Euro FX Futures)
- GBPUSD → CME:6B1! (British Pound Futures)
- AUDUSD → CME:6A1! (Australian Dollar Futures)
- USDJPY → CME:6J1! (Japanese Yen Futures)
- USDCAD → CME:6C1! (Canadian Dollar Futures)
- USDCHF → CME:6S1! (Swiss Franc Futures)
- NZDUSD → CME:6N1! (New Zealand Dollar Futures)
**Supported Exotic Forex Pairs (4):**
- USDMXN → CME:6M1! (Mexican Peso Futures)
- USDRUB → CME:6R1! (Russian Ruble Futures)
- USDBRL → CME:6L1! (Brazilian Real Futures)
- USDZAR → CME:6Z1! (South African Rand Futures)
**Supported Cross Pairs (6):**
- EURJPY → CME:6E1! (Uses Euro Futures)
- GBPJPY → CME:6B1! (Uses British Pound Futures)
- EURGBP → CME:6E1! (Uses Euro Futures)
- AUDJPY → CME:6A1! (Uses Australian Dollar Futures)
- EURAUD → CME:6E1! (Uses Euro Futures)
- GBPAUD → CME:6B1! (Uses British Pound Futures)
**Supported Precious Metals (2):**
- Gold (XAUUSD, GOLD) → COMEX:GC1! (Gold Futures)
- Silver (XAGUSD, SILVER) → COMEX:SI1! (Silver Futures)
**Supported Energy Commodities (3):**
- WTI Crude Oil (USOIL, WTIUSD) → NYMEX:CL1! (Crude Oil Futures)
- Brent Oil (UKOIL) → NYMEX:BZ1! (Brent Crude Futures)
- Natural Gas (NATGAS) → NYMEX:NG1! (Natural Gas Futures)
**Supported Industrial Metals (1):**
- Copper (COPPER) → COMEX:HG1! (Copper Futures)
**How the automatic detection works:**
The indicator intelligently identifies the asset type by analyzing:
1. Exchange name (FX, OANDA, TVC, COMEX, NYMEX, etc.)
2. Currency pair pattern (6-letter codes like EURUSD, GBPUSD)
3. Commodity identifiers (XAU for gold, XAG for silver, OIL for crude)
When a supported instrument is detected, the indicator automatically switches to the corresponding futures contract for volume analysis. For stocks, cryptocurrencies, and other assets, the indicator uses the native volume data from the current chart.
**Visual feedback:**
An information table appears in the top-right corner of the MACD pane showing:
- Current chart symbol
- Exchange name
- Currency pair or asset name
- Volume source being used (highlighted in orange for futures, yellow for native volume)
- Current high volume status
This provides complete transparency about which data source the indicator is using for its volume analysis.
## How to Use
### Basic Setup
1. Add the indicator to your chart
2. The indicator displays in a separate pane (MACD) and overlay (signals/volume bars)
3. Default settings work well for most assets, but can be customized
### Signal Interpretation
### Visual Signals
**Visual Signals:**
- **Green "BUY" label** - Bullish MACD crossover confirmed by high volume
- **Red "SELL" label** - Bearish MACD crossunder confirmed by high volume
- **Green/Red candles** - Highlight bars with volume exceeding the threshold
- **Light green/red background** - Emphasizes signal bars on the chart
**Information Table:**
A detailed information table appears in the top-right corner of the MACD pane, providing real-time transparency about the indicator's operation:
- **Chart:** Current symbol being analyzed
- **Exchange:** The exchange or data feed being used
- **Pair:** The currency pair or asset name extracted from the ticker
- **Volume From:** The actual symbol used for volume analysis
- Orange color indicates CME or COMEX futures are being used (automatic institutional volume)
- Yellow color indicates native volume from the chart symbol is being used
- Hover tooltip shows whether automatic futures mapping is active
- **High Volume:** Current status showing YES (green) when volume exceeds threshold, NO (gray) otherwise
This table ensures complete transparency and allows you to verify that the correct volume source is being used for your analysis.
**Volume Analysis:**
- Gray histogram bars = Normal volume
- Red histogram bars = High volume (exceeds threshold)
- Green line = Volume moving average baseline
**MACD Analysis:**
- Blue line = MACD line (momentum indicator)
- Orange line = Signal line (trend confirmation)
- Gray dotted line = Zero line (bullish above, bearish below)
### Parameter Customization
**MACD Parameters:**
- Adjust Fast/Slow EMA lengths for different sensitivities
- Shorter periods = More signals, faster response
- Longer periods = Fewer signals, less noise
**Volume Parameters:**
- **Volume MA Period:** Higher values smooth volume analysis
- **High Volume Ratio:** Lower values (1.5x) = More signals; Higher values (3.0x) = Fewer, stronger signals
- **Volume Lookback Bars:** Controls how recent the volume spike must be
**Direction Filters:**
- **Only Buy Signals:** Enables long-only strategy mode
- **Only Sell Signals:** Enables short-only strategy mode
### Alert Configuration
The indicator includes three alert types:
1. **Buy Signal Alert** - Triggers when bullish signal appears
2. **Sell Signal Alert** - Triggers when bearish signal appears
3. **High Volume Alert** - Triggers when volume exceeds threshold
To set up alerts:
1. Click the indicator name → "Add alert on Smart MACD Volume Trader"
2. Select desired alert condition
3. Configure notification method (popup, email, webhook, etc.)
## Trading Strategy Guidelines
### Best Practices
**Recommended markets:**
- Liquid stocks (large-cap, high daily volume)
- Major forex pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, USDCHF, NZDUSD)
- Exotic forex pairs (USDMXN, USDRUB, USDBRL, USDZAR)
- Cross pairs (EURJPY, GBPJPY, EURGBP, AUDJPY, EURAUD, GBPAUD)
- Precious metals (Gold, Silver with automatic COMEX futures mapping)
- Energy commodities (Crude Oil, Natural Gas with automatic NYMEX futures mapping)
- Industrial metals (Copper with automatic COMEX futures mapping)
- Major cryptocurrency pairs
- Index futures and ETFs
**Timeframe recommendations:**
- **Day trading:** 5-minute to 15-minute charts
- **Swing trading:** 1-hour to 4-hour charts
- **Position trading:** Daily charts
**Risk management:**
- Use signals as entry confirmation, not standalone strategy
- Combine with support/resistance levels
- Consider overall market trend direction
- Always use stop-loss orders
### Strategy Examples
**Trend Following Strategy:**
1. Identify overall trend using higher timeframe (e.g., daily chart)
2. Trade only in trend direction
3. Use "Only Buy" filter in uptrends, "Only Sell" in downtrends
4. Enter on signal, exit on opposite signal or at resistance/support
**Volume Breakout Strategy:**
1. Wait for consolidation period (low volume, tight MACD range)
2. Enter when signal appears with high volume (confirms breakout)
3. Target previous swing highs/lows
4. Stop loss below/above recent consolidation
**Forex Scalping Strategy (with automatic CME futures):**
1. The indicator automatically detects forex pairs and uses CME futures volume
2. Trade during active sessions only (use session filter)
3. Focus on quick profits (10-20 pips)
4. Exit at opposite signal or profit target
**Commodities Trading Strategy (Gold, Silver, Oil):**
1. The indicator automatically maps to COMEX and NYMEX futures contracts
2. Trade during high-liquidity sessions (overlap of major markets)
3. Use the high volume confirmation to identify institutional entry points
4. Combine with key support and resistance levels for entries
5. Monitor the information table to confirm futures volume is being used (orange color)
6. Exit on opposite MACD signal or at predefined profit targets
## Why This Combination Works
### The Volume Advantage
Studies consistently show that price movements accompanied by high volume are more likely to continue, while low-volume movements often reverse. This indicator leverages this principle by requiring volume confirmation.
**Key benefits:**
1. **Reduced False Signals:** Eliminates MACD whipsaws during low-volume consolidation
2. **Confirmation Bias:** Two independent indicators (price momentum + volume) agreeing
3. **Institutional Alignment:** High volume often indicates institutional participation
4. **Trend Validation:** Volume confirms that price momentum has "conviction"
### Statistical Edge
By combining two uncorrelated signals (MACD crossovers and volume spikes), the indicator creates a higher-probability setup than either signal alone. The lookback mechanism ensures signals aren't missed if volume spike slightly precedes the MACD cross.
## Supported Exchanges and Automatic Detection
The indicator includes intelligent asset detection that works across multiple exchanges and ticker formats:
**Forex Exchanges (Automatic CME Mapping):**
- FX (TradingView forex feed)
- OANDA
- FXCM
- SAXO
- FOREXCOM
- PEPPERSTONE
- EASYMARKETS
- FX_IDC
**Commodity Exchanges (Automatic COMEX/NYMEX Mapping):**
- TVC (TradingView commodity feed)
- COMEX (directly)
- NYMEX (directly)
- ICEUS
**Other Asset Classes (Native Volume):**
- Stock exchanges (NASDAQ, NYSE, AMEX, etc.)
- Cryptocurrency exchanges (BINANCE, COINBASE, KRAKEN, etc.)
- Index providers (SP, DJ, etc.)
The detection algorithm analyzes three factors:
1. Exchange prefix in the ticker symbol
2. Pattern matching for currency pairs (6-letter codes)
3. Commodity identifiers in the symbol name
This ensures accurate automatic detection regardless of which data feed or exchange you use for charting. The information table in the top-right corner always displays which volume source is being used, providing complete transparency.
## Technical Details
**Calculations:**
- MACD Fast MA: EMA(close, fastLength)
- MACD Slow MA: EMA(close, slowLength)
- MACD Line: Fast MA - Slow MA
- Signal Line: SMA(MACD Line, signalLength)
- Volume MA: Exponential MA of volume
- High Volume: Current volume >= Volume MA × Ratio
**Signal logic:**
```
Buy Signal = (MACD crosses above Signal) AND (High volume in last N bars)
Sell Signal = (MACD crosses below Signal) AND (High volume in last N bars)
```
## Parameters Reference
| Parameter | Default | Description |
|-----------|---------|-------------|
| Volume Symbol | Blank | Manual override for volume source (leave blank for automatic detection) |
| Use CME Futures | False | Legacy option (automatic detection is now built-in) |
| Alert Session | 1530-2200 | Active session time range for alerts |
| Timezone | UTC+1 | Timezone for alert sessions |
| Volume MA Period | 20 | Number of periods for volume moving average |
| High Volume Ratio | 2.0 | Volume threshold multiplier (2.0 = 200% of average) |
| Volume Lookback | 5 | Number of bars to check for high volume confirmation |
| MACD Fast Length | 12 | Fast EMA period for MACD calculation |
| MACD Slow Length | 26 | Slow EMA period for MACD calculation |
| MACD Signal Length | 9 | Signal line SMA period |
| Only Buy | False | Filter to show only bullish signals |
| Only Sell | False | Filter to show only bearish signals |
| Show Signals | True | Display buy and sell labels on chart |
## Optimization Tips
**For volatile markets (crypto, small caps):**
- Increase High Volume Ratio to 2.5-3.0
- Reduce Volume Lookback to 3-4 bars
- Consider faster MACD settings (8, 17, 9)
**For stable markets (large-cap stocks, bonds):**
- Decrease High Volume Ratio to 1.5-1.8
- Increase Volume MA Period to 30-50
- Use standard MACD settings
**For forex (with automatic CME futures):**
- The indicator automatically uses CME futures when forex pairs are detected
- Set appropriate trading session based on your timezone
- Use Volume Lookback of 5-7 bars
- Consider session-based alerts only
- Monitor the information table to verify correct futures mapping
**For commodities (Gold, Silver, Oil, Copper):**
- The indicator automatically maps to COMEX and NYMEX futures
- Increase High Volume Ratio to 2.0-2.5 for metals
- Use slightly higher Volume MA Period (25-30) for smoother analysis
- Trade during active market hours for best volume data
- The information table will show the futures contract being used (orange highlight)
## Limitations and Considerations
**What this indicator does NOT do:**
- Does not predict future price direction
- Does not guarantee profitable trades
- Does not replace proper risk management
- Does not work well in extremely low-volume conditions
**Market conditions to avoid:**
- Pre-market and after-hours sessions (low volume)
- Major news events (volatile, unpredictable volume)
- Holidays and low-liquidity periods
- Extremely low float stocks
## Conclusion
Smart MACD Volume Trader represents a significant evolution of the traditional MACD indicator by combining volume confirmation with automatic institutional volume integration. This dual-confirmation approach significantly improves signal quality by filtering out low-conviction price movements and ensuring traders work with accurate volume data.
The indicator's automatic detection and mapping system supports over 24 instruments across forex, commodities, and metals markets. By intelligently switching to CME and COMEX futures contracts when appropriate, the indicator provides forex and commodity traders with the same quality of volume data that stock traders naturally have access to.
This indicator is particularly valuable for traders who want to:
- Align their entries with institutional money flow
- Avoid getting trapped in false breakouts
- Trade forex pairs with reliable volume data
- Access accurate volume information for gold, silver, and energy commodities
- Combine momentum and volume analysis in a single, streamlined tool
Whether you are day trading stocks, swing trading forex pairs, or positioning in commodities markets, this indicator provides a robust framework for identifying high-probability momentum trades backed by genuine institutional participation. The automatic futures mapping works seamlessly across all supported instruments, requiring no manual configuration or expertise in futures markets.
---
## Support and Updates
This indicator is actively maintained and updated based on user feedback and market conditions. For questions about implementation or custom modifications, please use the comments section below.
**Disclaimer:** This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Always conduct your own analysis and risk management before trading.
Stoch_RSI_ChartEnhanced Stochastic RSI Divergence Indicator with VWAP Filter for Charts
This custom indicator builds upon the classic Stochastic RSI to automatically detect both regular and hidden divergences. It’s designed to help traders spot potential market reversals or continuations using two methods for divergence detection (fractal‑ and pivot‑based) while offering optional VWAP filtering for confirmation.
Key Features
Stoch RSI Calculation
The indicator computes a smoothed Stoch RSI using configurable parameters for RSI length, stochastic length, and smoothing periods. An option to average the K and D lines provides a cleaner momentum view.
Divergence Detection via Fractals & Pivots
Fractal-Based Divergences:
Looks for 4-candle patterns to identify higher-highs or lower-lows in the price that are not confirmed by the oscillator, signaling potential reversals.
Pivot-Based Divergences:
Utilizes TradingView’s built-in pivot functions to find divergence conditions over adjustable pivot ranges.
Regular vs. Hidden Divergences:
Regular Divergence: Occurs when price makes a new extreme (higher high or lower low) while the Stoch RSI fails to follow suit.
Hidden Divergence: Indicates potential trend continuations when the oscillator diverges against the established price trend.
Optional VWAP Filtering
The script includes two optional VWAP filters that work as follows:
VWAP Filter on Regular Divergences:
Only confirms regular divergence signals if the current price satisfies the VWAP condition (e.g., price is above VWAP for bullish signals, below VWAP for bearish signals).
VWAP Filter on Hidden Divergences:
Similarly, hidden divergence signals are validated only when the price meets specific VWAP conditions, adding an extra layer of trend confirmation.
Customizable Alerts and Visual Labels
Easily configure divergence labels (“B” for bullish, “S” for bearish) and enable up to four alert conditions for real‑time notifications when a divergence occurs.
Credits & History:
Log RSI by @fskrypt
Divergence Detection originally by @RicardoSantos (with edits from @JustUncleL)
Further Edits by @NeoButane on August 8, 2018
Latest Edits by @FYMD on June 1, 2024
Savitzky-Golay Z-Score [BackQuant]Savitzky-Golay Z-Score
The Savitzky-Golay Z-Score is a powerful trading indicator that combines the precision of the Savitzky-Golay filter with the statistical strength of the Z-Score. This advanced indicator is designed to detect trend shifts, identify overbought or oversold conditions, and highlight potential divergences in the market, providing traders with a unique edge in detecting momentum changes and trend reversals.
Core Concept: Savitzky-Golay Filter
The Savitzky-Golay filter is a widely-used smoothing technique that preserves important signal features such as peak detection while filtering out noise. In this indicator, the filter is applied to price data (default set to HLC3) to smooth out volatility and produce a cleaner trend line. By specifying the window size and polynomial degree, traders can fine-tune the degree of smoothing to match their preferred trading style or market conditions.
Z-Score: Measuring Deviation
The Z-Score is a statistical measure that indicates how far the current price is from its mean in terms of standard deviations. In trading, the Z-Score can be used to identify extreme price moves that are likely to revert or continue trending. A positive Z-Score means the price is above the mean, while a negative Z-Score indicates the price is below the mean.
This script calculates the Z-Score based on the Savitzky-Golay filtered price, enabling traders to detect moments when the price is diverging from its typical range and may present an opportunity for a trade.
Long and Short Conditions
The Savitzky-Golay Z-Score generates clear long and short signals based on the Z-Score value:
Long Signals : When the Z-Score is positive, indicating the price is above its smoothed mean, a long signal is generated. The color of the bars turns green, signaling upward momentum.
Short Signals : When the Z-Score is negative, indicating the price is below its smoothed mean, a short signal is generated. The bars turn red, signaling downward momentum.
These signals allow traders to follow the prevailing trend with confidence, using statistical backing to avoid false signals from short-term volatility.
Standard Deviation Levels and Extreme Levels
This indicator includes several features to help visualize overbought and oversold conditions:
Standard Deviation Levels: The script plots horizontal lines at +1, +2, -1, and -2 standard deviations. These levels provide a reference for how far the current price is from the mean, allowing traders to quickly identify when the price is moving into extreme territory.
Extreme Levels: Additional extreme levels at +3 and +4 (and their negative counterparts) are plotted to highlight areas where the price is highly likely to revert. These extreme levels provide important insight into market conditions that are far outside the norm, signaling caution or potential reversal zones.
The indicator also adapts the color shading of these extreme zones based on the Z-Score’s strength. For example, the area between +3 and +4 is shaded with a stronger color when the Z-Score approaches these values, giving a visual representation of market pressure.
Divergences: Detecting Hidden and Regular Signals
A key feature of the Savitzky-Golay Z-Score is its ability to detect bullish and bearish divergences, both regular and hidden:
Regular Bullish Divergence: This occurs when the price makes a lower low while the Z-Score forms a higher low. It signals that bearish momentum is weakening, and a bullish reversal could be near.
Hidden Bullish Divergence: This divergence occurs when the price makes a higher low while the Z-Score forms a lower low. It signals that bullish momentum may continue after a temporary pullback.
Regular Bearish Divergence: This occurs when the price makes a higher high while the Z-Score forms a lower high, signaling that bullish momentum is weakening and a bearish reversal may be near.
Hidden Bearish Divergence: This divergence occurs when the price makes a lower high while the Z-Score forms a higher high, indicating that bearish momentum may continue after a temporary rally.
These divergences are plotted directly on the chart, making it easier for traders to spot when the price and momentum are out of sync and when a potential reversal may occur.
Customization and Visualization
The Savitzky-Golay Z-Score offers a range of customization options to fit different trading styles:
Window Size and Polynomial Degree: Adjust the window size and polynomial degree of the Savitzky-Golay filter to control how much smoothing is applied to the price data.
Z-Score Lookback Period: Set the lookback period for calculating the Z-Score, allowing traders to fine-tune the sensitivity to short-term or long-term price movements.
Display Options: Choose whether to display standard deviation levels, extreme levels, and divergence labels on the chart.
Bar Color: Color the price bars based on trend direction, with green for bullish trends and red for bearish trends, allowing traders to easily visualize the current momentum.
Divergences: Enable or disable divergence detection, and adjust the lookback periods for pivots used to detect regular and hidden divergences.
Alerts and Automation
To ensure you never miss an important signal, the indicator includes built-in alert conditions for the following events:
Positive Z-Score (Long Signal): Triggers an alert when the Z-Score crosses above zero, indicating a potential buying opportunity.
Negative Z-Score (Short Signal): Triggers an alert when the Z-Score crosses below zero, signaling a potential short opportunity.
Shifting Momentum: Alerts when the Z-Score is shifting up or down, providing early warning of changing market conditions.
These alerts can be configured to notify you via email, SMS, or app notification, allowing you to stay on top of the market without having to constantly monitor the chart.
Trading Applications
The Savitzky-Golay Z-Score is a versatile tool that can be applied across multiple trading strategies:
Trend Following: By smoothing the price and calculating the Z-Score, this indicator helps traders follow the prevailing trend while avoiding false signals from short-term volatility.
Mean Reversion: The Z-Score highlights moments when the price is far from its mean, helping traders identify overbought or oversold conditions and capitalize on potential reversals.
Divergence Trading: Regular and hidden divergences between the Z-Score and price provide early warning of trend reversals, allowing traders to enter trades at opportune moments.
Final Thoughts
The Savitzky-Golay Z-Score is an advanced statistical tool designed to provide a clearer view of market trends and momentum. By applying the Savitzky-Golay filter and Z-Score analysis, this indicator reduces noise and highlights key areas where the market may reverse or accelerate, giving traders a significant edge in understanding price behavior.
Whether you’re a trend follower or a reversal trader, this indicator offers the flexibility and insights you need to navigate complex markets with confidence.
Nef33-Volume Footprint ApproximationDescription of the "Volume Footprint Approximation" Indicator
Purpose
The "Volume Footprint Approximation" indicator is a tool designed to assist traders in analyzing market volume dynamics and anticipating potential trend changes in price. It is inspired by the concept of a volume footprint chart, which visualizes the distribution of trading volume across different price levels. However, since TradingView does not provide detailed intrabar data for all users, this indicator approximates the behavior of a footprint chart by using available volume and price data (open, close, volume) to classify volume as buy or sell, calculate volume delta, detect imbalances, and generate trend change signals.
The indicator is particularly useful for identifying areas of high buying or selling activity, imbalances between supply and demand, delta divergences, and potential reversal points in the market. It provides specific signals for bullish and bearish trend changes, making it suitable for traders looking to trade reversals or confirm trends.
How It Works
The indicator uses volume and price data from each candlestick to perform the following calculations:
Volume Classification:
Classifies the volume of each candlestick as "buy" or "sell" based on price movement:
If the closing price is higher than the opening price (close > open), the volume is classified as "buy."
If the closing price is lower than the opening price (close < open), the volume is classified as "sell."
If the closing price equals the opening price (close == open), it compares with the previous close to determine the direction:
If the current close is higher than the previous close, it is classified as "buy."
If the current close is lower than the previous close, it is classified as "sell."
If the current close equals the previous close, the classification from the previous bar is used.
Delta Calculation:
Calculates the volume delta as the difference between buy volume and sell volume (buyVolume - sellVolume).
A positive delta indicates more buy volume; a negative delta indicates more sell volume.
Imbalance Detection:
Identifies imbalances between buy and sell volume:
A buy imbalance occurs when buy volume exceeds sell volume by a defined percentage (default is 300%).
A sell imbalance occurs when sell volume exceeds buy volume by the same percentage.
Delta Divergence Detection:
Positive Delta Divergence: Occurs when the price is falling (for at least 2 bars) but the delta is increasing or becomes positive, indicating that buyers are entering despite the price decline.
Negative Delta Divergence: Occurs when the price is rising (for at least 2 bars) but the delta is decreasing or becomes negative, indicating that sellers are entering despite the price increase.
Trend Change Signals:
Bullish Signal (trendChangeBullish): Generated when the following conditions are met:
There is a positive delta divergence.
The delta has moved from a negative value (e.g., -500) to a positive value (e.g., +200) over the last 3 bars.
There is a buy imbalance.
The price is near a historical support level (approximated as the lowest low of the last 50 bars).
Bearish Signal (trendChangeBearish): Generated when the following conditions are met:
There is a negative delta divergence.
The delta has moved from a positive value (e.g., +500) to a negative value (e.g., -200) over the last 3 bars.
There is a sell imbalance.
The price is near a historical resistance level (approximated as the highest high of the last 50 bars).
Visual Elements
The indicator is displayed in a separate panel below the price chart (overlay=false) and includes the following elements:
Volume Histograms:
Buy Volume: Represented by a green histogram. Shows the volume classified as "buy."
Sell Volume: Represented by a red histogram. Shows the volume classified as "sell."
Note: The histograms overlap, and the last plotted histogram (red) takes visual precedence, meaning the sell volume may cover the buy volume if it is larger.
Delta Line:
Delta Volume: Represented by a blue line. Shows the difference between buy and sell volume.
A line above zero indicates more buy volume; a line below zero indicates more sell volume.
A dashed gray horizontal line marks the zero level for easier interpretation.
Imbalance Backgrounds:
Buy Imbalance: Light green background when buy volume exceeds sell volume by the defined percentage.
Sell Imbalance: Light red background when sell volume exceeds buy volume by the defined percentage.
Divergence Backgrounds:
Positive Delta Divergence: Lime green background when a positive delta divergence is detected.
Negative Delta Divergence: Fuchsia background when a negative delta divergence is detected.
Trend Change Signals:
Bullish Signal: Green label with the text "Bullish Trend Change" when the conditions for a bullish trend change are met.
Bearish Signal: Red label with the text "Bearish Trend Change" when the conditions for a bearish trend change are met.
Information Labels:
Below each bar, a label displays:
Total Vol: The total volume of the bar.
Delta: The delta volume value.
Alerts
The indicator generates the following alerts:
Positive Delta Divergence: "Positive Delta Divergence Detected! Price is falling, but delta is increasing."
Negative Delta Divergence: "Negative Delta Divergence Detected! Price is rising, but delta is decreasing."
Bullish Trend Change Signal: "Bullish Trend Change Signal! Positive Delta Divergence, Delta Rise, Buy Imbalance, and Near Support."
Bearish Trend Change Signal: "Bearish Trend Change Signal! Negative Delta Divergence, Delta Drop, Sell Imbalance, and Near Resistance."
These alerts can be configured in TradingView to receive real-time notifications.
Adjustable Parameters
The indicator allows customization of the following parameters:
Imbalance Threshold (%): The percentage required to detect an imbalance between buy and sell volume (default is 300%).
Lookback Period for Divergence: Number of bars to look back for detecting price and delta trends (default is 2 bars).
Support/Resistance Lookback Period: Number of bars to look back for identifying historical support and resistance levels (default is 50 bars).
Delta High Threshold (Bearish): Minimum delta value 2 bars ago for the bearish signal (default is +500).
Delta Low Threshold (Bearish): Maximum delta value in the current bar for the bearish signal (default is -200).
Delta Low Threshold (Bullish): Maximum delta value 2 bars ago for the bullish signal (default is -500).
Delta High Threshold (Bullish): Minimum delta value in the current bar for the bullish signal (default is +200).
Practical Use
The indicator is useful for the following purposes:
Identifying Trend Changes:
The trend change signals (trendChangeBullish and trendChangeBearish) indicate potential price reversals. For example, a bullish signal near a support level may be an opportunity to enter a long position.
Detecting Divergences:
Delta divergences (positive and negative) can anticipate trend changes by showing a disagreement between price movement and underlying buying/selling pressure.
Finding Key Levels:
Imbalances (green and red backgrounds) often coincide with support and resistance levels, helping to identify areas where the market might react.
Confirming Trends:
A consistently positive delta in an uptrend or a negative delta in a downtrend can confirm the strength of the trend.
Identifying Failed Auctions:
Although not detected automatically, you can manually identify failed auctions by observing a price move to new highs/lows with decreasing volume in the direction of the move.
Limitations
Intrabar Data: It does not use detailed intrabar data, making it less precise than a native footprint chart.
Approximations: Volume classification and support/resistance detection are approximations, which may lead to false signals.
Volume Dependency: It requires reliable volume data, so it may be less effective on assets with inaccurate volume data (e.g., some forex pairs).
False Signals: Divergences and imbalances do not always indicate a trend change, especially in strongly trending markets.
Recommendations
Combine with Other Indicators: Use tools like RSI, MACD, support/resistance levels, or candlestick patterns to confirm signals.
Trade on Higher Timeframes: Signals are more reliable on higher timeframes like 1-hour or 4-hour charts.
Perform Backtesting: Evaluate the indicator's accuracy on historical data to adjust parameters and improve effectiveness.
Adjust Parameters: Modify thresholds (e.g., imbalanceThreshold or supportResistanceLookback) based on the asset and timeframe you are trading.
Conclusion
The "Volume Footprint Approximation" indicator is a powerful tool for analyzing volume dynamics and anticipating price trend changes. By classifying volume, calculating delta, detecting imbalances and divergences, and generating trend change signals, it provides traders with valuable insights into market buying and selling pressure. While it has limitations due to the lack of intrabar data, it can be highly effective when used in combination with other technical analysis tools and on assets with reliable volume data.
Multi-Timeframe SMTSummery
The Multi-Timeframe SMT indicator is designed to identify and visualize Higher Timeframe (HTF) data on a Lower Timeframe (LTF) chart, allowing traders to see the broader market context without changing their current chart's resolution. It accurately draws pivots and SMT divergences from higher timeframes on the corresponding candles of your current lower timeframe chart.
Its core features include:
Multi-Timeframe Analysis: Configure and monitor pivots on up to four independent timeframes, from intraday to monthly.
Customizable Pivot Detection: Define the strength of pivots by adjusting the number of bars to the left and right.
SMT Divergence: Automatically identifies bullish and bearish SMT divergences by comparing the price action of the main chart symbol with a chosen correlated asset.
Early SMT Detection: A unique feature that monitors a lower "detection timeframe" to provide early warnings of potential SMT setups before they're confirmed on the main timeframe. Note that this early detection is only shown on timeframes equal to or lower than the "Detection timeframe" you have set.
Visual Cues & Alerts: Clear on-chart labels, lines, and fully customizable alerts notify you of confirmed pivots and SMT divergences, ensuring you don't miss key opportunities.
Important Nuance Regarding Pivot Label Display
Due to a self-imposed limit within this script's drawing management logic, the indicator might quickly reach its drawing capacity if you enable pivot crosses for multiple timeframes simultaneously. When this internal drawing limit is exceeded, the script is designed to automatically remove the oldest drawings to make space for new ones.
Therefore, to ensure optimal performance and visibility of the most recent and relevant pivots, it's highly recommended to only enable the "Show Pivot Crosses" option for one timeframe at a time. If you wish to view pivots for a different timeframe, simply disable the pivot crosses for the currently active timeframe and then enable them for your desired one. This approach prevents the rapid cycling and disappearance of pivot labels, providing a clearer and more stable visual experience.
In-Depth Explanation of the Logic
This script is built on two primary concepts: pivot points and Smart Money Technique (SMT) divergence. It systematically collects historical data on multiple timeframes, identifies pivots, and then compares them between two assets to find divergences.
Pivot Point Identification
A pivot is a turning point in the market. A pivot high is a candle that has a higher high than the candles to its immediate left and right. Conversely, a pivot low is a candle with a lower low than its neighbors.
How it Works in the Script:
The script tracks the highest high and lowest low for each period of the selected timeframe (e.g., for each 4-hour candle). When a new high-timeframe candle closes, it stores that high/low value and its bar index in an array. The checkForPivot() function then checks if a recently stored high or low qualifies as a pivot.
Key Inputs:
Left Strength (leftBars1): The number of candles to the left that must have a lower high (for a pivot high) or higher low (for a pivot low).
Right Strength (rightBars1): The number of candles to the right that must meet the same criteria.
For example, with Left Strength and Right Strength both set to 3, a pivot high is only confirmed when its high is greater than the highs of the 3 previous high-timeframe candles and the 3 subsequent high-timeframe candles. Increasing these values will identify more significant, longer-term pivots.
Smart Money Technique (SMT) Divergence
SMT Divergence is a concept popularized by The Inner Circle Trader (ICT). It occurs when two closely correlated assets fail to move in sync. For instance, if Asset A makes a higher high but Asset B fails to do so and instead makes a lower high, this creates a bearish SMT divergence. It suggests that the "smart money" may not be supporting the move in Asset A, signaling a potential reversal.
Bearish SMT: Main asset makes a higher high, while the correlated asset makes a lower high. This is a potential sell signal.
Bullish SMT: Main asset makes a lower low, while the correlated asset makes a higher low. This is a potential buy signal.
How it Works in the Script:
Data Request: For each timeframe, the script uses the request.security() function to fetch the high and low data for both the main chart symbol (syminfo.tickerid) and the chosen Comparison Asset.
Pivot Comparison: When a new pivot is confirmed on the main asset, the script checks if a corresponding pivot also formed on the comparison asset at the same time.
Divergence Check: It then compares the direction of the pivots. For a bearish SMT, it checks if the main asset's new pivot high is higher than its previous pivot high, while the comparison asset's new pivot high is lower than its previous one. The logic is reversed for bullish SMT.
Visualization: If a divergence is found, the script draws a red (bearish) or green (bullish) line connecting the two pivots on your chart and places an "SMT" label.
Early SMT Detection
This is a proactive feature designed to give you a heads-up. Waiting for a 4-hour or daily pivot to form can take a long time. The early detection system looks for SMT divergences on a much smaller, user-defined Detection timeframe (e.g., 15-minute).
How it Works in the Script:
Awaiting Setup: After a primary pivot (Pivot A) is formed on the main timeframe (e.g., a Daily pivot high), the script begins monitoring.
Intraday Monitoring: It then watches the Detection timeframe (e.g., 15-minute) for smaller intraday pivots.
Potential Divergence: It looks for an intraday pivot that forms a divergence against the primary Pivot A.
Watchline & Alert: When this "potential" divergence occurs, the script draws a dashed white line and triggers a "Potential SMT" alert. This isn't a confirmed SMT on the main timeframe yet, but it's a powerful early warning that one may be forming.
Drawing & Object Management
To keep the chart clean and prevent performance issues, the script manages its drawings (lines and labels) efficiently. It stores them in arrays and uses a drawing limit to automatically delete the oldest drawings as new ones are created, ensuring your TradingView remains responsive.
How to Use the Indicator
Configuration
Enable Timeframes: Use the checkboxes (Enable Timeframe 1, Enable Timeframe 2, etc.) to activate the timeframes you want to monitor. It's often best to start with one or two to keep the chart clean.
Select Timeframes: Choose the higher timeframes you want to analyze (e.g., 240 for 4-hour, D for Daily, W for Weekly).
Set Pivot Strength: The default of 3 for Left/Right strength is a good starting point. Increase it to find more significant market structure points or decrease it for more frequent, shorter-term pivots.
Configure SMT:
Check Enable SMT for the timeframes where you want to detect divergence.
Enter a Comparison Asset . This is crucial. Ensure the assets are correlated.
To use the early warning system, check Enable early SMT detection and select an appropriate Detection timeframe (e.g., 15 or 60 minutes for a Daily analysis).
LibraryDivergenceV6LibraryDivergenceV6
Enhance your trading strategies with LibraryDivergenceV6, a comprehensive Pine Script library designed to simplify and optimize the detection of bullish and bearish divergences across multiple technical indicators. Whether you're developing your own indicators or seeking to incorporate robust divergence analysis into your trading systems, this library provides the essential tools and functions to accurately identify potential market reversals and continuations.
Overview
LibraryDivergenceV6 offers a suite of functions that detect divergences between price movements and key technical indicators such as the Relative Strength Index (RSI) and On-Balance Volume (OBV). By automating the complex calculations involved in divergence detection, this library enables traders and developers to implement reliable and customizable divergence strategies with ease.
Key Features
Comprehensive Divergence Detection
Bullish Divergence: Identifies instances where the indicator forms higher lows while the price forms lower lows, signaling potential upward reversals.
Bearish Divergence: Detects situations where the indicator creates lower highs while the price forms higher highs, indicating possible downward reversals.
Overbought and Oversold Conditions: Differentiates between standard and strong divergences by considering overbought and oversold levels, enhancing signal reliability.
Multi-Indicator Support
RSI (Relative Strength Index): Analyze momentum-based divergences to spot potential trend reversals.
OBV (On-Balance Volume): Incorporate volume flow into divergence analysis for a more comprehensive market perspective.
Customizable Parameters
Pivot Points Configuration: Adjust the number of bars to the left and right for pivot detection, allowing fine-tuning based on different timeframes and trading styles.
Range Settings: Define minimum and maximum bar ranges to control the sensitivity of divergence detection, reducing false signals.
Noise Cancellation: Enable or disable noise filtering to focus on significant divergences and minimize minor fluctuations.
Flexible Usage
Exported Functions: Easily integrate divergence detection into your custom indicators or trading strategies with exported functions such as DivergenceBull, DivergenceBear, DivergenceBullOversold, and DivergenceBearOverbought.
Occurrence Handling: Specify which occurrence of a divergence to consider (e.g., most recent, previous) for precise analysis.
Optimized Performance
Efficient Calculations: Designed to handle multiple occurrences and pivot points without compromising script performance.
Line Management: Automatically creates and deletes trend lines based on divergence conditions, ensuring a clean and uncluttered chart display.
Constance Brown RSI with Composite IndexConstance Brown RSI with Composite Index
Overview
This indicator combines Constance Brown's RSI interpretation methodology with a Composite Index and ATR Distance to VWAP measurement to provide a comprehensive trading tool. It helps identify trends, momentum shifts, overbought/oversold conditions, and potential reversal points.
Key Features
Color-coded RSI zones for immediate trend identification
Composite Index for momentum analysis and divergence detection
ATR Distance to VWAP for identifying extreme price deviations
Automatic divergence detection for early reversal warnings
Pre-configured alerts for key trading signals
How to Use This Indicator
Trend Identification
The RSI line changes color based on its position:
Blue zone (RSI > 50): Bullish trend - look for buying opportunities
Purple zone (RSI < 50): Bearish trend - look for selling opportunities
Gray zone (RSI 40-60): Neutral/transitional market - prepare for potential breakout
The 40-50 area (light blue fill) acts as support during uptrends, while the 50-60 area (light purple fill) acts as resistance during downtrends.
// From the code:
upTrendZone = rsiValue > 50 and rsiValue <= 90
downTrendZone = rsiValue < 50 and rsiValue >= 10
neutralZone = rsiValue > 40 and rsiValue < 60
rsiColor = neutralZone ? neutralRSI : upTrendZone ? upTrendRSI : downTrendRSI
Momentum Analysis
The Composite Index (fuchsia line) provides momentum confirmation:
Values above 50 indicate positive momentum
Values below 40 indicate negative momentum
Crossing above/below these thresholds signals potential momentum shifts
// From the code:
compositeIndexRaw = rsiChange / ta.stdev(rsiValue, rsiLength)
compositeIndex = ta.sma(compositeIndexRaw, compositeSmoothing)
compositeScaled = compositeIndex * 10 + 50 // Scaled to fit 0-100 range
Overbought/Oversold Detection
The ATR Distance to VWAP table in the top-right corner shows how far price has moved from VWAP in terms of ATR units:
Extreme positive values (orange/red): Potentially overbought
Extreme negative values (purple/red): Potentially oversold
Near zero (gray): Price near average value
// From the code:
priceDistance = (close - vwapValue) / ta.atr(atrPeriod)
// Color coding based on distance value
Divergence Trading
The indicator automatically detects divergences between the Composite Index and price:
Bullish divergence: Price makes lower low but Composite Index makes higher low
Bearish divergence: Price makes higher high but Composite Index makes lower high
// From the code:
divergenceBullish = ta.lowest(compositeIndex, rsiLength) > ta.lowest(close, rsiLength)
divergenceBearish = ta.highest(compositeIndex, rsiLength) < ta.highest(close, rsiLength)
Trading Strategies
Trend Following
1. Identify the trend using RSI color:
Blue = Uptrend, Purple = Downtrend
2. Wait for pullbacks to support/resistance zones:
In uptrends: Buy when RSI pulls back to 40-50 zone and bounces
In downtrends: Sell when RSI rallies to 50-60 zone and rejects
3. Confirm with Composite Index:
Uptrends: Composite Index stays above 50 or quickly returns above it
Downtrends: Composite Index stays below 50 or quickly returns below it
4. Manage risk using ATR Distance:
Take profits when ATR Distance reaches extreme values
Place stops beyond recent swing points
Reversal Trading
1. Look for divergences
Bullish: Price makes lower low but Composite Index makes higher low
Bearish: Price makes higher high but Composite Index makes lower high
2. Confirm with ATR Distance:
Extreme readings suggest potential reversals
3. Wait for RSI zone transition:
Bullish: RSI crosses above 40 (purple to neutral/blue)
Bearish: RSI crosses below 60 (blue to neutral/purple)
4. Enter after confirmation:
Use candlestick patterns for precise entry
Place stops beyond the divergence point
Four pre-configured alerts are available:
Momentum High: Composite Index above 50
Momentum Low: Composite Index below 40
Bullish Divergence: Composite Index higher low
Bearish Divergence: Composite Index lower high
Customization
Adjust these parameters to optimize for your trading style:
RSI Length: Default 14, lower for more sensitivity, higher for fewer signals
Composite Index Smoothing: Default 10, lower for quicker signals, higher for less noise
ATR Period: Default 14, affects the ATR Distance to VWAP calculation
This indicator works well across various markets and timeframes, though the default settings are optimized for daily charts. Adjust parameters for shorter or longer timeframes as needed.
Happy trading!
Volatility Channel Oscillator█ OVERVIEW
"Volatility Channel Oscillator" is a technical indicator that analyzes price volatility relative to dynamic price channels, displaying an oscillator, its moving average, and signals based on crossovers and divergences. The indicator offers customizable overbought and oversold levels, gradient visualization, and divergence detection, supported by alerts for key signals.
█ CONCEPTS
The VCO indicator creates dynamic price channels based on a moving average of the price (calculated as the arithmetic mean of the high and low prices: (high + low) / 2) and market volatility (measured as the average candle range and body size). These channels are not displayed on the chart but are used to calculate the oscillator value, which reflects the position of the closing price relative to the channel width, scaled to a range from -100 to +100, with the zero line as the central point. A moving average of the oscillator (SMA) smooths its values, enabling signals based on crossovers with the zero line or overbought/oversold levels. The indicator also detects divergences between price and the oscillator, which may indicate potential trend reversals. VCO is useful for identifying market momentum, reversal points, and trend confirmation, especially when combined with other technical analysis tools.
█ FEATURES
- Volatility Channels: Calculates invisible chart boundaries based on a simple moving average (SMA) of the price (high + low) / 2 and volatility (average candle range and body). The length parameter (default 30) sets the SMA length, and scale (default 200%) adjusts the channel width.
- Oscillator: Determines the oscillator value in the range of -100 to +100, indicating the closing price's position relative to the volatility channel. Displayed with dynamic coloring (green for positive values, red for negative).
- Oscillator Moving Average: A simple moving average (SMA) of the oscillator values, smoothing its movements. The signalLength parameter (default 20) defines the SMA length. Displayed in yellow with an optional gradient.
- Overbought/Oversold Levels: Configurable thresholds for the oscillator (overbought, default 50; oversold, default -50) and its moving average (maOverbought, default 30; maOversold, default -30), shown as horizontal lines with optional gradients. Band colors change dynamically (red for overbought, green for oversold, gray for neutral) based on the moving average's position relative to maOverbought/maOversold, reinforcing other signals.
- Divergences: Detects bullish (price forms a lower low, oscillator a higher low) and bearish (price forms a higher high, oscillator a lower high) divergences using pivots (pivotLength, default 2). Divergences are displayed with a delay equal to the pivot length; larger lengths increase reliability but delay signals. Use as additional confirmation.
Signals:
- Overbought/Oversold Crossovers: Green triangles (buy) when the oscillator crosses above the oversold level, red triangles (sell) when it crosses below the overbought level.
- Zero Line Crossovers: Buy/sell signals when the oscillator crosses the zero line upward (buy) or downward (sell).
- Moving Average Crossovers: Buy/sell signals when the oscillator's moving average crosses the zero line or the maOverbought/maOversold levels. Dynamic band color changes (red/green) at these crossovers reinforce other signals.
- Visualization: Gradient lines for the oscillator, its moving average, overbought/oversold levels, and zero line, with adjustable transparency. Gradient fill between the oscillator and zero line.
Divergence Labels: "Bull" (bullish) and "Bear" (bearish) labels with customizable color and transparency.
- Alerts: Built-in alerts for divergences, overbought/oversold crossovers, and zero line crossovers by the oscillator and its moving average.
█ HOW TO USE
Add to Chart: Apply the indicator via Pine Editor or the Indicators menu on TradingView.
Configure Settings:
- Channel and Oscillator Settings: Adjust the channel SMA length (length, default 30) and channel scaling (scale, default 200%). Increase scale for high-volatility markets.
- Threshold Levels: Set oscillator overbought (overbought, default 50) and oversold (oversold, default -50) levels, and moving average thresholds (maOverbought, default 30; maOversold, default -30).
- Divergence Settings: Enable/disable divergence detection (calculateDivergence) and set pivot length (pivotLength, default 2). Larger values increase reliability but delay signals.
- Signal Settings: Choose signal types (signalType): overbought/oversold, zero line, moving average, or all.
- Styling: Customize colors for the oscillator, moving average, horizontal levels, and divergence labels. Adjust gradient and fill transparency.
Interpreting Signals:
- Buy Signals: Green triangles below the bar when the oscillator or its moving average crosses above the oversold level or zero line.
- Sell Signals: Red triangles above the bar when the oscillator or its moving average crosses below the overbought level or zero line.
- Moving Average Signals: Green/red triangles when the moving average crosses maOverbought/maOversold levels, indicating potential reversals or trend continuation. Dynamic band color changes (red for overbought, green for oversold) at these crossovers reinforce other signals.
- Divergences: "Bull" (bullish) and "Bear" (bearish) labels indicate potential trend reversals with a delay based on pivot length. Use as confirmation.
- Overbought/Oversold Levels: Monitor price reactions in these zones as potential reversal points. Dynamic band color changes based on the moving average reinforce signals.
Signal Confirmation: Use VCO with other tools, such as pivot levels (for key turning points) or Fibonacci levels (for support/resistance zones).
█ APPLICATIONS
- Trend Trading: Zero line crossovers by the oscillator or its moving average identify momentum in uptrends or downtrends.
- Range Trading: Overbought/oversold levels help identify entry/exit points in sideways markets.
- Divergences: Use bullish/bearish divergences as additional confirmation of reversals, especially near key price levels.
- Trend Identification: To analyze trends over a longer perspective, increase the moving average length (signalLength) for more stable signals.
█ NOTES
- Test the indicator across different timeframes and markets to optimize parameters, such as length and scale, for your trading style.
- In strong trends, overbought/oversold levels may persist, requiring additional signal verification.
- Divergences are more reliable on higher timeframes (H4, D1), where market noise is reduced, but their delay requires caution.
- In low-liquidity markets, signals may be less effective, so use on high-liquidity assets is recommended.