Swing High-Low Line ConnectorSwing High-Low Line Connector is a simple and intuitive tool that automatically detects swing highs and swing lows using fractal-style pivot logic and connects them with clean, continuous lines. This indicator helps traders visualize market structure, trend shifts, and swing-based support/resistance levels at a glance.
The script identifies each confirmed swing point based on a user-defined lookback window (left/right bars). When a new swing is confirmed, the indicator updates the previous leg or creates a new one, effectively drawing the classic “zigzag-style” connections used in discretionary trading and price-action analysis.
A dynamic tail extension is included to show the most recent swing extending toward the current price. By default, the tail follows a ZigZag-style logic—extending upward after a swing low and downward after a swing high—but users can also anchor it to Close, High, Low, or HL2.
Features
Automatic detection of swing highs and swing lows
Clean line connections between swings (similar to discretionary market-structure mapping)
Proper consolidation handling: weaker highs/lows are ignored
Optional ZigZag-style dynamic tail extension
Fully customizable lookback window, line color, and line width
Works on any market and timeframe
Use Cases
Identifying market structure (HH, HL, LH, LL)
Visualizing trend transitions
Spotting breakout levels and swing-based support/resistance
Aiding discretionary swing trading, trend following, or pattern recognition
This indicator keeps the logic simple and visual—ideal for traders who prefer clean chart structure without unnecessary noise.
支撑和阻力
Malaysian SNR Levels - Fixed Range# Malaysian SNR Levels - Fixed Range
This indicator displays support and resistance levels based on Malaysian SnR methodology, but calculates levels exclusively from a **user-defined time range** instead of a fixed number of bars lookback.
## What is Malaysian SnR?
Malaysian SnR defines Support and Resistance not as areas but as precise levels based on a line chart's peaks and valleys. There are three types of horizontal levels:
### Level Types
**A-Level**: Located at the peak of the line chart, shaped like the letter "A"
**V-Level**: Located at the valley of the line chart, shaped like the letter "V"
**Gap Level**: Located at the Close/Open gap between two candles of the same color
## Fresh vs. Unfresh Levels
What makes Malaysian SnR unique is the **Fresh/Unfresh state** of levels:
- **Fresh Level** (solid line): Has not been tested by a wick yet, or has been crossed by a candle body since the last wick touch
- **Unfresh Level** (dashed line): Has been touched by a wick
Fresh levels are considered more significant as they have a higher probability of causing price reactions.
## Fixed Range Innovation
Unlike the standard Malaysian SNR indicator that uses a bars lookback period, this **Fixed Range version** allows you to:
- Select a specific **Start Time** and **End Time** to define your analysis period
- Calculate levels exclusively from bars within this time range
- Analyze historical periods precisely (e.g., "levels from Q1 2024")
- Study how levels from specific market phases perform
- Visualize the selected time range with a transparent background overlay
This is particularly useful for:
- Analyzing levels from specific market events or sessions
- Studying quarterly or monthly ranges
- Backtesting level significance from defined periods
- Forward-testing levels formed during key accumulation/distribution phases
## Parameters
### TIME RANGE SELECTION
- **Start Time**: Beginning of the time range for level calculation
- **End Time**: End of the time range for level calculation
- **Extend Levels Right**: Extend levels to the right edge of the chart
### LEVEL SETTINGS
- **Display Gap Levels**: Show/hide gap levels
- **Display Opening Gaps**: Show/hide gap visualization boxes
- **Display Fresh Levels Only**: Hide unfresh/tested levels
- **Display Break Count**: Show how many times each level has been broken
- **Evaluate Current Bar**: Use the current bar to evaluate level freshness
### LEVEL DISPLAY
- **Level Regions**: Calculate levels relative to current Price or bar's High/Low
- **Levels Above**: Number of closest levels to display above price/high
- **Levels Below**: Number of closest levels to display below price/low
- **Max Level Breaks**: Hide levels broken more than this number of times
### VISUAL SETTINGS
- **Line Color**: Color of the level lines
- **Line Width**: Thickness of level lines
- **Show Time Zone Background**: Display transparent background for selected range
- **Zone Background Color**: Customize background color and transparency
- **Timeframe**: The timeframe used for calculating SNR levels
## Trading Applications
### Example Strategy:
1. Select a significant time range (e.g., a major accumulation zone)
2. Identify fresh levels from that period
3. Wait for price to approach these levels on a higher timeframe
4. Switch to lower timeframe to confirm price reaction
5. Fresh support + bullish reaction = potential buy signal
6. Fresh resistance + bearish reaction = potential sell signal
### Use Cases:
- **Session Analysis**: Study levels from Asian/European/US sessions
- **Event-Based Levels**: Analyze levels formed during specific news events
- **Quarterly Ranges**: Track levels from previous quarters
- **Accumulation Zones**: Identify key levels from consolidation periods
## Visual Features
- **Solid lines** = Fresh levels (untested or re-validated)
- **Dashed lines** = Unfresh levels (tested by wicks)
- **Numbers on levels** = Break count (how many times broken)
- **Transparent boxes** = Opening gaps between same-colored candles
- **Background shading** = Selected time range visualization
## Notes
- The indicator processes only bars within the selected time range
- Levels are tested for freshness using all available bars (including those outside the range)
- Break count shows how many times the level has been broken by candle bodies
- The background helps visualize which time period was used for level formation
---
**Tip**: Combine this with the standard Malaysian SNR indicator to compare recent levels (bars lookback) with historical levels (fixed range) for comprehensive multi-timeframe analysis.
Adam Mancini ES Levels🧭 Script Objective
Displays horizontal support and resistance levels (major, minor, and trigger zones) for quick price reaction analysis. I extract these levels from tradecompanion.substack.com Adam mancini daily newsletters
⚙️ Customize Levels
Open the Settings (⚙️) of the indicator and under **Inputs**, enter your price levels separated by commas:
- Majors → for key support/resistance levels (red lines)
- Short Triggers → for important short entry zones (thicker red lines)
- Non Majors → for minor levels (blue lines)
Example levels on 21-11-2025:
Short triggers:
6542,6606,6622,6664,6685,6701
Majors:
6468, 6484, 6500, 6506, 6512, 6519, 6530, 6542, 6553, 6572, 6581, 6588, 6605, 6622, 6638, 6685, 6701, 6723, 6742
Non Majors:
6477, 6480, 6489, 6516, 6522, 6535, 6546, 6563, 6577, 6585, 6593, 6597, 6617, 6626, 6631, 6652, 6658, 6674, 6692, 6705, 6712, 6716, 6733
Bull Trend Bear Trend - Inspired By Sci the Goat Bull Trend Bear Trend - Market Structure & S/R Indicator
A comprehensive swing trading indicator that identifies market structure, support/resistance zones, and trend-based entry signals for intraday and swing traders.
Key Features:
📊 Market Structure Detection
Automatically identifies Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL)
Labels Equal Highs (EH) and Equal Lows (EL) for consolidation zones
Clear visual labels on swing points for easy trend analysis
🎯 Dynamic Support & Resistance
Detects consolidation zones where price has bounced multiple times (2+ touches)
Yellow horizontal lines mark current top resistance and bottom support
Focuses on most recent and relevant S/R levels to reduce chart clutter
Transparent yellow bars highlight when price approaches key levels
📈 1HR Trend Analysis
Real-time trend status displayed in top-right corner
"BULL" (green) or "BEAR" (red) indicator based on 1hr market structure
Helps align lower timeframe trades with higher timeframe trend
🎨 Visual Entry Signals
Green bars + triangle arrows for buy signals (bullish market structure + momentum)
Red bars + triangle arrows for sell signals (bearish market structure + momentum)
Signals only trigger when trend structure aligns with momentum indicators (RSI, MACD, EMA)
How To Use:
Check the 1HR TREND display to know the overall market direction
Wait for price to approach yellow S/R zones
Look for HH/HL pattern in uptrend or LH/LL pattern in downtrend
Enter on green (buy) or red (sell) signal bars with confirmation arrows
Best used on 5min and 15min timeframes for entries while respecting 1hr trend
Settings:
Swing Lookback: Controls sensitivity of swing point detection (default: 5)
S/R Lookback Period: Historical range for support/resistance (default: 20)
S/R Threshold %: Distance from S/R to trigger alerts (default: 2%)
Equal High/Low Threshold: Tolerance for detecting equal levels (default: 0.3%)
Alerts Available:
Buy Signal: Bullish market structure entry detected
Sell Signal: Bearish market structure entry detected
Near S/R: Price approaching major support/resistance zone
Best For:
Swing trading on 1hr timeframe
Intraday scalping on 5min/15min with 1hr trend confirmation
Identifying institutional support/resistance zones
Structure-based trading strategies
Note: This indicator combines multiple timeframe analysis, market structure, and momentum confirmation. Always use proper risk management and confirm signals with your trading strategy.
Bifurcation Zone - CAEBifurcation Zone — Cognitive Adversarial Engine (BZ-CAE)
Bifurcation Zone — CAE (BZ-CAE) is a next-generation divergence detection system enhanced by a Cognitive Adversarial Engine that evaluates both sides of every potential trade before presenting signals. Unlike traditional divergence indicators that show every price-oscillator disagreement regardless of context, BZ-CAE applies comprehensive market-state intelligence to identify only the divergences that occur in favorable conditions with genuine probability edges.
The system identifies structural bifurcation points — critical junctures where price and momentum disagree, signaling potential reversals or continuations — then validates these opportunities through five interconnected intelligence layers: Trend Conviction Scoring , Directional Momentum Alignment , Multi-Factor Exhaustion Modeling , Adversarial Validation , and Confidence Scoring . The result is a selective, context-aware signal system that filters noise and highlights high-probability setups.
This is not a "buy the arrow" indicator. It's a decision support framework that teaches you how to read market state, evaluate divergence quality, and make informed trading decisions based on quantified intelligence rather than hope.
What Sets BZ-CAE Apart: Technical Architecture
The Problem With Traditional Divergence Indicators
Most divergence indicators operate on a simple rule: if price makes a higher high and RSI makes a lower high, show a bearish signal. If price makes a lower low and RSI makes a higher low, show a bullish signal. This creates several critical problems:
Context Blindness : They show counter-trend signals in powerful trends that rarely reverse, leading to repeated losses as you fade momentum.
Signal Spam : Every minor price-oscillator disagreement generates an alert, overwhelming you with low-quality setups and creating analysis paralysis.
No Quality Ranking : All signals are treated identically. A marginal divergence in choppy conditions receives the same visual treatment as a high-conviction setup at a major exhaustion point.
Single-Sided Evaluation : They ask "Is this a good long?" without checking if the short case is overwhelmingly stronger, leading you into obvious bad trades.
Static Configuration : You manually choose RSI 14 or Stochastic 14 and hope it works, with no systematic way to validate if that's optimal for your instrument.
BZ-CAE's Solution: Cognitive Adversarial Intelligence
BZ-CAE solves these problems through an integrated five-layer intelligence architecture:
1. Trend Conviction Score (TCS) — 0 to 1 Scale
Most indicators check if ADX is above 25 to determine "trending" conditions. This binary approach misses nuance. TCS is a weighted composite metric:
Formula : 0.35 × normalize(ADX, 10, 35) + 0.35 × structural_strength + 0.30 × htf_alignment
Structural Strength : 10-bar SMA of consecutive directional bars. Captures persistence — are bulls or bears consistently winning?
HTF Alignment : Multi-timeframe EMA stacking (20/50/100/200). When all EMAs align in the same direction, you're in institutional trend territory.
Purpose : Quantifies how "locked in" the trend is. When TCS exceeds your threshold (default 0.80), the system knows to avoid counter-trend trades unless other factors override.
Interpretation :
TCS > 0.85: Very strong trend — counter-trading is extremely high risk
TCS 0.70-0.85: Strong trend — favor continuation, require exhaustion for reversals
TCS 0.50-0.70: Moderate trend — context matters, both directions viable
TCS < 0.50: Weak/choppy — reversals more viable, range-bound conditions
2. Directional Momentum Alignment (DMA) — ATR-Normalized
Formula : (EMA21 - EMA55) / ATR14
This isn't just "price above EMA" — it's a regime-aware momentum gauge. The same $100 price movement reads completely differently in high-volatility crypto versus low-volatility forex. By normalizing with ATR, DMA adapts its interpretation to current market conditions.
Purpose : Quantifies the directional "force" behind current price action. Positive = bullish push, negative = bearish push. Magnitude = strength.
Interpretation :
DMA > 0.7: Strong bullish momentum — bearish divergences risky
DMA 0.3 to 0.7: Moderate bullish bias
DMA -0.3 to 0.3: Balanced/choppy conditions
DMA -0.7 to -0.3: Moderate bearish bias
DMA < -0.7: Strong bearish momentum — bullish divergences risky
3. Multi-Factor Exhaustion Modeling — 0 to 1 Probability
Single-metric exhaustion detection (like "RSI > 80") misses complex market states. BZ-CAE aggregates five independent exhaustion signals:
Volume Spikes : Current volume versus 50-bar average
2.5x average: 0.25 weight
2.0x average: 0.15 weight
1.5x average: 0.10 weight
Divergence Present : The fact that a divergence exists contributes 0.30 weight — structural momentum disagreement is itself an exhaustion signal.
RSI Extremes : Captures oscillator climax zones
RSI > 80 or < 20: 0.25 weight
RSI > 75 or < 25: 0.15 weight
Pin Bar Detection : Identifies rejection candles (2:1 wick-to-body ratio, indicating failed breakout attempts): 0.15 weight
Extended Runs : Consecutive bars above/below EMA20 without pullback
30+ bars: 0.15 weight (market hasn't paused to consolidate)
Total exhaustion score is the sum of all applicable weights, capped at 1.0.
Purpose : Detects when strong trends become vulnerable to reversal. High exhaustion can override trend filters, allowing counter-trend trades at genuine turning points that basic indicators would miss.
Interpretation :
Exhaustion > 0.75: High probability of climax — yellow background shading alerts you visually
Exhaustion 0.50-0.75: Moderate overextension — watch for confirmation
Exhaustion < 0.50: Fresh move — trend can continue, counter-trend trades higher risk
4. Adversarial Validation — Game Theory Applied to Trading
This is BZ-CAE's signature innovation. Before approving any signal, the engine quantifies BOTH sides of the trade simultaneously:
For Bullish Divergences , it calculates:
Bull Case Score (0-1+) :
Distance below EMA20 (pullback quality): up to 0.25
Bullish EMA alignment (close > EMA20 > EMA50): 0.25
Oversold RSI (< 40): 0.25
Volume confirmation (> 1.2x average): 0.25
Bear Case Score (0-1+) :
Price below EMA50 (structural weakness): 0.30
Very oversold RSI (< 30, indicating knife-catching): 0.20
Differential = Bull Case - Bear Case
If differential < -0.10 (default threshold), the bear case is dominating — signal is BLOCKED or ANNOTATED.
For Bearish Divergences , the logic inverts (Bear Case vs Bull Case).
Purpose : Prevents trades where you're fighting obvious strength in the opposite direction. This is institutional-grade risk management — don't just evaluate your trade, evaluate the counter-trade simultaneously.
Why This Matters : You might see a bullish divergence at a local low, but if price is deeply below major support EMAs with strong bearish momentum, you're catching a falling knife. The adversarial check catches this and blocks the signal.
5. Confidence Scoring — 0 to 1 Quality Assessment
Every signal that passes initial filters receives a comprehensive quality score:
Formula :
0.30 × normalize(TCS) // Trend context
+ 0.25 × normalize(|DMA|) // Momentum magnitude
+ 0.20 × pullback_quality // Entry distance from EMA20
+ 0.15 × state_quality // ADX + alignment + structure
+ 0.10 × divergence_strength // Slope separation magnitude
+ adversarial_bonus (0-0.30) // Your side's advantage
Purpose : Ranks setup quality for filtering and position sizing decisions. You can set a minimum confidence threshold (default 0.35) to ensure only quality setups reach your chart.
Interpretation :
Confidence > 0.70: Premium setup — consider increased position size
Confidence 0.50-0.70: Good quality — standard size
Confidence 0.35-0.50: Acceptable — reduced size or skip if conservative
Confidence < 0.35: Marginal — blocked in Filtering mode, annotated in Advisory mode
CAE Operating Modes: Learning vs Enforcement
Off : Disables all CAE logic. Raw divergence pipeline only. Use for baseline comparison.
Advisory : Shows ALL signals regardless of CAE evaluation, but annotates signals that WOULD be blocked with specific warnings (e.g., "Bull: strong downtrend (TCS=0.87)" or "Adversarial bearish"). This is your learning mode — see CAE's decision logic in action without missing educational opportunities.
Filtering : Actively blocks low-quality signals. Only setups that pass all enabled gates (Trend Filter, Adversarial Validation, Confidence Gating) reach your chart. This is your live trading mode — trust the system to enforce discipline.
CAE Filter Gates: Three-Layer Protection
When CAE is enabled, signals must pass through three independent gates (each can be toggled on/off):
Gate 1: Strong Trend Filter
If TCS ≥ tcs_threshold (default 0.80)
And signal is counter-trend (bullish in downtrend or bearish in uptrend)
And exhaustion < exhaustion_required (default 0.50)
Then: BLOCK signal
Logic: Don't fade strong trends unless the move is clearly overextended
Gate 2: Adversarial Validation
Calculate both bull case and bear case scores
If opposing case dominates by more than adv_threshold (default 0.10)
Then: BLOCK signal
Logic: Avoid trades where you're fighting obvious strength in the opposite direction
Gate 3: Confidence Gating
Calculate composite confidence score (0-1)
If confidence < min_confidence (default 0.35)
Then: In Filtering mode, BLOCK signal; in Advisory mode, ANNOTATE with warning
Logic: Only take setups with minimum quality threshold
All three gates work together. A signal must pass ALL enabled gates to fire.
Visual Intelligence System
Bifurcation Zones (Supply/Demand Blocks)
When a divergence signal fires, BZ-CAE draws a semi-transparent box extending 15 bars forward from the signal pivot:
Demand Zones (Bullish) : Theme-colored box (cyan in Cyberpunk, blue in Professional, etc.) labeled "Demand" — marks where smart money likely placed buy orders as price diverged at the low.
Supply Zones (Bearish) : Theme-colored box (magenta in Cyberpunk, orange in Professional) labeled "Supply" — marks where smart money likely placed sell orders as price diverged at the high.
Theory : Divergences represent institutional disagreement with the crowd. The crowd pushed price to an extreme (new high or low), but momentum (oscillator) is waning, indicating smart money is taking the opposite side. These zones mark order placement areas that become future support/resistance.
Use Cases :
Exit targets: Take profit when price returns to opposite-side zone
Re-entry levels: If price returns to your entry zone, consider adding
Stop placement: Place stops just beyond your zone (below demand, above supply)
Auto-Cleanup : System keeps the last 20 zones to prevent chart clutter.
Adversarial Bar Coloring — Real-Time Market Debate Heatmap
Each bar is colored based on the Bull Case vs Bear Case differential:
Strong Bull Advantage (diff > 0.3): Full theme bull color (e.g., cyan)
Moderate Bull Advantage (diff > 0.1): 50% transparency bull
Neutral (diff -0.1 to 0.1): Gray/neutral theme
Moderate Bear Advantage (diff < -0.1): 50% transparency bear
Strong Bear Advantage (diff < -0.3): Full theme bear color (e.g., magenta)
This creates a real-time visual heatmap showing which side is "winning" the market debate. When bars flip from cyan to magenta (or vice versa), you're witnessing a shift in adversarial advantage — a leading indicator of potential momentum changes.
Exhaustion Shading
When exhaustion score exceeds 0.75, the chart background displays a semi-transparent yellow highlight. This immediate visual warning alerts you that the current move is at high risk of reversal, even if trend indicators remain strong.
Visual Themes — Six Aesthetic Options
Cyberpunk : Cyan/Magenta/Yellow — High contrast, neon aesthetic, excellent for dark-themed trading environments
Professional : Blue/Orange/Green — Corporate color palette, suitable for presentations and professional documentation
Ocean : Teal/Red/Cyan — Aquatic palette, calming for extended monitoring sessions
Fire : Orange/Red/Coral — Warm aggressive colors, high energy
Matrix : Green/Red/Lime — Code aesthetic, homage to classic hacker visuals
Monochrome : White/Gray — Minimal distraction, maximum focus on price action
All visual elements (signal markers, zones, bar colors, dashboard) adapt to your selected theme.
Divergence Engine — Core Detection System
What Are Divergences?
Divergences occur when price action and momentum indicators disagree, creating structural tension that often resolves in a change of direction:
Regular Divergence (Reversal Signal) :
Bearish Regular : Price makes higher high, oscillator makes lower high → Potential trend reversal down
Bullish Regular : Price makes lower low, oscillator makes higher low → Potential trend reversal up
Hidden Divergence (Continuation Signal) :
Bearish Hidden : Price makes lower high, oscillator makes higher high → Downtrend continuation
Bullish Hidden : Price makes higher low, oscillator makes lower low → Uptrend continuation
Both types can be enabled/disabled independently in settings.
Pivot Detection Methods
BZ-CAE uses symmetric pivot detection with separate lookback and lookforward periods (default 5/5):
Pivot High : Bar where high > all highs within lookback range AND high > all highs within lookforward range
Pivot Low : Bar where low < all lows within lookback range AND low < all lows within lookforward range
This ensures structural validity — the pivot must be a clear local extreme, not just a minor wiggle.
Divergence Validation Requirements
For a divergence to be confirmed, it must satisfy:
Slope Disagreement : Price slope and oscillator slope must move in opposite directions (for regular divs) or same direction with inverted highs/lows (for hidden divs)
Minimum Slope Change : |osc_slope| > min_slope_change / 100 (default 1.0) — filters weak, marginal divergences
Maximum Lookback Range : Pivots must be within max_lookback bars (default 60) — prevents ancient, irrelevant divergences
ATR-Normalized Strength : Divergence strength = min(|price_slope| × |osc_slope| × 10, 1.0) — quantifies the magnitude of disagreement in volatility context
Regular divergences receive 1.0× weight; hidden divergences receive 0.8× weight (slightly less reliable historically).
Oscillator Options — Five Professional Indicators
RSI (Relative Strength Index) : Classic overbought/oversold momentum indicator. Best for: General purpose divergence detection across all instruments.
Stochastic : Range-bound %K momentum comparing close to high-low range. Best for: Mean reversion strategies and range-bound markets.
CCI (Commodity Channel Index) : Measures deviation from statistical mean, auto-normalized to 0-100 scale. Best for: Cyclical instruments and commodities.
MFI (Money Flow Index) : Volume-weighted RSI incorporating money flow. Best for: Volume-driven markets like stocks and crypto.
Williams %R : Inverse stochastic looking back over period, auto-adjusted to 0-100. Best for: Reversal detection at extremes.
Each oscillator has adjustable length (2-200, default 14) and smoothing (1-20, default 1). You also set overbought (50-100, default 70) and oversold (0-50, default 30) thresholds.
Signal Timing Modes — Understanding Repainting
BZ-CAE offers two timing policies with complete transparency about repainting behavior:
Realtime (1-bar, peak-anchored)
How It Works :
Detects peaks 1 bar ago using pattern: high > high AND high > high
Signal prints on the NEXT bar after peak detection (bar_index)
Visual marker anchors to the actual PEAK bar (bar_index - 1, offset -1)
Signal locks in when bar CONFIRMS (closes)
Repainting Behavior :
On the FORMING bar (before close), the peak condition may change as new prices arrive
Once bar CLOSES (barstate.isconfirmed), signal is locked permanently
This is preview/early warning behavior by design
Best For :
Active monitoring and immediate alerts
Learning the system (seeing signals develop in real-time)
Responsive entry if you're watching the chart live
Confirmed (lookforward)
How It Works :
Uses Pine Script's built-in ta.pivothigh() and ta.pivotlow() functions
Requires full pivot validation period (lookback + lookforward bars)
Signal prints pivot_lookforward bars after the actual peak (default 5-bar delay)
Visual marker anchors to the actual peak bar (offset -pivot_lookforward)
No Repainting Behavior
Best For :
Backtesting and historical analysis
Conservative entries requiring full confirmation
Automated trading systems
Swing trading with larger timeframes
Tradeoff :
Delayed entry by pivot_lookforward bars (typically 5 bars)
On a 5-minute chart, this is a 25-minute delay
On a 4-hour chart, this is a 20-hour delay
Recommendation : Use Confirmed for backtesting to verify system performance honestly. Use Realtime for live monitoring only if you're actively watching the chart and understand pre-confirmation repainting behavior.
Signal Spacing System — Anti-Spam Architecture
Even after CAE filtering, raw divergences can cluster. The spacing system enforces separation:
Three Independent Filters
1. Min Bars Between ANY Signals (default 12):
Prevents rapid-fire clustering across both directions
If last signal (bull or bear) was within N bars, block new signal
Ensures breathing room between all setups
2. Min Bars Between SAME-SIDE Signals (default 24, optional enforcement):
Prevents bull-bull or bear-bear spam
Separate tracking for bullish and bearish signal timelines
Toggle enforcement on/off
3. Min ATR Distance From Last Signal (default 0, optional):
Requires price to move N × ATR from last signal location
Ensures meaningful price movement between setups
0 = disabled, 0.5-2.0 = typical range for enabled
All three filters work independently. A signal must pass ALL enabled filters to proceed.
Practical Guidance :
Scalping (1-5m) : Any 6-10, Same-side 12-20, ATR 0-0.5
Day Trading (15m-1H) : Any 12, Same-side 24, ATR 0-1.0
Swing Trading (4H-D) : Any 20-30, Same-side 40-60, ATR 1.0-2.0
Dashboard — Real-Time Control Center
The dashboard (toggleable, four corner positions, three sizes) provides comprehensive system intelligence:
Oscillator Section
Current oscillator type and value
State: OVERBOUGHT / OVERSOLD / NEUTRAL (color-coded)
Length parameter
Cognitive Engine Section
TCS (Trend Conviction Score) :
Current value with emoji state indicator
🔥 = Strong trend (>0.75)
📊 = Moderate trend (0.50-0.75)
〰️ = Weak/choppy (<0.50)
Color: Red if above threshold (trend filter active), yellow if moderate, green if weak
DMA (Directional Momentum Alignment) :
Current value with emoji direction indicator
🐂 = Bullish momentum (>0.5)
⚖️ = Balanced (-0.5 to 0.5)
🐻 = Bearish momentum (<-0.5)
Color: Green if bullish, red if bearish
Exhaustion :
Current value with emoji warning indicator
⚠️ = High exhaustion (>0.75)
🟡 = Moderate (0.50-0.75)
✓ = Low (<0.50)
Color: Red if high, yellow if moderate, green if low
Pullback :
Quality of current distance from EMA20
Values >0.6 are ideal entry zones (not too close, not too far)
Bull Case / Bear Case (if Adversarial enabled):
Current scores for both sides of the market debate
Differential with emoji indicator:
📈 = Bull advantage (>0.2)
➡️ = Balanced (-0.2 to 0.2)
📉 = Bear advantage (<-0.2)
Last Signal Metrics Section (New Feature)
When a signal fires, this section captures and displays:
Signal type (BULL or BEAR)
Bars elapsed since signal
Confidence % at time of signal
TCS value at signal time
DMA value at signal time
Purpose : Provides a historical reference for learning. You can see what the market state looked like when the last signal fired, helping you correlate outcomes with conditions.
Statistics Section
Total Signals : Lifetime count across session
Blocked Signals : Count and percentage (filter effectiveness metric)
Bull Signals : Total bullish divergences
Bear Signals : Total bearish divergences
Purpose : System health monitoring. If blocked % is very high (>60%), filters may be too strict. If very low (<10%), filters may be too loose.
Advisory Annotations
When CAE Mode = Advisory, this section displays warnings for signals that would be blocked in Filtering mode:
Examples:
"Bull spacing: wait 8 bars"
"Bear: strong uptrend (TCS=0.87)"
"Adversarial bearish"
"Low confidence 32%"
Multiple warnings can stack, separated by " | ". This teaches you CAE's decision logic transparently.
How to Use BZ-CAE — Complete Workflow
Phase 1: Initial Setup (First Session)
Apply BZ-CAE to your chart
Select your preferred Visual Theme (Cyberpunk recommended for visibility)
Set Signal Timing to "Confirmed (lookforward)" for learning
Choose your Oscillator Type (RSI recommended for general use, length 14)
Set Overbought/Oversold to 70/30 (standard)
Enable both Regular Divergence and Hidden Divergence
Set Pivot Lookback/Lookforward to 5/5 (balanced structure)
Enable CAE Intelligence
Set CAE Mode to "Advisory" (learning mode)
Enable all three CAE filters: Strong Trend Filter , Adversarial Validation , Confidence Gating
Enable Show Dashboard , position Top Right, size Normal
Enable Draw Bifurcation Zones and Adversarial Bar Coloring
Phase 2: Learning Period (Weeks 1-2)
Goal : Understand how CAE evaluates market state and filters signals.
Activities :
Watch the dashboard during signals :
Note TCS values when counter-trend signals fail — this teaches you the trend strength threshold for your instrument
Observe exhaustion patterns at actual turning points — learn when overextension truly matters
Study adversarial differential at signal times — see when opposing cases dominate
Review blocked signals (orange X-crosses):
In Advisory mode, you see everything — signals that would pass AND signals that would be blocked
Check the advisory annotations to understand why CAE would block
Track outcomes: Were the blocks correct? Did those signals fail?
Use Last Signal Metrics :
After each signal, check the dashboard capture of confidence, TCS, and DMA
Journal these values alongside trade outcomes
Identify patterns: Do confidence >0.70 signals work better? Does your instrument respect TCS >0.85?
Understand your instrument's "personality" :
Trending instruments (indices, major forex) may need TCS threshold 0.85-0.90
Choppy instruments (low-cap stocks, exotic pairs) may work best with TCS 0.70-0.75
High-volatility instruments (crypto) may need wider spacing
Low-volatility instruments may need tighter spacing
Phase 3: Calibration (Weeks 3-4)
Goal : Optimize settings for your specific instrument, timeframe, and style.
Calibration Checklist :
Min Confidence Threshold :
Review confidence distribution in your signal journal
Identify the confidence level below which signals consistently fail
Set min_confidence slightly above that level
Day trading : 0.35-0.45
Swing trading : 0.40-0.55
Scalping : 0.30-0.40
TCS Threshold :
Find the TCS level where counter-trend signals consistently get stopped out
Set tcs_threshold at or slightly below that level
Trending instruments : 0.85-0.90
Mixed instruments : 0.80-0.85
Choppy instruments : 0.75-0.80
Exhaustion Override Level :
Identify exhaustion readings that marked genuine reversals
Set exhaustion_required just below the average
Typical range : 0.45-0.55
Adversarial Threshold :
Default 0.10 works for most instruments
If you find CAE is too conservative (blocking good trades), raise to 0.15-0.20
If signals are still getting caught in opposing momentum, lower to 0.07-0.09
Spacing Parameters :
Count bars between quality signals in your journal
Set min bars ANY to ~60% of that average
Set min bars SAME-SIDE to ~120% of that average
Scalping : Any 6-10, Same 12-20
Day trading : Any 12, Same 24
Swing : Any 20-30, Same 40-60
Oscillator Selection :
Try different oscillators for 1-2 weeks each
Track win rate and average winner/loser by oscillator type
RSI : Best for general use, clear OB/OS
Stochastic : Best for range-bound, mean reversion
MFI : Best for volume-driven markets
CCI : Best for cyclical instruments
Williams %R : Best for reversal detection
Phase 4: Live Deployment
Goal : Disciplined execution with proven, calibrated system.
Settings Changes :
Switch CAE Mode from Advisory to Filtering
System now actively blocks low-quality signals
Only setups passing all gates reach your chart
Keep Signal Timing on Confirmed for conservative entries
OR switch to Realtime if you're actively monitoring and want faster entries (accept pre-confirmation repaint risk)
Use your calibrated thresholds from Phase 3
Enable high-confidence alerts: "⭐ High Confidence Bullish/Bearish" (>0.70)
Trading Discipline Rules :
Respect Blocked Signals :
If CAE blocks a trade you wanted to take, TRUST THE SYSTEM
Don't manually override — if you consistently disagree, return to Phase 2/3 calibration
The block exists because market state failed intelligence checks
Confidence-Based Position Sizing :
Confidence >0.70: Standard or increased size (e.g., 1.5-2.0% risk)
Confidence 0.50-0.70: Standard size (e.g., 1.0% risk)
Confidence 0.35-0.50: Reduced size (e.g., 0.5% risk) or skip if conservative
TCS-Based Management :
High TCS + counter-trend signal: Use tight stops, quick exits (you're fading momentum)
Low TCS + reversal signal: Use wider stops, trail aggressively (genuine reversal potential)
Exhaustion Awareness :
Exhaustion >0.75 (yellow shading): Market is overextended, reversal risk is elevated — consider early exit or tighter trailing stops even on winning trades
Exhaustion <0.30: Continuation bias — hold for larger move, wide trailing stops
Adversarial Context :
Strong differential against you (e.g., bullish signal with bear diff <-0.2): Use very tight stops, consider skipping
Strong differential with you (e.g., bullish signal with bull diff >0.2): Trail aggressively, this is your tailwind
Practical Settings by Timeframe & Style
Scalping (1-5 Minute Charts)
Objective : High frequency, tight stops, quick reversals in fast-moving markets.
Oscillator :
Type: RSI or Stochastic (fast response to quick moves)
Length: 9-11 (more responsive than standard 14)
Smoothing: 1 (no lag)
OB/OS: 65/35 (looser thresholds ensure frequent crossings in fast conditions)
Divergence :
Pivot Lookback/Lookforward: 3/3 (tight structure, catch small swings)
Max Lookback: 40-50 bars (recent structure only)
Min Slope Change: 0.8-1.0 (don't be overly strict)
CAE :
Mode: Advisory first (learn), then Filtering
Min Confidence: 0.30-0.35 (lower bar for speed, accept more signals)
TCS Threshold: 0.70-0.75 (allow more counter-trend opportunities)
Exhaustion Required: 0.45-0.50 (moderate override)
Strong Trend Filter: ON (still respect major intraday trends)
Adversarial: ON (critical for scalping protection — catches bad entries quickly)
Spacing :
Min Bars ANY: 6-10 (fast pace, many setups)
Min Bars SAME-SIDE: 12-20 (prevent clustering)
Min ATR Distance: 0 or 0.5 (loose)
Timing : Realtime (speed over precision, but understand repaint risk)
Visuals :
Signal Size: Tiny (chart clarity in busy conditions)
Show Zones: Optional (can clutter on low timeframes)
Bar Coloring: ON (helps read momentum shifts quickly)
Dashboard: Small size (corner reference, not main focus)
Key Consideration : Scalping generates noise. Even with CAE, expect lower win rate (45-55%) but aim for favorable R:R (2:1 or better). Size conservatively.
Day Trading (15-Minute to 1-Hour Charts)
Objective : Balance quality and frequency. Standard divergence trading approach.
Oscillator :
Type: RSI or MFI (proven reliability, volume confirmation with MFI)
Length: 14 (industry standard, well-studied)
Smoothing: 1-2
OB/OS: 70/30 (classic levels)
Divergence :
Pivot Lookback/Lookforward: 5/5 (balanced structure)
Max Lookback: 60 bars
Min Slope Change: 1.0 (standard strictness)
CAE :
Mode: Filtering (enforce discipline from the start after brief Advisory learning)
Min Confidence: 0.35-0.45 (quality filter without being too restrictive)
TCS Threshold: 0.80-0.85 (respect strong trends)
Exhaustion Required: 0.50 (balanced override threshold)
Strong Trend Filter: ON
Adversarial: ON
Confidence Gating: ON (all three filters active)
Spacing :
Min Bars ANY: 12 (breathing room between all setups)
Min Bars SAME-SIDE: 24 (prevent bull/bear clusters)
Min ATR Distance: 0-1.0 (optional refinement, typically 0.5-1.0)
Timing : Confirmed (1-bar delay for reliability, no repainting)
Visuals :
Signal Size: Tiny or Small
Show Zones: ON (useful reference for exits/re-entries)
Bar Coloring: ON (context awareness)
Dashboard: Normal size (full visibility)
Key Consideration : This is the "sweet spot" timeframe for BZ-CAE. Market structure is clear, CAE has sufficient data, and signal frequency is manageable. Expect 55-65% win rate with proper execution.
Swing Trading (4-Hour to Daily Charts)
Objective : Quality over quantity. High conviction only. Larger stops and targets.
Oscillator :
Type: RSI or CCI (robust on higher timeframes, smooth longer waves)
Length: 14-21 (capture larger momentum swings)
Smoothing: 1-3
OB/OS: 70/30 or 75/25 (strict extremes)
Divergence :
Pivot Lookback/Lookforward: 5/5 or 7/7 (structural purity, major swings only)
Max Lookback: 80-100 bars (broader historical context)
Min Slope Change: 1.2-1.5 (require strong, undeniable divergence)
CAE :
Mode: Filtering (strict enforcement, premium setups only)
Min Confidence: 0.40-0.55 (high bar for entry)
TCS Threshold: 0.85-0.95 (very strong trend protection — don't fade established HTF trends)
Exhaustion Required: 0.50-0.60 (higher bar for override — only extreme exhaustion justifies counter-trend)
Strong Trend Filter: ON (critical on HTF)
Adversarial: ON (avoid obvious bad trades)
Confidence Gating: ON (quality gate essential)
Spacing :
Min Bars ANY: 20-30 (substantial separation)
Min Bars SAME-SIDE: 40-60 (significant breathing room)
Min ATR Distance: 1.0-2.0 (require meaningful price movement)
Timing : Confirmed (purity over speed, zero repaint for swing accuracy)
Visuals :
Signal Size: Small or Normal (clear markers on zoomed-out view)
Show Zones: ON (important HTF levels)
Bar Coloring: ON (long-term trend awareness)
Dashboard: Normal or Large (comprehensive analysis)
Key Consideration : Swing signals are rare but powerful. Expect 2-5 signals per month per instrument. Win rate should be 60-70%+ due to stringent filtering. Position size can be larger given confidence.
Dashboard Interpretation Reference
TCS (Trend Conviction Score) States
0.00-0.50: Weak/Choppy
Emoji: 〰️
Color: Green/cyan
Meaning: No established trend. Range-bound or consolidating. Both reversal and continuation signals viable.
Action: Reversals (regular divs) are safer. Use wider profit targets (market has room to move). Consider mean reversion strategies.
0.50-0.75: Moderate Trend
Emoji: 📊
Color: Yellow/neutral
Meaning: Developing trend but not locked in. Context matters significantly.
Action: Check DMA and exhaustion. If DMA confirms trend and exhaustion is low, favor continuation (hidden divs). If exhaustion is high, reversals are viable.
0.75-0.85: Strong Trend
Emoji: 🔥
Color: Orange/warning
Meaning: Well-established trend with persistence. Counter-trend is high risk.
Action: Require exhaustion >0.50 for counter-trend entries. Favor continuation signals. Use tight stops on counter-trend attempts.
0.85-1.00: Very Strong Trend
Emoji: 🔥🔥
Color: Red/danger (if counter-trading)
Meaning: Locked-in institutional trend. Extremely high risk to fade.
Action: Avoid counter-trend unless exhaustion >0.75 (yellow shading). Focus exclusively on continuation opportunities. Momentum is king here.
DMA (Directional Momentum Alignment) Zones
-2.0 to -1.0: Strong Bearish Momentum
Emoji: 🐻🐻
Color: Dark red
Meaning: Powerful downside force. Sellers are in control.
Action: Bullish divergences are counter-momentum (high risk). Bearish divergences are with-momentum (lower risk). Size down on longs.
-0.5 to 0.5: Neutral/Balanced
Emoji: ⚖️
Color: Gray/neutral
Meaning: No strong directional bias. Choppy or consolidating.
Action: Both directions have similar probability. Focus on confidence score and adversarial differential for edge.
1.0 to 2.0: Strong Bullish Momentum
Emoji: 🐂🐂
Color: Bright green/cyan
Meaning: Powerful upside force. Buyers are in control.
Action: Bearish divergences are counter-momentum (high risk). Bullish divergences are with-momentum (lower risk). Size down on shorts.
Exhaustion States
0.00-0.50: Fresh Move
Emoji: ✓
Color: Green
Meaning: Trend is healthy, not overextended. Room to run.
Action: Counter-trend trades are premature. Favor continuation. Hold winners for larger moves. Avoid early exits.
0.50-0.75: Mature Move
Emoji: 🟡
Color: Yellow
Meaning: Move is aging. Watch for signs of climax.
Action: Tighten trailing stops on winning trades. Be ready for reversals. Don't add to positions aggressively.
0.75-0.85: High Exhaustion
Emoji: ⚠️
Color: Orange
Background: Yellow shading appears
Meaning: Move is overextended. Reversal risk elevated significantly.
Action: Counter-trend reversals are higher probability. Consider early exits on with-trend positions. Size up on reversal divergences (if CAE allows).
0.85-1.00: Critical Exhaustion
Emoji: ⚠️⚠️
Color: Red
Background: Yellow shading intensifies
Meaning: Climax conditions. Reversal imminent or underway.
Action: Aggressive reversal trades justified. Exit all with-trend positions. This is where major turns occur.
Confidence Score Tiers
0.00-0.30: Low Quality
Color: Red
Status: Blocked in Filtering mode
Action: Skip entirely. Setup lacks fundamental quality across multiple factors.
0.30-0.50: Moderate Quality
Color: Yellow/orange
Status: Marginal — passes in Filtering only if >min_confidence
Action: Reduced position size (0.5-0.75% risk). Tight stops. Conservative profit targets. Skip if you're selective.
0.50-0.70: High Quality
Color: Green/cyan
Status: Good setup across most quality factors
Action: Standard position size (1.0-1.5% risk). Normal stops and targets. This is your bread-and-butter trade.
0.70-1.00: Premium Quality
Color: Bright green/gold
Status: Exceptional setup — all factors aligned
Visual: Double confidence ring appears
Action: Consider increased position size (1.5-2.0% risk, maximum). Wider stops. Larger targets. High probability of success. These are rare — capitalize when they appear.
Adversarial Differential Interpretation
Bull Differential > 0.3 :
Visual: Strong cyan/green bar colors
Meaning: Bull case strongly dominates. Buyers have clear advantage.
Action: Bullish divergences favored (with-advantage). Bearish divergences face headwind (reduce size or skip). Momentum is bullish.
Bull Differential 0.1 to 0.3 :
Visual: Moderate cyan/green transparency
Meaning: Moderate bull advantage. Buyers have edge but not overwhelming.
Action: Both directions viable. Slight bias toward longs.
Differential -0.1 to 0.1 :
Visual: Gray/neutral bars
Meaning: Balanced debate. No clear advantage either side.
Action: Rely on other factors (confidence, TCS, exhaustion) for direction. Adversarial is neutral.
Bear Differential -0.3 to -0.1 :
Visual: Moderate red/magenta transparency
Meaning: Moderate bear advantage. Sellers have edge but not overwhelming.
Action: Both directions viable. Slight bias toward shorts.
Bear Differential < -0.3 :
Visual: Strong red/magenta bar colors
Meaning: Bear case strongly dominates. Sellers have clear advantage.
Action: Bearish divergences favored (with-advantage). Bullish divergences face headwind (reduce size or skip). Momentum is bearish.
Last Signal Metrics — Post-Trade Analysis
After a signal fires, dashboard captures:
Type : BULL or BEAR
Bars Ago : How long since signal (updates every bar)
Confidence : What was the quality score at signal time
TCS : What was trend conviction at signal time
DMA : What was momentum alignment at signal time
Use Case : Post-trade journaling and learning.
Example: "BULL signal 12 bars ago. Confidence: 68%, TCS: 0.42, DMA: -0.85"
Analysis : This was a bullish reversal (regular div) with good confidence, weak trend (TCS), but strong bearish momentum (DMA). The bet was that momentum would reverse — a counter-momentum play requiring exhaustion confirmation. Check if exhaustion was high at that time to justify the entry.
Track patterns:
Do your best trades have confidence >0.65?
Do low-TCS signals (<0.50) work better for you?
Are you more successful with-momentum (DMA aligned with signal) or counter-momentum?
Troubleshooting Guide
Problem: No Signals Appearing
Symptoms : Chart loads, dashboard shows metrics, but no divergence signals fire.
Diagnosis Checklist :
Check dashboard oscillator value : Is it crossing OB/OS levels (70/30)? If oscillator stays in 40-60 range constantly, it can't reach extremes needed for divergence detection.
Are pivots forming? : Look for local swing highs/lows on your chart. If price is in tight consolidation, pivots may not meet lookback/lookforward requirements.
Is spacing too tight? : Check "Last Signal" metrics — how many bars since last signal? If <12 and your min_bars_ANY is 12, spacing filter is blocking.
Is CAE blocking everything? : Check dashboard Statistics section — what's the blocked signal count? High blocks indicate overly strict filters.
Solutions :
Loosen OB/OS Temporarily :
Try 65/35 to verify divergence detection works
If signals appear, the issue was threshold strictness
Gradually tighten back to 67/33, then 70/30 as appropriate
Lower Min Confidence :
Try 0.25-0.30 (diagnostic level)
If signals appear, filter was too strict
Raise gradually to find sweet spot (0.35-0.45 typical)
Disable Strong Trend Filter Temporarily :
Turn off in CAE settings
If signals appear, TCS threshold was blocking everything
Re-enable and lower TCS_threshold to 0.70-0.75
Reduce Min Slope Change :
Try 0.7-0.8 (from default 1.0)
Allows weaker divergences through
Helpful on low-volatility instruments
Widen Spacing :
Set min_bars_ANY to 6-8
Set min_bars_SAME_SIDE to 12-16
Reduces time between allowed signals
Check Timing Mode :
If using Confirmed, remember there's a pivot_lookforward delay (5+ bars)
Switch to Realtime temporarily to verify system is working
Realtime has no delay but repaints
Verify Oscillator Settings :
Length 14 is standard but might not fit all instruments
Try length 9-11 for faster response
Try length 18-21 for slower, smoother response
Problem: Too Many Signals (Signal Spam)
Symptoms : Dashboard shows 50+ signals in Statistics, confidence scores mostly <0.40, signals clustering close together.
Solutions :
Raise Min Confidence :
Try 0.40-0.50 (quality filter)
Blocks bottom-tier setups
Targets top 50-60% of divergences only
Tighten OB/OS :
Use 70/30 or 75/25
Requires more extreme oscillator readings
Reduces false divergences in mid-range
Increase Min Slope Change :
Try 1.2-1.5 (from default 1.0)
Requires stronger, more obvious divergences
Filters marginal slope disagreements
Raise TCS Threshold :
Try 0.85-0.90 (from default 0.80)
Stricter trend filter blocks more counter-trend attempts
Favors only strongest trend alignment
Enable ALL CAE Gates :
Turn on Trend Filter + Adversarial + Confidence
Triple-layer protection
Blocks aggressively — expect 20-40% reduction in signals
Widen Spacing :
min_bars_ANY: 15-20 (from 12)
min_bars_SAME_SIDE: 30-40 (from 24)
Creates substantial breathing room
Switch to Confirmed Timing :
Removes realtime preview noise
Ensures full pivot validation
5-bar delay filters many false starts
Problem: Signals in Strong Trends Get Stopped Out
Symptoms : You take a bullish divergence in a downtrend (or bearish in uptrend), and it immediately fails. Dashboard showed high TCS at the time.
Analysis : This is INTENDED behavior — CAE is protecting you from low-probability counter-trend trades.
Understanding :
Check Last Signal Metrics in dashboard — what was TCS when signal fired?
If TCS was >0.85 and signal was counter-trend, CAE correctly identified it as high risk
Strong trends rarely reverse cleanly without major exhaustion
Your losses here are the system working as designed (blocking bad odds)
If You Want to Override (Not Recommended) :
Lower TCS_threshold to 0.70-0.75 (allows more counter-trend)
Lower exhaustion_required to 0.40 (easier override)
Disable Strong Trend Filter entirely (very risky)
Better Approach :
TRUST THE FILTER — it's preventing costly mistakes
Wait for exhaustion >0.75 (yellow shading) before counter-trending strong TCS
Focus on continuation signals (hidden divs) in high-TCS environments
Use Advisory mode to see what CAE is blocking and learn from outcomes
Problem: Adversarial Blocking Seems Wrong
Symptoms : You see a divergence that "looks good" visually, but CAE blocks with "Adversarial bearish/bullish" warning.
Diagnosis :
Check dashboard Bull Case and Bear Case scores at that moment
Look at Differential value
Check adversarial bar colors — was there strong coloring against your intended direction?
Understanding :
Adversarial catches "obvious" opposing momentum that's easy to miss
Example: Bullish divergence at a local low, BUT price is deeply below EMA50, bearish momentum is strong, and RSI shows knife-catching conditions
Bull Case might be 0.20 while Bear Case is 0.55
Differential = -0.35, far beyond threshold
Block is CORRECT — you'd be fighting overwhelming opposing flow
If You Disagree Consistently
Review blocked signals on chart — scroll back and check outcomes
Did those blocked signals actually work, or did they fail as adversarial predicted?
Raise adv_threshold to 0.15-0.20 (more permissive, allows closer battles)
Disable Adversarial Validation temporarily (diagnostic) to isolate its effect
Use Advisory mode to learn adversarial patterns over 50-100 signals
Remember : Adversarial is conservative BY DESIGN. It prevents "obvious" bad trades where you're fighting strong strength the other way.
Problem: Dashboard Not Showing or Incomplete
Solutions :
Toggle "Show Dashboard" to ON in settings
Try different dashboard sizes (Small/Normal/Large)
Try different positions (Top Left/Right, Bottom Left/Right) — might be off-screen
Some sections require CAE Enable = ON (Cognitive Engine section won't appear if CAE is disabled)
Statistics section requires at least 1 lifetime signal to populate
Check that visual theme is set (dashboard colors adapt to theme)
Problem: Performance Lag, Chart Freezing
Symptoms : Chart loading is slow, indicator calculations cause delays, pinch-to-zoom lags.
Diagnosis : Visual features are computationally expensive, especially adversarial bar coloring (recalculates every bar).
Solutions (In Order of Impact) :
Disable Adversarial Bar Coloring (MOST EXPENSIVE):
Turn OFF "Adversarial Bar Coloring" in settings
This is the single biggest performance drain
Immediate improvement
Reduce Vertical Lines :
Lower "Keep last N vertical lines" to 20-30
Or set to 0 to disable entirely
Moderate improvement
Disable Bifurcation Zones :
Turn OFF "Draw Bifurcation Zones"
Reduces box drawing calculations
Moderate improvement
Set Dashboard Size to Small :
Smaller dashboard = fewer cells = less rendering
Minor improvement
Use Shorter Max Lookback :
Reduce max_lookback to 40-50 (from 60+)
Fewer bars to scan for divergences
Minor improvement
Disable Exhaustion Shading :
Turn OFF "Show Market State"
Removes background coloring calculations
Minor improvement
Extreme Performance Mode :
Disable ALL visual enhancements
Keep only triangle markers
Dashboard Small or OFF
Use Minimal theme if available
Problem: Realtime Signals Repainting
Symptoms : You see a signal appear, but on next bar it disappears or moves.
Explanation :
Realtime mode detects peaks 1 bar ago: high > high AND high > high
On the FORMING bar (before close), this condition can change as new prices arrive
Example: At 10:05, high (10:04 bar) was 100, current high is 99 → peak detected
At 10:05:30, new high of 101 arrives → peak condition breaks → signal disappears
At 10:06 (bar close), final high is 101 → no peak at 10:04 anymore → signal gone permanently
This is expected behavior for realtime responsiveness. You get preview/early warning, but it's not locked until bar confirms.
Solutions :
Use Confirmed Timing :
Switch to "Confirmed (lookforward)" mode
ZERO repainting — pivot must be fully validated
5-bar delay (pivot_lookforward)
What you see in history is exactly what would have appeared live
Accept Realtime Repaint as Tradeoff :
Keep Realtime mode for speed and alerts
Understand that pre-confirmation signals may vanish
Only trade signals that CONFIRM at bar close (check barstate.isconfirmed)
Use for live monitoring, NOT for backtesting
Trade Only After Confirmation :
In Realtime mode, wait 1 full bar after signal appears before entering
If signal survives that bar close, it's locked
This adds 1-bar delay but removes repaint risk
Recommendation : Use Confirmed for backtesting and conservative trading. Use Realtime only for active monitoring with full understanding of preview behavior.
Risk Management Integration
BZ-CAE is a signal generation system, not a complete trading strategy. You must integrate proper risk management:
Position Sizing by Confidence
Confidence 0.70-1.00 (Premium) :
Risk: 1.5-2.0% of account (MAXIMUM)
Reasoning: High-quality setup across all factors
Still cap at 2% — even premium setups can fail
Confidence 0.50-0.70 (High Quality) :
Risk: 1.0-1.5% of account
Reasoning: Standard good setup
Your bread-and-butter risk level
Confidence 0.35-0.50 (Moderate Quality) :
Risk: 0.5-1.0% of account
Reasoning: Marginal setup, passes minimum threshold
Reduce size or skip if you're selective
Confidence <0.35 (Low Quality) :
Risk: 0% (blocked in Filtering mode)
Reasoning: Insufficient quality factors
System protects you by not showing these
Stop Placement Strategies
For Reversal Signals (Regular Divergences) :
Place stop beyond the divergence pivot plus buffer
Bullish : Stop below the divergence low - 1.0-1.5 × ATR
Bearish : Stop above the divergence high + 1.0-1.5 × ATR
Reasoning: If price breaks the pivot, divergence structure is invalidated
For Continuation Signals (Hidden Divergences) :
Place stop beyond recent swing in opposite direction
Bullish continuation : Stop below recent swing low (not the divergence pivot itself)
Bearish continuation : Stop above recent swing high
Reasoning: You're trading with trend, allow more breathing room
ATR-Based Stops :
1.5-2.0 × ATR is standard
Scale by timeframe:
Scalping (1-5m): 1.0-1.5 × ATR (tight)
Day trading (15m-1H): 1.5-2.0 × ATR (balanced)
Swing (4H-D): 2.0-3.0 × ATR (wide)
Never Use Fixed Dollar/Pip Stops :
Markets have different volatility
50-pip stop on EUR/USD ≠ 50-pip stop on GBP/JPY
Always normalize by ATR or pivot structure
Profit Targets and Scaling
Primary Target :
2-3 × ATR from entry (minimum 2:1 reward-risk)
Example : Entry at 100, ATR = 2, stop at 97 (1.5 × ATR) → target at 106 (3 × ATR) = 2:1 R:R
Scaling Out Strategy :
Take 50% off at 1.5 × ATR (secure partial profit)
Move stop to breakeven
Trail remaining 50% with 1.0 × ATR trailing stop
Let winners run if trend persists
Targets by Confidence :
High Confidence (>0.70) : Aggressive targets (3-4 × ATR), trail wider (1.5 × ATR)
Standard Confidence (0.50-0.70) : Normal targets (2-3 × ATR), standard trail (1.0 × ATR)
Low Confidence (0.35-0.50) : Conservative targets (1.5-2 × ATR), tight trail (0.75 × ATR)
Use Bifurcation Zones :
If opposite-side zone is visible on chart (from previous signal), use it as target
Example : Bullish signal at 100, prior supply zone at 110 → use 110 as target
Zones mark institutional resistance/support
Exhaustion-Based Exits :
If you're in a trade and exhaustion >0.75 develops (yellow shading), consider early exit
Market is overextended — reversal risk is high
Take profit even if target not reached
Trade Management by TCS
High TCS + Counter-Trend Trade (Risky) :
Use very tight stops (1.0-1.5 × ATR)
Conservative targets (1.5-2 × ATR)
Quick exit if trade doesn't work immediately
You're fading momentum — respect it
Low TCS + Reversal Trade (Safer) :
Use wider stops (2.0-2.5 × ATR)
Aggressive targets (3-4 × ATR)
Trail with patience
Genuine reversal potential in weak trend
High TCS + Continuation Trade (Safest) :
Standard stops (1.5-2.0 × ATR)
Very aggressive targets (4-5 × ATR)
Trail wide (1.5-2.0 × ATR)
You're with institutional momentum — let it run
Educational Value — Learning Machine Intelligence
BZ-CAE is designed as a learning platform, not just a tool:
Advisory Mode as Teacher
Most indicators are binary: signal or no signal. You don't learn WHY certain setups are better.
BZ-CAE's Advisory mode shows you EVERY potential divergence, then annotates the ones that would be blocked in Filtering mode with specific reasons:
"Bull: strong downtrend (TCS=0.87)" teaches you that TCS >0.85 makes counter-trend very risky
"Adversarial bearish" teaches you that the opposing case was dominating
"Low confidence 32%" teaches you that the setup lacked quality across multiple factors
"Bull spacing: wait 8 bars" teaches you that signals need breathing room
After 50-100 signals in Advisory mode, you internalize the CAE's decision logic. You start seeing these factors yourself BEFORE the indicator does.
Dashboard Transparency
Most "intelligent" indicators are black boxes — you don't know how they make decisions.
BZ-CAE shows you ALL metrics in real-time:
TCS tells you trend strength
DMA tells you momentum alignment
Exhaustion tells you overextension
Adversarial shows both sides of the debate
Confidence shows composite quality
You learn to interpret market state holistically, a skill applicable to ANY trading system beyond this indicator.
Divergence Quality Education
Not all divergences are equal. BZ-CAE teaches you which conditions produce high-probability setups:
Quality divergence : Regular bullish div at a low, TCS <0.50 (weak trend), exhaustion >0.75 (overextended), positive adversarial differential, confidence >0.70
Low-quality divergence : Regular bearish div at a high, TCS >0.85 (strong uptrend), exhaustion <0.30 (not overextended), negative adversarial differential, confidence <0.40
After using the system, you can evaluate divergences manually with similar intelligence.
Risk Management Discipline
Confidence-based position sizing teaches you to adjust risk based on setup quality, not emotions:
Beginners often size all trades identically
Or worse, size UP on marginal setups to "make up" for losses
BZ-CAE forces systematic sizing: premium setups get larger size, marginal setups get smaller size
This creates a probabilistic approach where your edge compounds over time.
What This Indicator Is NOT
Complete transparency about limitations and positioning:
Not a Prediction System
BZ-CAE does not predict future prices. It identifies structural divergences (price-momentum disagreements) and assesses current market state (trend, exhaustion, adversarial conditions). It tells you WHEN conditions favor a potential reversal or continuation, not WHAT WILL HAPPEN.
Markets are probabilistic. Even premium-confidence setups fail ~30-40% of the time. The system improves your probability distribution over many trades — it doesn't eliminate risk.
Not Fully Automated
This is a decision support tool, not a trading robot. You must:
Execute trades manually based on signals
Manage positions (stops, targets, trailing)
Apply discretionary judgment (news events, liquidity, context)
Integrate with your broader strategy and risk rules
The confidence scores guide position sizing, but YOU determine final risk allocation based on your account size, risk tolerance, and portfolio context.
Not Beginner-Friendly
BZ-CAE requires understanding of:
Divergence trading concepts (regular vs hidden, reversal vs continuation)
Market state interpretation (trend vs range, momentum, exhaustion)
Basic technical analysis (pivots, support/resistance, EMAs)
Risk management fundamentals (position sizing, stops, R:R)
This is designed for intermediate to advanced traders willing to invest time learning the system. If you want "buy the arrow" simplicity, this isn't the tool.
Not a Holy Grail
There is no perfect indicator. BZ-CAE filters noise and improves signal quality significantly, but:
Losing trades are inevitable (even at 70% win rate, 30% still fail)
Market conditions change rapidly (yesterday's strong trend becomes today's chop)
Black swan events occur (fundamentals override technicals)
Execution matters (slippage, fees, emotional discipline)
The system provides an EDGE, not a guarantee. Your job is to execute that edge consistently with proper risk management over hundreds of trades.
Not Financial Advice
BZ-CAE is an educational and analytical tool. All trading decisions are your responsibility. Past performance (backtested or live) does not guarantee future results. Only risk capital you can afford to lose. Consult a licensed financial advisor for investment advice specific to your situation.
Ideal Market Conditions
Best Performance Characteristics
Liquid Instruments :
Major forex pairs (EUR/USD, GBP/USD, USD/JPY)
Large-cap stocks and index ETFs (SPY, QQQ, AAPL, MSFT)
High-volume crypto (BTC, ETH)
Major commodities (Gold, Oil, Natural Gas)
Reasoning: Clean price structure, clear pivots, meaningful oscillator behavior
Trending with Consolidations :
Markets that trend for 20-40 bars, then consolidate 10-20 bars, repeat
Creates divergences at consolidation boundaries (reversals) and within trends (continuations)
Both regular and hidden divs find opportunities
5-Minute to Daily Timeframes :
Below 5m: too much noise, false pivots, CAE metrics unstable
Above daily: too few signals, edge diminishes (fundamentals dominate)
Sweet spot: 15m to 4H for most traders
Consistent Volume and Participation :
Regular trading sessions (not holidays or thin markets)
Predictable volatility patterns
Avoid instruments with sudden gaps or circuit breakers
Challenging Conditions
Extremely Low Liquidity :
Penny stocks, exotic forex pairs, low-volume crypto
Erratic pivots, unreliable oscillator readings
CAE metrics can't assess market state properly
Very Low Timeframes (1-Minute or Below) :
Dominated by market microstructure noise
Divergences are everywhere but meaningless
CAE filtering helps but still unreliable
Extended Sideways Consolidation :
100+ bars of tight range with no clear pivots
Oscillator hugs midpoint (45-55 range)
No divergences to detect
Fundamentally-Driven Gap Markets :
Earnings releases, economic data, geopolitical events
Price gaps over stops and targets
Technical structure breaks down
Recommendation: Disable trading around known events
Calculation Methodology — Technical Depth
For users who want to understand the math:
Oscillator Computation
Each oscillator type calculates differently, but all normalize to 0-100:
RSI : ta.rsi(close, length) — Standard Relative Strength Index
Stochastic : ta.stoch(high, low, close, length) — %K calculation
CCI : (ta.cci(hlc3, length) + 100) / 2 — Normalized from -100/+100 to 0-100
MFI : ta.mfi(hlc3, length) — Volume-weighted RSI equivalent
Williams %R : ta.wpr(length) + 100 — Inverted stochastic adjusted to 0-100
Smoothing: If smoothing > 1, apply ta.sma(oscillator, smoothing)
Divergence Detection Algorithm
Identify Pivots :
Price high pivot: ta.pivothigh(high, lookback, lookforward)
Price low pivot: ta.pivotlow(low, lookback, lookforward)
Oscillator high pivot: ta.pivothigh(osc, lookback, lookforward)
Oscillator low pivot: ta.pivotlow(osc, lookback, lookforward)
Store Recent Pivots :
Maintain arrays of last 10 pivots with bar indices
When new pivot confirmed, unshift to array, pop oldest if >10
Scan for Slope Disagreements :
Loop through last 5 pivots
For each pair (current pivot, historical pivot):
Check if within max_lookback bars
Calculate slopes: (current - historical) / bars_between
Regular bearish: price_slope > 0, osc_slope < 0, |osc_slope| > min_threshold
Regular bullish: price_slope < 0, osc_slope > 0, |osc_slope| > min_threshold
Hidden bearish: price_slope < 0, osc_slope > 0, osc_slope > min_threshold
Hidden bullish: price_slope > 0, osc_slope < 0, |osc_slope| > min_threshold
Important Disclaimers and Terms
Performance Disclosure
Past performance, whether backtested or live-traded, does not guarantee future results. Markets change. What works today may not work tomorrow. Hypothetical or simulated performance results have inherent limitations and do not represent actual trading.
Risk of Loss
Trading involves substantial risk of loss. Only trade with risk capital you can afford to lose entirely. The high degree of leverage often available in trading can work against you as well as for you. Leveraged trading may result in losses exceeding your initial deposit.
Not Financial Advice
BZ-CAE is an educational and analytical tool for technical analysis. It is not financial advice, investment advice, or a recommendation to buy or sell any security or instrument. All trading decisions are your sole responsibility. Consult a licensed financial advisor for advice specific to your circumstances.
Technical Indicator Limitations
BZ-CAE is a technical analysis tool based on price and volume data. It does not account for:
Fundamental analysis (earnings, economic data, financial health)
Market sentiment and positioning
Geopolitical events and news
Liquidity conditions and market microstructure changes
Regulatory changes or exchange rules
Integrate with broader analysis and strategy. Do not rely solely on technical indicators for trading decisions.
Repainting Acknowledgment
As disclosed throughout this documentation:
Realtime mode may repaint on forming bars before confirmation (by design for preview functionality)
Confirmed mode has zero repainting (fully validated pivots only)
Choose timing mode appropriate for your use case. Understand the tradeoffs.
Testing Recommendation
ALWAYS test on demo/paper accounts before committing real capital. Validate the indicator's behavior on your specific instruments and timeframes. Learn the system thoroughly in Advisory mode before using Filtering mode.
Learning Resources :
In-indicator tooltips (hover over setting names for detailed explanations)
This comprehensive publishing statement (save for reference)
User guide in script comments (top of code)
Final Word — Philosophy of BZ-CAE
BZ-CAE is not designed to replace your judgment — it's designed to enhance it.
The indicator identifies structural inflection points (bifurcations) where price and momentum disagree. The Cognitive Engine evaluates market state to determine if this disagreement is meaningful or noise. The Adversarial model debates both sides of the trade to catch obvious bad setups. The Confidence system ranks quality so you can choose your risk appetite.
But YOU still execute. YOU still manage risk. YOU still learn from outcomes.
This is intelligence amplification, not intelligence replacement.
Use Advisory mode to learn how expert traders evaluate market state. Use Filtering mode to enforce discipline when emotions run high. Use the dashboard to develop a systematic approach to reading markets. Use confidence scores to size positions probabilistically.
The system provides an edge. Your job is to execute that edge with discipline, patience, and proper risk management over hundreds of trades.
Markets are probabilistic. No system wins every trade. But a systematic edge + disciplined execution + proper risk management compounds over time. That's the path to consistent profitability. BZ-CAE gives you the edge. The discipline and risk management are on you.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Hidden Zone Detector AI - Crypto/Forex/StockHidden Zone Detector AI - Crypto Forex Stock
Hidden Zone Detector AI is a professional TradingView indicator designed to find hidden supply and demand zones across markets — crypto, forex and stocks — and surface high-probability areas earlier than classical pivot-only methods. It combines price structure analysis, volatility/ATR sizing, volume profiling and multi-mode AI heuristics (Fast / Balanced / Accurate) to generate prediction zones, highlight tested areas, and visually mark zone breakouts. Built with practical trader workflow in mind: configurable anti-repaint options, adaptable Light/Dark UI, clear labels, and candle-coloring for immediate visual context.
How it works
• Detects hidden zones by scanning pivot formations and finding internal “hidden” bars that represent real institutional activity (not just visible swing points).
• Scores zones by size (ATR-relative), volume, and touch characteristics to produce a strength percentage (Weak/Medium/Strong).
• AI heuristics aggregate price, momentum, moving averages, RSI/MACD signals and volume patterns to propose prediction zones — adjustable for speed vs. accuracy.
• Zones are drawn as persistent boxes with optional midlines, labels, and tailored styling when broken or tested.
Main advantages
• Early edge: finds hidden zones that often act before obvious pivots.
• Actionable visuals: labeled zones, color-coded candles, and breakout styling speed decision-making.
• Flexible AI modes: choose Fast for responsiveness, Balanced for day-to-day use, or Accurate for stricter signals.
• Anti-repaint controls: require confirmed bars for predictions to improve signal reliability.
• Multi-market ready: tuned for crypto, forex and stock chart behavior.
• Light/Dark friendly: UI color handling ensures labels remain readable on any chart background.
• Open & reusable: released under Mozilla Public License 2.0 (MPL-2.0) — use and adapt freely with attribution.
Best practices & tips
• Start with Balanced mode and sensitivity ~5; increase sensitivity for earlier but noisier predictions.
• Use prediction confirmation (Require AI Prediction Confirmation) for lower repaint risk.
• Combine zone reads with higher-timeframe context and orderflow/volume tools for stronger entries.
• Adjust max active zones and opacity to keep charts clean on lower timeframes.
License & author
Mozilla Public License 2.0 (MPL-2.0).
Author: a_jabbaroff — created with care for the TradingView community and fellow traders.
ITC Market Structure ProWith this tool you can see market structure, set session, daylow, dayhigh, multiple moving avg., fvg...
Every feature can by witched off or on to have more clarity watching price action - and everything is in one indicator, so you don't need to have stack off them!
Detailed description will try to provide later...
PS Thanks for LuxAlgo - I have use some of their fine work to combine all-in-one! Hoping it's not against the rules - if so, I will remove my tool.
PS Everything is rewritten to pine6
区间顶底与超级趋势系统Overview:
This is a comprehensive trading system designed to capture both trend reversals and trend-following opportunities. This script combines three core modules: Long-term EMA Tunnels (Vegas Style), Dynamic Support/Resistance Zones (based on historical highs/lows), and the classic SuperTrend. It aims to help traders identify "buy low, sell high" opportunities in ranging markets and catch major waves during strong trends.
Core Features Explained
1. EMA Long-term Trend Tunnel
Configuration: The script includes three specific Exponential Moving Averages (EMAs): 144, 169, and 233.
Function: These lines form a long-term support and resistance band. Price action above these lines is generally considered a bullish trend, while price below indicates a bearish trend.
2. Dynamic Range Top/Bottom
Logic: Calculates the current market structure based on the highest and lowest prices over a specific lookback period (default 130 bars), combined with ATR (Average True Range).
Visualization: Automatically draws Resistance Boxes (Red zone) at the top and Support Boxes (Green zone) at the bottom.
Data Panel: Displays the current ATR volatility percentage and a count of Bullish/Bearish K-lines within the period to help gauge the balance of power between buyers and sellers.
Signals: Reversal arrows appear when price tests these extreme zones and shows signs of rejection.
3. SuperTrend Integration
Tool: A classic trend-following indicator based on ATR and median price.
Usage: Acts as a reliable market noise filter. When SuperTrend is green, it is recommended to look for long setups; when red, look for short setups.
Highlighting: The script supports background highlighting, allowing you to identify the current trend direction at a glance.
How to Use This System
Trend Following Strategy: When the EMA lines are aligned upwards and the SuperTrend shows a Buy signal (Green background), look for long entries on pullbacks to the SuperTrend support line or near the EMAs.
Range Reversal Strategy: When price hits the upper or lower limits of the "Dynamic Range" and a SuperTrend flip or arrow reversal signal occurs, consider counter-trend trades.
Stop Loss: It is recommended to place stop losses just outside the SuperTrend line or the Dynamic Range boxes.
Settings
EMA: You can toggle the visibility of the EMA lines on or off.
Dynamic Range: Customizable lookback period (Length) and extension settings to fit your timeframe.
SuperTrend: Fully adjustable ATR Period and Multiplier to adapt to different asset volatilities.
Disclaimer: This script is for educational purposes only and does not constitute financial advice.
概述:
这是一个专为捕捉趋势反转与顺势交易设计的综合交易系统。本脚本结合了三大核心模块:长期均线隧道(Vegas风格)、动态支撑阻力区间(基于历史高低点)以及经典的超级趋势(SuperTrend)。旨在帮助交易者在震荡行情中识别高抛低吸的机会,并在趋势行情中抓住主升浪。
核心功能解析
1. EMA 长期趋势隧道 (EMA Tunnel)
脚本内置了三条特定的指数移动平均线 (EMA):144、169 和 233。
这些均线构成了长期趋势的支撑与阻力带。当价格位于这些均线之上时,通常视为多头趋势;反之则为空头趋势。
2. 动态顶底区间 (Dynamic Range Top/Bottom)
原理:基于过去一定周期(默认130根K线)内的最高价和最低价,结合 ATR(平均真实波幅)计算出当前的市场结构。
视觉化:图表中会自动绘制出顶部的阻力箱体(红色区域)和底部的支撑箱体(绿色区域)。
数据面板:箱体旁会显示当前的 ATR 波动率百分比,以及该周期内的 K 线买入/卖出计数,帮助判断多空力量对比。
信号:当价格触及这些极限区域并出现反转迹象时,会显示箭头提示。
3. 超级趋势 (SuperTrend)
经典的趋势跟踪工具,基于 ATR 和价格中位数计算。
用法:用于过滤市场噪音。当超级趋势为绿色时,建议只寻找做多机会;为红色时,建议只寻找做空机会。
高亮显示:脚本支持背景高亮,让你一目了然当前的趋势方向。
如何使用本指标进行交易
顺势交易:当 EMA 均线向上排列且 SuperTrend 显示买入信号(绿色背景)时,关注回调至 SuperTrend 支撑线或 EMA 附近的做多机会。
区间反转:当价格触及“动态顶底区间”的上沿或下沿,并且出现 SuperTrend 变色或箭头反转信号时,可考虑反向操作。
止损建议:建议将止损设置在 SuperTrend 线或动态箱体的外侧。
设置说明
你可以开启/关闭 EMA 显示。
可以自定义顶底区间的计算周期(Length)和延伸长度。
可以调整 SuperTrend 的 ATR 周期和乘数以适应不同的波动率。
Crypto_Dan - Trend catcher - All projectsCrypto_dan_cro - Trend catcher indicator
This indicator will show you the Macro trend - ALL PROJECTS.
DOTS
Red dots - mean we are in Bearish part of the cycle where prices are expected to drop further
Yellow dots - mean we are in the area where either breakout or breakdown are possible
Green dots - mean we are in a Bullish part of the cycle, where prices are expected to raise
SMA LINE
Crossing below line, will make line red - bearmarket
Crossing above line, will make line green - bullmarket
Trading on the line, will make line yellow - direction still not decided
TOP & BOTTOM
Top - showing you tops
Bottom - showing you bottoms
BREAKOUTS & BREAKDOWNS
BO - BreakOut - showing you change in trend, and prices are expected to raise
BD - BreakDown - showing you change in trend, and prices are expected to drop.
SUPPORT & RESISTANCE
Red squares on the last candle - showing you 3 closest resistances (on every timeframe)
Green squares on the last candle - showing you 3 closest supports (on every timeframe)
Crypto markets are volatile, if you choose to use this indicator in trading, you are doing it on your own. Crypto_dan_cro is not responsible for any profits or losses created by using this Indicator.
Good luck ;)
If you want to get this indicator for free, follow me on
X handle: @crypto_dan_cro
Turn notifications on and engage with my posts
Crypto_dan_cro - Trend catcher - BTC OnlyCrypto_dan_cro - Trend catcher indicator
This indicator will show you the Macro trend BTC ONLY.
DOTS
Red dots - mean we are in Bearish part of the cycle where prices are expected to drop further
Yellow dots - mean we are in the area where either breakout or breakdown are possible
Green dots - mean we are in a Bullish part of the cycle, where prices are expected to raise
SMA LINE
Crossing below line, will make line red - bearmarket
Crossing above line, will make line green - bullmarket
Trading on the line, will make line yellow - direction still not decided
TOP & BOTTOM
Top - showing you tops
Bottom - showing you bottoms
BREAKOUTS & BREAKDOWNS
BO - BreakOut - showing you change in trend, and prices are expected to raise
BD - BreakDown - showing you change in trend, and prices are expected to drop.
SUPPORT & RESISTANCE
Red squares on the last candle - showing you 3 closest resistances (on every timeframe)
Green squares on the last candle - showing you 3 closest supports (on every timeframe)
Crypto markets are volatile, if you choose to use this indicator in trading, you are doing it on your own. Crypto_dan_cro is not responsible for any profits or losses created by using this Indicator.
Good luck ;)
If you want to get this indicator for free, follow me on
X handle: @crypto_dan_cro
Turn notifications on and engage with my posts
Eagle V 2.0 - AIEagle V 2.0 – AI Edition is a next-generation signal engine designed for traders who want clean entries, consistent performance, and reduced stop-loss hits.
The indicator analyzes trend strength, liquidity behavior, volatility conditions, market structure, and price momentum to generate high-quality buy and sell signals only when the market is aligned.
Instead of flooding the chart with noise, Eagle V 2.0 focuses on precision.
Every signal comes with a calculated stop-loss, three Fibonacci-based take-profit levels, and a confidence score that helps you quickly judge the strength of the setup.
What the Indicator Delivers
Clear Long/Short signals filtered to avoid weak setups
Smart Stop-Loss placement to reduce fake-outs
TP1 / TP2 / TP3 levels automatically calculated based on market movement
AI Confidence Score (0–100) to measure the quality of each opportunity
Real-time Support & Resistance zones that update with market structure
Trend direction and momentum bias across multiple timeframes
Trade history panel showing win rate, total P&L, biggest wins/losses, and your last trades
Dashboard with market conditions, liquidity state, and timeframe bias
Who This Indicator Is For
Scalpers, day traders, and swing traders who want fewer but higher-quality signals, strong risk management, and a tool that adapts to any market—Forex, Crypto, Indices, or Stocks.
Summary
Eagle V 2.0 focuses on the only thing that matters:
Cleaner signals, controlled risk, and stronger results.
Near N Bars Real Body High and Low Support and Resistance
This indicator dynamically identifies support and resistance levels based on the highest and lowest values of the real bodies (open and close prices) of the most recent N bars. Users can interactively select the starting bar by clicking on the chart, and the script calculates the highest high and lowest low within the specified range, drawing horizontal support and resistance lines accordingly. The lines can be extended to the left and right according to user inputs. This tool helps traders visually identify key price levels for technical analysis based on recent price action.
DuckyDaff's - 6 Simple Moving AveragesSimple Moving Average (SMA) Multi-Timeframe Indicator: 9/21/50/100/150/200
This indicator overlays six SMAs on the price chart to help detect trends, momentum changes, support, and resistance at different timeframes.
• SMA 9: Tracks immediate momentum and short-term price shifts. Used by active traders for rapid trend identification.
• SMA 21: Balances short-term speed with reduced noise. Useful for spotting shallow corrections and near-term swing trends.
• SMA 50: Follows medium-term trends, acts as dynamic support/resistance, popular for swing and trend traders.
• SMA 100: Maps out broader price moves. Valuable for medium- to long-term analysis and identifying significant turning points.
• SMA 150: Suits long-term trend and historical support/resistance review. An extra filter for deeper market structure.
• SMA 200: Marks major market direction—bull/bear zones and critical reversal levels. Widely used for long-term bias and risk management.
Using this multi-SMA indicator gives a layered view of price dynamics, helping traders separate market noise from reliable trend signals, and supports precise entries and exits according to different trading styles
RSI Divergence (Regular + Hidden, @darshakssc)This indicator detects regular and hidden divergence between price and RSI, using confirmed swing highs and swing lows (pivots) on both series. It is designed as a visual analysis tool, not as a signal generator or trading system.
The goal is to highlight moments where price action and RSI momentum move in different directions, which some traders study as potential early warnings of trend exhaustion or trend continuation. All divergence signals are only drawn after a pivot is fully confirmed, helping to avoid repainting.
The script supports four divergence types:
Regular Bullish Divergence
Regular Bearish Divergence
Hidden Bullish Divergence
Hidden Bearish Divergence
Each type is drawn with a different color and labeled clearly on the chart.
Core Concepts Used
1. RSI (Relative Strength Index)
The script uses standard RSI, calculated on a configurable input source (default: close) and length (default: 14).
RSI is treated purely as a momentum oscillator – the script does not enforce oversold/overbought interpretations.
2. Pivots / Swings
The indicator defines swing highs and swing lows using ta.pivothigh() and ta.pivotlow():
A swing high forms when a bar’s high is higher than a specified number of bars to the left and to the right.
A swing low forms when a bar’s low is lower than a specified number of bars to the left and to the right.
The same pivot logic is applied to both price and RSI.
Because pivots require “right side” bars to form, the indicator:
Waits for the full pivot to be confirmed (no forward-looking referencing beyond the rightBars parameter).
Only then considers that pivot for divergence detection.
This helps prevent repainting of divergence signals.
How Divergence Is Detected
The script always uses the two most recent confirmed pivots for both price and RSI. It tracks:
Last two swing lows in price and RSI
Last two swing highs in price and RSI
Their pivot bar indexes and values
A basic minimum distance filter between the pivots (in bars) is also applied to reduce noise.
1. Regular Bullish Divergence
Condition:
Price makes a lower low (LL) between the last two lows
RSI makes a higher low (HL) over the same two pivot lows
The RSI difference between the two lows is greater than or equal to the user-defined minimum (Min RSI Difference)
The two low pivots are separated by at least Min Bars Between Swings
Interpretation:
Some traders view this as bearish momentum weakening while price prints a new low. The script only marks this structure; it does not assume any outcome.
On the chart:
Drawn between the previous and current price swing lows
Labeled: “Regular Bullish”
Color: Green (by default in the script)
2. Regular Bearish Divergence
Condition:
Price makes a higher high (HH) between the last two highs
RSI makes a lower high (LH) over the same two pivot highs
RSI difference exceeds Min RSI Difference
Pivots are separated by at least Min Bars Between Swings
Interpretation:
Some traders see this as bullish momentum weakening while price prints a new high. Again, the indicator simply highlights this divergence.
On the chart:
Drawn between the previous and current price swing highs
Labeled: “Regular Bearish”
Color: Red
3. Hidden Bullish Divergence
Condition:
Price makes a higher low (HL) between the last two lows
RSI makes a lower low (LL) over the same two lows
RSI difference exceeds Min RSI Difference
Pivots meet the minimum distance requirement
Interpretation:
Some traders interpret hidden bullish divergence as a potential trend continuation signal within an existing uptrend. The indicator does not classify trends; it just tags the pattern when price and RSI pivots meet the conditions.
On the chart:
Drawn between the previous and current price swing lows
Labeled: “Hidden Bullish”
Color: Teal
4. Hidden Bearish Divergence
Condition:
Price makes a lower high (LH) between the last two highs
RSI makes a higher high (HH) over those highs
RSI difference exceeds Min RSI Difference
Pivots meet the minimum distance filter
Interpretation:
Some traders associate hidden bearish divergence with potential downtrend continuation, but again, this script only visualizes the structure.
On the chart:
Drawn between the previous and current price swing highs
Labeled: “Hidden Bearish”
Color: Orange
Inputs and Settings
1. RSI Settings
RSI Source – Price source for RSI (default: close).
RSI Length – Period for RSI calculation (default: 14).
These control the responsiveness of the RSI. Shorter lengths may show more frequent divergence; longer lengths smooth the signal.
2. Swing / Pivot Settings
Left Swing Bars (leftBars)
Right Swing Bars (rightBars)
These define how strict the pivot detection is:
Higher values → fewer, more significant swings
Lower values → more swings, more signals
Because the script uses ta.pivothigh / ta.pivotlow, a pivot is only confirmed once rightBars candles have closed after the candidate bar. This is an intentional design to reduce repainting and make pivots stable.
3. Divergence Filters
Min Bars Between Swings (Min Bars Between Swings)
Requires a minimum bar distance between the two pivots used to form divergence.
Helps avoid clutter from pivots that are too close to each other.
Min RSI Difference (Min RSI Difference)
Requires a minimum absolute difference between RSI values at the two pivots.
Filters out very minor changes in RSI that may not be meaningful.
4. Visibility Toggles
Show Regular Divergence
Show Hidden Divergence
You can choose to display:
Both regular and hidden divergence, or
Only regular divergence, or
Only hidden divergence
This is useful if you prefer to focus on one type of structure.
5. Alerts
Enable Alerts
When enabled, the script exposes four alert conditions:
Regular Bullish Divergence Confirmed
Regular Bearish Divergence Confirmed
Hidden Bullish Divergence Confirmed
Hidden Bearish Divergence Confirmed
Each alert fires after the corresponding divergence has been fully confirmed based on the pivot and bar confirmation logic. The script does not issue rapid or intrabar signals; it uses confirmed historical conditions.
You can set these in the TradingView Alerts dialog by choosing this indicator and selecting the desired condition.
Visual Elements
On the main price chart, the indicator:
Draws a line between the two price pivots involved in the divergence.
Adds a small label at the latest pivot, describing the divergence type.
Colors are used to differentiate divergence categories (Green/Red/Teal/Orange).
This makes it easy to visually scan the chart for zones where price and RSI have diverged.
What to Look For (Analytical Use)
This indicator is intended as a visual helper, especially when:
You want to quickly see where price made new highs or lows while RSI did not confirm them in the same way.
You are studying momentum exhaustion, shifts, or continuation using RSI divergence as one of many tools.
You want to compare divergence occurrences across different timeframes or instruments.
Important:
The indicator does not tell you when to enter or exit trades.
It does not rank or validate the “quality” of a divergence.
Divergence can persist or fail; it is not a guarantee of reversal or continuation.
Many traders combine divergence analysis with:
Higher timeframe context
Trend filters (moving averages, structure)
Support/resistance zones or liquidity areas
Volume, structure breaks, or other confirmations
Disclaimer
This script is provided for educational and analytical purposes only.
It does not constitute financial advice, trading advice, or investment recommendations.
No part of this indicator is intended to suggest, encourage, or guarantee any specific trading outcome.
Users are solely responsible for their own decisions and risk management.
DX Supply and Demand Pro💎 DX Supply and Demand Pro: Adaptive Line and Zone Mastery
The DX Supply and Demand Pro indicator is an advanced, hybrid trading tool engineered for precision and context. It seamlessly integrates the proprietary Arbitor Line with dynamic, volume-weighted Supply and Demand Zones. This unique combination provides traders with a clear, adaptive view of both the current trend bias and critical structural price levels.
⚠️ Critical Trading Disclaimer 🛑
Trading is highly speculative and carries a substantial risk of loss. The use of this indicator does not guarantee profits, and you may lose more than your initial capital. Before using this tool in a live trading environment, you must test its performance thoroughly using paper trading or a simulated account.
Why Traders Need the DX S&D Pro 🎯
Proprietary Adaptive Intelligence: The Arbitor Line is a calculated price anchor derived from a complex, undisclosed combination of multiple market factors and proprietary equations. It automatically adjusts its sensitivity based on the chart's timeframe, effectively filtering out market noise to present an accurate, weighted average of the prevailing market bias.
Structural Clarity: It detects high-probability Supply and Demand Zones using pivot points, filtering them for strength based on volume, ATR (volatility), and High Volume Node (HVN) confirmation from a higher timeframe.
Actionable Confluence: The indicator combines dynamic trend bias (the Arbitor Line) with static structural levels (S&D Zones). This allows traders to identify high-conviction setups where the structural turning point is confirmed by the real-time bias of the Arbitor Line.
Feedback & Accountability 🤝
This indicator is provided "as is" and its performance is based on the parameters set by the user. Any suggestions or comments from users regarding performance, bugs, or feature requests should be directed to the developer here or X @Falcondxeye. The developer assumes no liability for trading losses incurred using this tool.
📚 How to Use DX Supply and Demand Pro
This indicator is best used as a confluence tool, where the Arbitor Line confirms the strength and direction of the setup identified by the Supply/Demand Zones.
Trading Confluence with the Arbitor Line:
Scenario: Buy Zone Rejection 🟢
Condition: Price touches a Demand Zone.
Confluence: The Arbitor Line is Above the zone.
Interpretation: Indicates a Bullish Bias is confirming the structural support. Focus on long entries.
Scenario: Sell Zone Rejection 🔴
Condition: Price touches a Supply Zone.
Confluence: The Arbitor Line is Below the zone.
Interpretation: Indicates a Bearish Bias is confirming the structural resistance. Focus on short entries.
Scenario: Momentum Break ⚡
Condition: Price Closes strongly beyond a zone.
Confluence: The Arbitor Line is Aligned with the Break.
Interpretation: Confirms market momentum and suggests the structural break is valid for directional continuation.
⚙️ Key Settings and Optimization Guide 🔧
Arbitor Line Settings (Trend Bias):
VWAP Weight: (Default: 0.33) — The weight applied to a key volume component within the proprietary Arbitor calculation.
Suggestion for High Volatility/Volume: Increase to 0.40 to emphasize volume's influence.
Suggestion for Clean Trends: Decrease to 0.25 to allow momentum components to dictate the line's position.
Supply & Demand Zone Settings (Structural Levels)
HVN Volume TF: (Default: D - Daily) — Crucial Context Setter. The higher timeframe used to look for High Volume Nodes (HVNs) to confirm zone strength.
For Scalping (1m-15m): Use 1H or 4H for validation.
For Day Trading (30m-1H): Use 4H or D. D is the recommended default.
For Swing Trading (4H-Daily): Use W (Weekly).
HVN Bonus %: (Default: 20) — The strength boost applied to a zone if it aligns with an HVN.
Max Supply/Demand Zones: (Default: 2) — Limits the number of active, displayed zones to keep the chart clean.
Retest Bonus %: (Default: 10) — Boosts a zone's strength score each time it is retested (up to max retests).
Time Decay Rate %: (Default: 1) — Reduces a zone's strength for every 10 bars it remains unbroken (stale zones weaken).
Flip Zone on Break: (Default: True) — Turns a broken Demand Zone into a Supply Zone (and vice versa), reflecting structural flip concepts.
💡 Suggestions for Power Users 🚀
Look for Flipped Zones: Pay attention to zones that have been broken and flipped (indicated by yellow text in the labels). Flipped zones that confirm the Arbitor direction often lead to high-momentum continuation moves.
Confirm HVN Strength: Always prioritize trading zones with a high strength score (e.g., 90% or higher), as this indicates maximum confluence of Volume, Volatility, and the HVN Bonus.
Adaptive Timeframes: Use the indicator on multiple timeframes to ensure the Arbitor bias aligns with your trade direction. If the Arbitor is bullish on both the 5-minute and the 1-hour chart, the conviction is exceptionally high.
Final Note: The DX S&D Pro combines the best of trend following with the best of structural trading. It's so good, we call it the Arbitor because it settles the arguments between buyers and sellers... until the next bar, of course! 😉
....................................................................................
💎 مؤشر DX Supply and Demand Pro: خط التكيّف وإتقان المناطق ✨
مؤشر DX Supply and Demand Pro هو أداة تداول هجينة ومتقدمة مصممة للدقة والسياق. إنه يدمج بسلاسة خط Arbitor الخاص بنا مع مناطق العرض والطلب الديناميكية المرجحة بالحجم. يوفر هذا المزيج الفريد للمتداولين رؤية واضحة ومتكيفة لكل من انحياز الاتجاه الحالي ومستويات الأسعار الهيكلية (Structural Price Levels) الحرجة.
⚠️ إخلاء مسؤولية حاسم بشأن التداول 🛑
التداول ينطوي على مخاطرة عالية للغاية ويحمل مخاطر خسارة كبيرة. استخدام هذا المؤشر لا يضمن الأرباح، وقد تخسر أكثر من رأس مالك الأولي. قبل استخدام هذه الأداة في بيئة تداول حقيقية، يجب عليك اختبار أدائها بشكل شامل باستخدام التداول الورقي (Paper Trading) أو حساب محاكاة.
لماذا يحتاج المتداولون إلى مؤشر DX S&D Pro 🎯
ذكاء تكيّفي خاص (Proprietary Adaptive Intelligence): خط Arbitor هو مرساة سعر محسوبة مشتقة من تركيبة معقدة وغير معلنة من عوامل سوق متعددة ومعادلات خاصة. يقوم بضبط حساسيته تلقائيًا بناءً على الإطار الزمني للرسم البياني، مما يزيل ضوضاء السوق بشكل فعال لتقديم متوسط مرجح ودقيق للانحياز السائد في السوق.
وضوح هيكلي (Structural Clarity): يكتشف مناطق العرض والطلب ذات الاحتمالية العالية باستخدام نقاط التحول (Pivot Points)، ويقوم بترشيحها وتحديد قوتها بناءً على الحجم، ATR (التقلب)، وتأكيد من عقدة الحجم العالية (HVN) من إطار زمني أعلى.
تضافر قابل للتطبيق (Actionable Confluence): يجمع المؤشر بين انحياز الاتجاه الديناميكي (خط Arbitor) ومستويات الهيكل الثابتة (مناطق العرض والطلب). يتيح ذلك للمتداولين تحديد إعدادات ذات قناعة عالية حيث يتم تأكيد نقطة التحول الهيكلية من خلال انحياز خط Arbitor في الوقت الفعلي.
الملاحظات والمساءلة 🤝
يتم توفير هذا المؤشر "كما هو" ويستند أدائه إلى الاعدادات التي يحددها المستخدم. يجب توجيه أي اقتراحات أو تعليقات من المستخدمين بخصوص الأداء أو الأخطاء أو طلبات الميزات إلى المطور هنا أو على X @Falcondxeye. لا يتحمل المطور أي مسؤولية عن خسائر التداول المتكبدة باستخدام هذه الأداة.
📚 كيفية استخدام مؤشر DX Supply and Demand Pro
يُفضل استخدام هذا المؤشر كأداة تضافر، حيث يؤكد خط Arbitor قوة واتجاه الإعداد المحدد بواسطة مناطق العرض والطلب.
تضافر التداول مع خط Arbitor:
السيناريو: ارتداد منطقة الشراء 🟢
الحالة: يلامس السعر منطقة الطلب (Demand Zone).
التضافر: يقع خط Arbitor فوق المنطقة.
التفسير: يشير إلى أن انحياز صعودي (Bullish Bias) يؤكد الدعم الهيكلي. التركيز على صفقات الشراء (Long Entries).
السيناريو: ارتداد منطقة البيع 🔴
الحالة: يلامس السعر منطقة العرض (Supply Zone).
التضافر: يقع خط Arbitor أسفل المنطقة.
التفسير: يشير إلى أن انحياز هبوطي (Bearish Bias) يؤكد المقاومة الهيكلية. التركيز على صفقات البيع (Short Entries).
السيناريو: كسر الزخم ⚡
الحالة: يُغلق السعر بقوة خارج المنطقة.
التضافر: يتماشى خط Arbitor مع الكسر.
التفسير: يؤكد زخم السوق ويشير إلى أن الكسر الهيكلي صالح للاستمرار الاتجاهي.
⚙️ الإعدادات الرئيسية ودليل التحسين 🔧
إعدادات خط Arbitor (انحياز الاتجاه)
VWAP Weight (وزن VWAP): (افتراضي: 0.33) — الوزن المطبق على مكون حجم رئيسي ضمن حساب Arbitor الخاص بنا.
اقتراح للتقلب/الحجم العالي: زيادة إلى 0.40 للتأكيد على تأثير الحجم.
اقتراح للاتجاهات النظيفة: تقليل إلى 0.25 للسماح لمكونات الزخم بتحديد موقع الخط بشكل أقوى.
إعدادات مناطق العرض والطلب (المستويات الهيكلية)
HVN Volume TF (الإطار الزمني لحجم HVN): (افتراضي: D - يومي) — مُحدِد السياق الحاسم. الإطار الزمني الأعلى المستخدم للبحث عن عقد الحجم العالية (HVNs) لتأكيد قوة المنطقة.
للمضاربة اللحظية (1د-15د): استخدم 1س أو 4س للتحقق.
للتداول اليومي (30د-1س): استخدم 4س أو D. D هو الإعداد الافتراضي الموصى به.
للتداول المتأرجح (4س-يومي): استخدم W (أسبوعي).
HVN Bonus % (مكافأة HVN %): (افتراضي: 20) — تعزيز القوة المطبق على المنطقة إذا كانت تتماشى مع عقدة HVN.
Max Supply/Demand Zones (الحد الأقصى لمناطق العرض/الطلب): (افتراضي: 2) — يحد من عدد المناطق النشطة المعروضة للحفاظ على نظافة الرسم البياني.
Retest Bonus % (مكافأة إعادة الاختبار %): (افتراضي: 10) — يعزز درجة قوة المنطقة في كل مرة يتم فيها إعادة اختبارها (حتى الحد الأقصى لإعادة الاختبارات).
Time Decay Rate % (معدل الاضمحلال الزمني %): (افتراضي: 1) — يقلل من قوة المنطقة لكل 10 شمعات تبقى فيها دون كسر (المناطق القديمة تضعف).
Flip Zone on Break (قلب المنطقة عند الكسر): (افتراضي: True - صحيح) — يحول منطقة الطلب المكسورة إلى منطقة عرض (والعكس صحيح)، مما يعكس مفاهيم التحول الهيكلي.
💡 اقتراحات للمستخدمين المتقدمين 🚀
ابحث عن المناطق المقلوبة (Flipped Zones): انتبه بشكل خاص إلى المناطق التي تم كسرها وقلبها (يشار إليها بنص أصفر في التسميات). غالبًا ما تؤدي المناطق المقلوبة التي تؤكد اتجاه Arbitor إلى تحركات استمرارية ذات زخم عالٍ.
تأكيد قوة HVN: أعطِ الأولوية دائمًا لتداول المناطق ذات درجة القوة العالية (على سبيل المثال، 90% أو أعلى)، حيث يشير هذا إلى أقصى درجات التضافر بين الحجم والتقلب ومكافأة HVN.
الأطر الزمنية التكيفية: استخدم المؤشر على أطر زمنية متعددة للتأكد من توافق انحياز Arbitor مع اتجاه تداولك. إذا كان Arbitor صعوديًا على كل من الرسم البياني 5 دقائق والساعة الواحدة، تكون القناعة عالية بشكل استثنائي.
ملاحظة أخيرة: يجمع مؤشر DX S&D Pro أفضل ما في تتبع الاتجاه مع أفضل ما في التداول الهيكلي. إنه جيد جدًا، لدرجة أننا نطلق عليه اسم Arbitor لأنه يحسم الجدل بين المشترين والبائعين... حتى الشمعة التالية بالطبع! 😉
دعواتكم 🙏..
Chronos Reversal Labs - SPChronos Reversal Labs - Shadow Portfolio
Chronos Reversal Labs - Shadow Portfolio: combines reinforcement learning optimization with adaptive confluence detection through a shadow portfolio system. Unlike traditional indicator mashups that force traders to manually interpret conflicting signals, this system deploys 4 multi-armed bandit algorithms to automatically discover which of 5 specialized confluence strategies performs best in current market conditions, then validates those discoveries through parallel shadow portfolios that track virtual P&L for each strategy independently.
Core Innovation: Rather than relying on static indicator combinations, this system implements Thompson Sampling (Bayesian multi-armed bandits), contextual bandits (regime-specific learning), advanced chop zone detection (geometric pattern analysis), and historical pre-training to build a self-improving confluence detection engine. The shadow portfolio system runs 5 parallel virtual trading accounts—one per strategy—allowing the system to learn which confluence approach works best through actual position tracking with realistic exits.
Target Users: Intermediate to advanced traders seeking systematic reversal signals with mathematical rigor. Suitable for swing trading and day trading across stocks, forex, crypto, and futures on liquid instruments. Requires understanding of basic technical analysis and willingness to allow 50-100 bars for initial learning.
Why These Components Are Combined
The Fundamental Problem
No single confluence method works consistently across all market regimes. Kernel-based methods (entropy, DFA) excel during predictable phases but fail in chaos. Structure-based methods (harmonics, BOS) work during clear swings but fail in ranging conditions. Technical methods (RSI, MACD, divergence) provide reliable signals in trends but generate false signals during consolidation.
Traditional solutions force traders to either manually switch between methods (slow, error-prone) or interpret all signals simultaneously (cognitive overload). Both fail because they assume the trader knows which regime the market is in and which method works best.
The Solution: Meta-Learning Through Reinforcement Learning
This system solves the problem through automated strategy selection : Deploy 5 specialized confluence strategies designed for different market conditions, track their real-world performance through shadow portfolios, then use multi-armed bandit algorithms to automatically select the optimal strategy for the next trade.
Why Shadow Portfolios? Traditional bandit implementations use abstract "rewards." Shadow portfolios provide realistic performance measurement : Each strategy gets a virtual trading account with actual position tracking, stop-loss management, take-profit targets, and maximum holding periods. This creates risk-adjusted learning where strategies are evaluated on P&L, win rate, and drawdown—not arbitrary scores.
The Five Confluence Strategies
The system deploys 5 orthogonal strategies with different weighting schemes optimized for specific market conditions:
Strategy 1: Kernel-Dominant (Entropy/DFA focused, optimal in predictable markets)
Shannon Entropy weight × 2.5, DFA weight × 2.5
Detects low-entropy predictable patterns and DFA persistence/mean-reversion signals
Failure mode: High-entropy chaos (hedged by Technical-Dominant)
Strategy 2: Structure-Dominant (Harmonic/BOS focused, optimal in clear swing structures)
Harmonics weight × 2.5, Liquidity (S/R) weight × 2.0
Uses swing detection, break-of-structure, and support/resistance clustering
Failure mode: Range-bound markets (hedged by Balanced)
Strategy 3: Technical-Dominant (RSI/MACD/Divergence focused, optimal in established trends)
RSI weight × 2.0, MACD weight × 2.0, Trend weight × 2.0
Zero-lag RSI suite with 4 calculation methods, MACD analysis, divergence detection
Failure mode: Choppy/ranging markets (hedged by chop filter)
Strategy 4: Balanced (Equal weighting, optimal in unknown/transitional regimes)
All components weighted 1.2×
Baseline performance during regime uncertainty
Strategy 5: Regime-Adaptive (Dynamic weighting by detected market state)
Chop zones: Kernel × 2.0, Technical × 0.3
Bull/Bear trends: Trend × 1.5, DFA × 2.0
Ranging: Mean reversion × 1.5
Adapts explicitly to detected regime
Multi-Armed Bandit System: 4 Core Algorithms
What Is a Multi-Armed Bandit Problem?
Formal Definition: K arms (strategies), each with unknown reward distribution. Goal: Maximize cumulative reward while learning which arms are best. Challenge: Balance exploration (trying uncertain strategies) vs. exploitation (using known-best strategy).
Trading Application: Each confluence strategy is an "arm." After each trade, receive reward (P&L percentage). Bandits decide which strategy to trust for next signal.
The 4 Implemented Algorithms
1. Thompson Sampling (DEFAULT)
Category: Bayesian approach with probability distributions
How It Works: Model each strategy as Beta(α, β) where α = wins, β = losses. Sample from distributions, select highest sample.
Properties: Optimal regret O(K log T), automatic exploration-exploitation balance
When To Use: Best all-around choice, adaptive markets, long-term optimization
2. UCB1 (Upper Confidence Bound)
Category: Frequentist approach with confidence intervals
Formula: UCB_i = reward_mean_i + sqrt(2 × ln(total_pulls) / pulls_i)
Properties: Deterministic, interpretable, same optimal regret as Thompson
When To Use: Prefer deterministic behavior, stable markets
3. Epsilon-Greedy
Category: Simple baseline with random exploration
How It Works: With probability ε (0.15): random strategy. Else: best average reward.
Properties: Simple, fast initial learning
When To Use: Baseline comparison, short-term testing
4. Contextual Bandit
Category: Context-aware Thompson Sampling
Enhancement: Maintains separate alpha/beta for Bull/Bear/Ranging regimes
Learning: "Strategy 2: 60% win rate in Bull, 40% in Bear"
When To Use: After 100+ bars, clear regime shifts
Shadow Portfolio System
Why Shadow Portfolios?
Traditional bandits use abstract scores. Shadow portfolios provide realistic performance measurement through actual position simulation.
How It Works
Position Opening:
When strategy generates validated signal:
Opens virtual position for selected strategy
Records: entry price, direction, entry bar, RSI method
Optional: Open positions for ALL strategies simultaneously (faster learning)
Position Management (Every Bar):
Current P&L: pnl_pct = (close - entry) / entry × direction × 100
Exit if: pnl_pct <= -2.0% (stop-loss) OR pnl_pct >= +4.0% (take-profit) OR held ≥ 100 bars (time)
Position Closing:
Calculate final P&L percentage
Update strategy equity, track win rate, gross profit/loss, max drawdown
Calculate risk-adjusted reward:
text
base_reward = pnl_pct / 10.0
win_rate_bonus = (win_rate - 0.5) × 0.3
drawdown_penalty = -max_drawdown × 0.05
total_reward = sigmoid(base + bonus + penalty)
Update bandit algorithms with reward
Update RSI method bandit
Statistics Tracked Per Strategy:
Equity curve (starts at $10,000)
Win rate percentage
Max drawdown
Gross profit/loss
Current open position
This creates closed-loop learning : Strategies compete → Best performers selected → Bandits learn quality → System adapts automatically.
Historical Pre-Training System
The Problem with Live-Only Learning
Standard bandits start with zero knowledge and need 50-100 signals to stabilize. For weekly timeframe traders, this could take years.
The Solution: Historical Training
During Chart Load: System processes last 300-1000 bars (configurable) in "training mode":
Detect signals using Balanced strategy (consistent baseline)
For each signal, open virtual training positions for all 5 strategies
Track positions through historical bars using same exit logic (SL/TP/time)
Update bandit algorithms with historical outcomes
CRITICAL TRANSPARENCY: Signal detection does NOT look ahead—signals use only data available at entry bar. Exit tracking DOES look ahead (uses future bars for SL/TP), which is acceptable because:
✅ Entry decisions remain valid (no forward bias)
✅ Learning phase only (not affecting shown signals)
✅ Real-time mirrors training (identical exit logic)
Training Completion: Once chart reaches current bar, system transitions to live mode. Dashboard displays training vs. live statistics for comparison.
Benefit: System begins live trading with 100-500 historical trades worth of learning, enabling immediate intelligent strategy selection.
Advanced Chop Zone Detection Engine
The Innovation: Multi-Layer Geometric Chop Analysis
Traditional chop filters use simple volatility metrics (ATR thresholds) that can't distinguish between trending volatility (good for signals) and choppy volatility (bad for signals). This system implements three-layer geometric pattern analysis to precisely identify consolidation zones where reversal signals fail.
Layer 1: Micro-Structure Chop Detection
Method: Analyzes micro pivot points (5-bar left, 2-bar right) to detect geometric compression patterns.
Slope Analysis:
Calculates slope of pivot high trendline and pivot low trendline
Compression ratio: compression = slope_high - slope_low
Pattern Classification:
Converging slopes (compression < -0.05) → "Rising Wedge" or "Falling Wedge"
Flat slopes (|slope| < 0.05) → "Rectangle"
Parallel slopes (|compression| < 0.1) → "Channel"
Expanding slopes → "Expanding Range"
Chop Scoring:
Rectangle pattern: +15 points (highest chop)
Low average slope (<0.05): +15 points
Wedge patterns: +12 points
Flat structures: +10 points
Why This Works: Geometric patterns reveal market indecision. Rectangles and wedges create false breakouts that trap technical traders. By quantifying geometric compression, system detects these zones before signals fire.
Layer 2: Macro-Structure Chop Detection
Method: Tracks major swing highs/lows using ATR-based deviation threshold (default 2.0× ATR), projects channel boundaries forward.
Channel Position Calculation:
proj_high = last_swing_high + (swing_high_slope × bars_since)
proj_low = last_swing_low + (swing_low_slope × bars_since)
channel_width = proj_high - proj_low
position = (close - proj_low) / channel_width
Dead Zone Detection:
Middle 50% of channel (position 0.25-0.75) = low-conviction zone
Score increases as price approaches center (0.5)
Chop Scoring:
Price in dead zone: +15 points (scaled by centrality)
Narrow channel width (<3× ATR): +15 points
Channel width 3-5× ATR: +10 points
Why This Works: Price in middle of range has equal probability of moving either direction. Institutional traders avoid mid-range entries. By detecting "dead zones," system avoids low-probability setups.
Layer 3: Volume Chop Scoring
Method: Low volume indicates weak conviction—precursor to ranging behavior.
Scoring:
Volume < 0.5× average: +20 points
Volume 0.5-0.8× average: +15 points
Volume 0.8-1.0× average: +10 points
Overall Chop Intensity & Signal Filtering
Total Chop Calculation:
chop_intensity = micro_score + macro_score + (volume_score × volume_weight)
is_chop = chop_intensity >= 40
Signal Filtering (Three-Tier Approach):
1. Signal Blocking (Intensity > 70):
Extreme chop detected (e.g., tight rectangle + dead zone + low volume)
ALL signals blocked regardless of confluence
Chart displays red/orange background shading
2. Threshold Adjustment (Intensity 40-70):
Moderate chop detected
Confluence threshold increased: threshold += (chop_intensity / 50)
Only highest-quality signals pass
3. Strategy Weight Adjustment:
During Chop: Kernel-Dominant weight × 2.0 (entropy detects breakout precursors), Technical-Dominant weight × 0.3 (reduces false signals)
After Chop Exit: Weights revert to normal
Why This Three-Tier Approach Is Original: Most chop filters simply block all signals (loses breakout entries). This system adapts strategy selection during chop—allowing Kernel-Dominant (which excels at detecting low-entropy breakout precursors) to operate while suppressing Technical-Dominant (which generates false signals in consolidation). Result: System remains functional across full market regime spectrum.
Zero-Lag Filter Suite with Dynamic Volatility Scaling
Zero-Lag ADX (Trend Regime Detection)
Implementation: Applies ZLEMA to ADX components:
lag = (length - 1) / 2
zl_source = source + (source - source ) × strength
Dynamic Volatility Scaling (DVS):
Calculates volatility ratio: current_ATR / ATR_100period_avg
Adjusts ADX length dynamically: High vol → shorter length (faster), Low vol → longer length (smoother)
Regime Classification:
ADX > 25 with +DI > -DI = Bull Trend
ADX > 25 with -DI > +DI = Bear Trend
ADX < 25 = Ranging
Zero-Lag RSI Suite (4 Methods with Bandit Selection)
Method 1: Standard RSI - Traditional Wilder's RSI
Method 2: Ehlers Zero-Lag RSI
ema1 = ema(close, length)
ema2 = ema(ema1, length)
zl_close = close + (ema1 - ema2)
Method 3: ZLEMA RSI
lag = (length - 1) / 2
zl_close = close + (close - close )
Method 4: Kalman-Filtered RSI - Adaptive smoothing with process/measurement noise
RSI Method Bandit: Separate 4-arm bandit learns which calculation method produces best results. Updates independently after each trade.
Kalman Adaptive Filters
Fast Kalman: Low process noise → Responsive to genuine moves
Slow Kalman: Higher measurement noise → Filters noise
Application: Crossover logic for trend detection, acceleration analysis for momentum inflection
What Makes This Original
Innovation 1: Shadow Portfolio Validation
First TradingView script to implement parallel virtual portfolios for multi-armed bandit reward calculation. Instead of abstract scoring metrics, each strategy's performance is measured through realistic position tracking with stop-loss, take-profit, time-based exits, and risk-adjusted reward functions (P&L + win rate + drawdown). This provides orders-of-magnitude better reward signal quality for bandit learning than traditional score-based approaches.
Innovation 2: Three-Layer Geometric Chop Detection
Novel multi-scale geometric pattern analysis combining: (1) Micro-structure slope analysis with pattern classification (wedges, rectangles, channels), (2) Macro-structure channel projection with dead zone detection, (3) Volume confirmation. Unlike simple volatility filters, this system adapts strategy weights during chop —boosting Kernel-Dominant (breakout detection) while suppressing Technical-Dominant (false signal reduction)—allowing operation across full market regime spectrum without blind signal blocking.
Innovation 3: Historical Pre-Training System
Implements two-phase learning : Training phase (processes 300-1000 historical bars on chart load with proper state isolation) followed by live phase (real-time learning). Training positions tracked separately from live positions. System begins live trading with 100-500 trades worth of learned experience. Dashboard displays training vs. live performance for transparency.
Innovation 4: Contextual Multi-Armed Bandits with Regime-Specific Learning
Beyond standard bandits (global strategy quality), implements regime-specific alpha/beta parameters for Bull/Bear/Ranging contexts. System learns: "Strategy 2: 60% win rate in ranging markets, 45% in bull trends." Uses current regime's learned parameters for strategy selection, enabling regime-aware optimization.
Innovation 5: RSI Method Meta-Learning
Deploys 4 different RSI calculation methods (Standard, Ehlers ZL, ZLEMA, Kalman) with separate 4-arm bandit that learns which calculation works best. Updates RSI method bandit independently based on trade outcomes, allowing automatic adaptation to instrument characteristics.
Innovation 6: Dynamic Volatility Scaling (DVS)
Adjusts ALL lookback periods based on current ATR ratio vs. 100-period average. High volatility → shorter lengths (faster response). Low volatility → longer lengths (smoother signals). Applied system-wide to entropy, DFA, RSI, ADX, and Kalman filters for adaptive responsiveness.
How to Use: Practical Guide
Initial Setup (5 Minutes)
Theory Mode: Start with "BALANCED" (APEX for aggressive, CONSERVATIVE for defensive)
Enable RL: Toggle "Enable RL Auto-Optimization" to TRUE, select "Thompson Sampling"
Enable Confluence Modules: Divergence, Volume Analysis, Liquidity Mapping, RSI OB/OS, Trend Analysis, MACD (all recommended)
Enable Chop Filter: Toggle "Enable Chop Filter" to TRUE, sensitivity 1.0 (default)
Historical Training: Enable "Enable Historical Pre-Training", set 300-500 bars
Dashboard: Enable "Show Dashboard", position Top Right, size Large
Learning Phase (First 50-100 Bars)
Monitor Thompson Sampling Section:
Alpha/beta values should diverge from initial 1.0 after 20-30 trades
Expected win% should stabilize around 55-60% (excellent), >50% (acceptable)
"Pulls" column should show balanced exploration (not 100% one strategy)
Monitor Shadow Portfolios:
Equity curves should diverge (different strategies performing differently)
Win rate > 55% is strong
Max drawdown < 15% is healthy
Monitor Training vs Live (if enabled):
Delta difference < 10% indicates good generalization
Large negative delta suggests overfitting
Large positive delta suggests system adapting well
Optimization:
Too few signals: Lower "Base Confluence Threshold" to 2.5-3.0
Too many signals: Raise threshold to 4.0-4.5
One strategy dominates (>80%): Increase "Exploration Rate" to 0.20-0.25
Excessive chop blocking: Lower "Chop Sensitivity" to 0.7-0.8
Signal Interpretation
Dashboard Indicators:
"WAITING FOR SIGNAL": No confluence
"LONG ACTIVE ": Validated long entry
"SHORT ACTIVE ": Validated short entry
Chart Visuals:
Triangle markers: Entry signal (green = long, red = short)
Orange/red background: Chop zone
Lines: Support/resistance if enabled
Position Management
Entry: Enter on triangle marker, confirm direction matches dashboard, check confidence >60%
Stop-Loss: Entry ± 1.5× ATR or at structural swing point
Take-Profit:
TP1: Entry + 1.5R (take 50%, move SL to breakeven)
TP2: Entry + 3.0R (runner) or trail
Position Sizing:
Risk per trade = 1-2% of capital
Position size = (Account × Risk%) / (Entry - SL)
Recommended Settings by Instrument
Stocks (Large Cap): Balanced mode, Threshold 3.5, Thompson Sampling, Chop 1.0, 15min-1H, Training 300-500 bars
Forex Majors: Conservative-Balanced mode, Threshold 3.5-4.0, Thompson Sampling, Chop 0.8-1.0, 5min-30min, Training 400-600 bars
Cryptocurrency: Balanced-APEX mode, Threshold 3.0-3.5, Thompson Sampling, Chop 1.2-1.5, 15min-4H, Training 300-500 bars
Futures: Balanced mode, Threshold 3.5, UCB1 or Thompson, Chop 1.0, 5min-30min, Training 400-600 bars
Technical Approximations & Limitations
1. Thompson Sampling: Pseudo-Random Beta Distribution
Standard: Cryptographic RNG with true beta sampling
This Implementation: Box-Muller transform using market data as entropy source
Impact: Not cryptographically random but maintains exploration-exploitation balance. Sufficient for strategy selection.
2. Shadow Portfolio: Simplified Execution Model
Standard: Order book simulation with slippage, partial fills
This Implementation: Perfect fills at close price, no fees modeled
Impact: Real-world performance ~0.1-0.3% worse per trade due to execution costs.
3. Historical Training: Forward-Looking for Exits Only
Entry signals: Use only past data (causal, no bias)
Exit tracking: Uses future bars to determine SL/TP (forward-looking)
Impact: Acceptable because: (1) Entry logic remains valid, (2) Live trading mirrors training, (3) Improves learning quality. Training win rates reflect 8-bar evaluation window—live performance may differ if positions held longer.
4. Shannon Entropy & DFA: Simplified Calculations
Impact: 10-15% precision loss vs. academic implementations. Still captures predictability and persistence signals effectively.
General Limitations
No Predictive Guarantee: Past performance ≠ future results
Learning Period Required: Minimum 50-100 bars for stable statistics
Overfitting Risk: May not generalize to unprecedented conditions
Single-Instrument: No multi-asset correlation or sector context
Execution Assumptions: Degrades in illiquid markets (<100k volume), major news events, flash crashes
Risk Warnings & Disclaimers
No Guarantee of Profit: All trading involves substantial risk of loss. This indicator is a tool, not a guaranteed profit system.
System Failures: Software bugs possible despite testing. Use appropriate position sizing.
Market Regime Changes: Performance may degrade during extreme volatility (VIX >40), low liquidity periods, or fundamental regime shifts.
Broker-Specific Issues: Real-world execution includes slippage (0.1-0.5%), commissions, overnight financing costs, partial fills.
Forward-Looking Bias in Training: Historical training uses 8-bar forward window for exit evaluation. Dashboard "Training Win%" reflects this method. Real-time performance may differ.
Appropriate Use
This Indicator IS:
✅ Entry trigger system with confluence validation
✅ Risk management framework (automated SL/TP)
✅ Adaptive strategy selection engine
✅ Learning system that improves over time
This Indicator IS NOT:
❌ Complete trading strategy (requires position sizing, portfolio management)
❌ Replacement for due diligence
❌ Guaranteed profit generator
❌ Suitable for complete beginners
Recommended Complementary Analysis: Market context, volume profile, fundamental catalysts, higher timeframe alignment, support/resistance from other sources.
Conclusion
Chronos Reversal Labs V2.0 - Elite Edition synthesizes research from multi-armed bandit theory (Thompson Sampling, UCB, contextual bandits), market microstructure (geometric chop detection, zero-lag filters), and machine learning (shadow portfolio validation, historical pre-training, RSI method meta-learning).
Unlike typical indicator mashups, this system implements mathematically rigorous bandit algorithms with realistic performance validation, three-layer chop detection with adaptive strategy weighting, regime-specific learning, and full transparency on approximations and limitations.
The system is designed for intermediate to advanced traders who understand that no indicator is perfect, but through proper machine learning and realistic validation, we can build systems that improve over time and adapt to changing markets without manual intervention.
Use responsibly. Understand the limitations. Risk disclosure applies. Past performance does not guarantee future results.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Smart Margin Zone
SMART MARGIN ZONE - CME-BASED SUPPORT & RESISTANCE INDICATOR
TITLE FOR PUBLICATION:
Smart Margin Zone - CME Margin-Based Support and Resistance
CATEGORY:
Support and Resistance
SHORT DESCRIPTION (for preview):
Automatically plots margin zones based on CME Group requirements. These zones represent critical price levels where leveraged traders face margin calls, creating natural support and resistance through forced liquidations.
═══════════════════════════════════════════════════════════════
FULL DESCRIPTION FOR TRADINGVIEW:
═══════════════════════════════════════════════════════════════
📊 Smart Margin Zone - Professional Trading Zones Based on CME Data
This indicator automatically calculates and displays margin zones derived from official CME Group margin requirements. These zones represent critical price levels where traders using leverage receive margin calls, triggering forced position closures that create natural support and resistance levels.
═══════════════════════════════════════════════════════════════
🎯 CORE CONCEPT
═══════════════════════════════════════════════════════════════
When price reaches calculated margin zones, traders using 2:1 or 4:1 leverage on CME futures receive margin calls. Brokers automatically liquidate these positions, creating waves of buying or selling pressure that form strong support and resistance levels.
This is not theoretical - it's based on actual margin requirements from CME Group, the world's largest derivatives marketplace.
═══════════════════════════════════════════════════════════════
📐 CALCULATION METHODOLOGY
═══════════════════════════════════════════════════════════════
The indicator uses the following formula to calculate zone sizes:
Zone Size = (Margin Requirement / Tick Value) × Tick Size × 1.10
Where:
• Margin Requirement = Official CME initial margin (updated November 2024)
• Tick Value = Dollar value of minimum price movement
• Tick Size = Minimum price increment
• 1.10 = 10% buffer for realistic zone width
SUPPORTED INSTRUMENTS WITH CME DATA:
Currency Pairs:
• EURUSD: $2,100 margin → 0.0168 zone size
• GBPUSD: $1,800 margin → 0.0144 zone size
• AUDUSD: $1,300 margin → 0.0065 zone size
• NZDUSD: $1,100 margin → 0.0055 zone size
• USDJPY: $3,200 margin → custom calculation
• USDCAD: $950 margin → calculated
• USDCHF: $1,650 margin → calculated
Commodities:
• Gold (XAUUSD): $8,000 margin → 80 points zone size
• Silver (XAGUSD): $6,500 margin → calculated
• WTI Crude Oil: $4,500 margin → calculated
═══════════════════════════════════════════════════════════════
🔍 HOW IT WORKS
═══════════════════════════════════════════════════════════════
1. SWING POINT DETECTION
The indicator automatically identifies swing highs and swing lows using a configurable lookback period (default 10 bars). These become anchor points for zone calculations.
2. FIVE ZONE LEVELS
From each swing point, five zone levels are calculated:
• Zone 1/4 (25%) - First correction level
• Zone 1/2 (50%) - KEY ZONE for trend determination
• Zone 3/4 (75%) - Intermediate level
• Zone 1/1 (100%) - Full margin zone (strongest level)
• Zone 5/4 (125%) - Extended zone
3. TREND IDENTIFICATION
• Close above Zone 1/2 resistance = Bullish trend
• Close below Zone 1/2 support = Bearish trend
• Between zones = Range/consolidation
4. HISTORICAL CONTEXT
Current zones are displayed prominently with fills and labels. Historical zones appear as thin, semi-transparent lines for context without cluttering the chart.
═══════════════════════════════════════════════════════════════
⚙️ FEATURES
═══════════════════════════════════════════════════════════════
AUTOMATED CALCULATION:
✅ Auto-detection of swing highs and lows
✅ Real-time zone updates as new swings form
✅ CME margin data built-in for major instruments
✅ Manual override option for custom calculations
VISUAL CLARITY:
✅ Color-coded zones (red=resistance, green=support)
✅ Adjustable transparency for fills and lines
✅ Current zones bold with fills and price labels
✅ Historical zones thin and transparent
✅ Swing point markers show calculation origins
CUSTOMIZATION:
✅ Show/hide individual zone levels (1/4, 1/2, 3/4, 1/1, 5/4)
✅ Toggle historical zones on/off
✅ Adjustable lookback period (5-50 bars)
✅ Customizable colors for all elements
✅ Line width and transparency controls
✅ Zone extension options (none/right/both)
TREND ANALYSIS:
✅ Optional trend background coloring
✅ Customizable trend colors and transparency
✅ Real-time trend identification display
STATISTICS:
✅ Live statistics table showing:
- Current instrument
- Active zone size
- Calculation mode
- Current trend direction
- Number of zones displayed
ALERTS:
✅ Zone 1/2 breakout (up/down)
✅ Full margin zone 1/1 reached
✅ Customizable alert messages
═══════════════════════════════════════════════════════════════
📈 TRADING APPLICATIONS
═══════════════════════════════════════════════════════════════
ENTRY SIGNALS:
• Bounces from zone levels = potential entry points
• Zone 1/2 breakouts = trend continuation entries
• Zone rejections = reversal opportunities
RISK MANAGEMENT:
• Zone levels = logical stop-loss placement
• Zone 1/1 = maximum risk level
• Zone spacing = position sizing guide
PROFIT TARGETS:
• Next zone level = first target
• Zone 1/1 = full profit target
• Zone breakouts = extended targets
TREND CONFIRMATION:
• Price above Zone 1/2 resistance = confirmed uptrend
• Price below Zone 1/2 support = confirmed downtrend
• Consolidation between zones = wait for breakout
═══════════════════════════════════════════════════════════════
📚 USAGE INSTRUCTIONS
═══════════════════════════════════════════════════════════════
GETTING STARTED:
1. Add indicator to chart of any supported instrument
2. Zones automatically calculate and display
3. Adjust swing detection period if needed (default 10 works well)
4. Customize colors and visibility to your preference
OPTIMAL SETTINGS:
• Best timeframes: H1, H4, Daily, Weekly
• Default swing length (10) suitable for most markets
• Show 2-3 historical zones for context
• Enable swing point markers to see calculation origins
INTERPRETATION:
• Watch for price reactions at zone boundaries
• Strong bounces = respect for margin level
• Clean breaks = momentum continuation
• Multiple touches = zone strength confirmation
SET ALERTS:
• Zone 1/2 breakouts for trend entries
• Zone 1/1 reaches for profit-taking
• Custom alerts for your specific strategy
═══════════════════════════════════════════════════════════════
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════
DATA ACCURACY:
• CME margin requirements updated November 2024
• Margins change periodically - check CME Group website
• Manual mode available for latest margin data
• Indicator provides analysis tool, not financial advice
STATISTICAL PERFORMANCE:
• Historical data shows >60% probability of continued movement after Zone 1/2 breakout
• Zone effectiveness varies by market conditions
• Best results in trending markets with clear swings
LIMITATIONS:
• Margin requirements change - monitor CME updates
• Works best on liquid instruments with clear swings
• Not a standalone trading system
• Should be combined with additional analysis
═══════════════════════════════════════════════════════════════
🔧 METHODOLOGY CREDIT
═══════════════════════════════════════════════════════════════
This indicator is based on the margin zones concept developed by Alexander Bazylev (BTrade indicator for MetaTrader platforms).
The TradingView implementation has been completely rewritten with original enhancements:
• Multiple zone levels instead of single level
• Automatic swing point detection algorithm
• Direct CME data integration
• Historical zone visualization
• Advanced customization options
• Comprehensive statistics and alerts
All code is original and specifically designed for TradingView's Pine Script v5 environment.
═══════════════════════════════════════════════════════════════
💡 BEST PRACTICES
═══════════════════════════════════════════════════════════════
COMBINE WITH:
• Volume analysis for confirmation
• Trend indicators for direction bias
• Price action patterns at zones
• Higher timeframe analysis
AVOID:
• Trading against strong trends at minor zones
• Over-leveraging based solely on zone placement
• Ignoring broader market context
• Expecting perfect bounces every time
OPTIMIZE:
• Adjust swing length for different timeframes
• Shorter period (5-7) for intraday trading
• Longer period (15-20) for swing trading
• Test historical effectiveness on your instruments
═══════════════════════════════════════════════════════════════
📖 EDUCATIONAL VALUE
═══════════════════════════════════════════════════════════════
This indicator helps traders understand:
• How institutional margin requirements affect price
• Where forced liquidations create pressure
• Natural support and resistance formation
• Relationship between leverage and price levels
• Market structure and key technical levels
═══════════════════════════════════════════════════════════════
🔄 VERSION HISTORY
═══════════════════════════════════════════════════════════════
Version 1.0 (Initial Release):
• CME-based zone calculation for 10 instruments
• Automatic swing high/low detection
• 5 zone levels with customizable display
• Historical zones with transparency control
• Swing point markers
• Trend background indicator
• Live statistics table
• Multiple alert conditions
• Fully customizable colors and styles
• English language interface
═══════════════════════════════════════════════════════════════
📞 SUPPORT & FEEDBACK
═══════════════════════════════════════════════════════════════
Questions or suggestions? Leave a comment below!
If you find this indicator useful:
⭐ Please leave a like
💬 Share your experience in comments
🔔 Follow for updates and new indicators
═══════════════════════════════════════════════════════════════
⚖️ DISCLAIMER
═══════════════════════════════════════════════════════════════
This indicator is provided for educational and analytical purposes only. It is not financial advice and should not be the sole basis for trading decisions.
• Past performance does not guarantee future results
• Trading involves substantial risk of loss
• CME margin requirements subject to change
• Always do your own research and risk management
• Consult a financial advisor for investment advice
The creator is not responsible for any trading losses incurred through use of this indicator.
Breakdown Sniper [Riz]Breakdown Sniper is a complete structural-based price-action system designed to identify and validate three major setups
1. Failed Breakdowns (FBD)
2. Breakouts / Breakdowns (BO)
3. Back-Tests (BT)
The script analyzes swing structure, undercuts, reclaim behavior, channel bias, support/resistance levels, and a multi-layer confluence engine to highlight high-quality long/short signals.
It also includes trade management, target projections, trailing logic, risk models, and an optional dashboard for clarity.
Core Concepts Behind the System
1. Pivot Structure & New Low/High Logic
Breakdown Sniper continuously detects pivot highs and lows using user-defined left/right bars.
These pivots are used to determine
⦁ Recent structural lows/highs
⦁ Undercuts (for failed breakdowns)
⦁ Structural breaks (for FBO/BO setups)
This provides the foundation for all three setup types.
2. Failed Breakdown (FBD) Detection
The primary logic of the script is to detect failed breakdowns, which follow this sequence:
1. Identify an initial pivot low
2. Price undercuts that low
3. Price reclaims the level by a specified number of points
4. Optional: new higher low print confirming strength
5. Once confirmed, the script calculates:
⦁ Entry trigger price
⦁ Stop placement (multiple options: below undercut, below initial low, ATR-based, fixed)
⦁ Three profit targets based on risk multiples
The reverse logic is applied for failed breakouts (FBO).
3. Breakouts & Breakdowns (BO)
The system also captures momentum breakouts/breakdowns defined by:
⦁ Price breaking major support/resistance
⦁ Bar-level strength (close vs range)
⦁ ATR-based expansion
⦁ Holding above/below breakout level for a user-defined number of bars
If confirmed, the script projects T1/T2/T3 targets and stop placement automatically.
4. Back-test Setups (BT)
After a confirmed breakout/breakdown, the script monitors for a return to the breakout level, within a percentage tolerance.
If a clean retest occurs:
⦁ A BT Long or BT Short setup is generated
⦁ Risk and target calculations are performed automatically
This allows identifying continuation setups after strong breaks.
Channel & Levels System (Support/Resistance Engine)
The script builds a hybrid S/R and environment model using:
⦁ Regression channel OR
⦁ Donchian, Keltner, Bollinger channels (user-selectable)
The channel provides:
⦁ Upper/Lower boundaries
⦁ Midline
⦁ Trend bias based on slope
Additionally, a multi-touch support/resistance detector clusters pivot-based levels and scores them by:
⦁ Touch count
⦁ Recency
⦁ Age
⦁ Whether they classify as major levels
This explains where reversals and breakouts are most likely.
Confluence Engine
Every Long/Short signal receives a 0–100 score derived from:
⦁ Market structure: HH/HL or LL/LH
⦁ Trend filter (EMA-based)
⦁ Volatility conditions (ATR range requirements)
⦁ Session bias (Asian / London / New York / Overlap)
⦁ Volume expansion
⦁ Higher-timeframe trend (optional)
⦁ Location inside channel
⦁ Distance to nearest S/R
⦁ Setup-type priority (FBD/BO/BT)
Users can require a minimum score before a signal becomes valid.
Trade Management Logic
Once a trade triggers, the indicator handles:
⦁ Entry execution confirmation
⦁ Stop loss tracking
⦁ Three independent profit targets
⦁ Optional scale-ins
⦁ ATR-based trailing stop
⦁ Risk calculations
⦁ Real-time PnL monitoring
The script does not execute live trades — it only visualizes management levels for analysis.
Visual Components
Breakdown Sniper plots:
⦁ Channels & fills
⦁ Auto-detected S/R levels
⦁ Pivot highs/lows
⦁ Buy/Sell markers
⦁ Entry/Stop/Targets
⦁ Trade dashboard (optional)
⦁ Equity curve (optional)
Everything is toggle-based for clean charting.
How To Use the Indicator
Recommended Use-Case
⦁ Futures (ES/NQ/CL/RTY)
⦁ Indices
⦁ Crypto
⦁ FX
Works well on:
⦁ 5m / 15m / 1H
Signals do not repaint because pivots and reclaim sequences require bar completion.
Basic Usage Steps
1. Enable the setups you want to trade: FBD, BO, BT
2. Optionally turn on filters:
⦁ Trend filter
⦁ Volatility filter
⦁ Market structure filter
⦁ MTF trend filter
3. Wait for a valid long/short signal with sufficient confluence
4. Follow the plotted entry level, stop, and targets
5. Use the dashboard to monitor performance of each setup type
Important Notes
This is a structural/price-action tool, not a prediction model
No guarantee of profitability is provided
The indicator is educational and analytical
Always use independent confirmation and risk management
Disclaimer
This script is for education and analysis. It does not provide financial advice. Markets involve risk. Past behavior of any pattern or study does not imply future results. You are responsible for your own decisions.
Liquidity Void Zone Detector [PhenLabs]📊 Liquidity Void Zone Detector
Version: PineScript™v6
📌 Description
The Liquidity Void Zone Detector is a sophisticated technical indicator designed to identify and visualize areas where price moved with abnormally low volume or rapid momentum, creating "voids" in market liquidity. These zones represent areas where insufficient trading activity occurred during price movement, often acting as magnets for future price action as the market seeks to fill these gaps.
Built on PineScript v6, this indicator employs a dual-detection methodology that analyzes both volume depletion patterns and price movement intensity relative to ATR. The revolutionary 3D visualization system uses three-layer polyline rendering with adaptive transparency and vertical offsets, creating genuine depth perception where low liquidity zones visually recede and high liquidity zones protrude forward. This makes critical market structure immediately apparent without cluttering your chart.
🚀 Points of Innovation
Dual detection algorithm combining volume threshold analysis and ATR-normalized price movement sensitivity for comprehensive void identification
Three-layer 3D visualization system with progressive transparency gradients (85%, 78%, 70%) and calculated vertical offsets for authentic depth perception
Intelligent state machine logic that tracks consecutive void bars and only renders zones meeting minimum qualification requirements
Dynamic strength scoring system (0-100 scale) that combines inverted volume ratios with movement intensity for accurate void characterization
Adaptive ATR-based spacing calculation that automatically adjusts 3D layering depth to match instrument volatility
Efficient memory management system supporting up to 100 simultaneous void visualizations with automatic array-based cleanup
🔧 Core Components
Volume Analysis Engine: Calculates rolling volume averages and compares current bar volume against dynamic thresholds to detect abnormally thin trading conditions
Price Movement Analyzer: Normalizes bar range against ATR to identify rapid price movements that indicate liquidity exhaustion regardless of instrument or timeframe
Void Tracking State Machine: Maintains persistent tracking of void start bars, price boundaries, consecutive bar counts, and cumulative strength across multiple bars
3D Polyline Renderer: Generates three-layer rectangular polylines with precise timestamp-to-bar index conversion and progressive offset calculations
Strength Calculation System: Combines volume component (inverted ratio capped at 100) with movement component (ATR intensity × 30) for comprehensive void scoring
🔥 Key Features
Automatic Void Detection: Continuously scans price action for low volume conditions or rapid movements, triggering void tracking when thresholds are exceeded
Real-Time Visualization: Creates 3D rectangular zones spanning from void initiation to termination, with color-coded depth indicating liquidity type
Adjustable Sensitivity: Configure volume threshold multiplier (0.1-2.0x), price movement sensitivity (0.5-5.0x), and minimum qualifying bars (1-10) for customized detection
Dual Color Coding: Separate visual treatment for low liquidity voids (receding red) and high liquidity zones (protruding green) based on 50-point strength threshold
Optional Compact Labels: Toggle LV (Low Volume) or HV (High Volume) circular labels at void centers for quick identification without visual clutter
Lookback Period Control: Adjust analysis window from 5 to 100 bars to match your trading timeframe and market volatility characteristics
Memory-Efficient Design: Automatically manages polyline and label arrays, deleting oldest elements when user-defined maximum is reached
Data Window Integration: Plots void detection binary, current strength score, and average volume for detailed analysis in TradingView's data window
🎨 Visualization
Three-Layer Depth System: Each void is rendered as three stacked polylines with progressive transparency (85%, 78%, 70%) and calculated vertical offsets creating authentic 3D appearance
Directional Depth Perception: Low liquidity zones recede with back layer most transparent; high liquidity zones protrude with front layer most transparent for instant visual differentiation
Adaptive Offset Spacing: Vertical separation between layers calculated as ATR(14) × 0.001, ensuring consistent 3D effect across different instruments and volatility regimes
Color Customization: Fully configurable base colors for both low liquidity zones (default: red with 80 transparency) and high liquidity zones (default: green with 80 transparency)
Minimal Chart Clutter: Closed polylines with matching line and fill colors create clean rectangular zones without unnecessary borders or visual noise
Background Highlight: Subtle yellow background (96% transparency) marks bars where void conditions are actively detected in real-time
Compact Labeling: Optional tiny circular labels with 60% transparent backgrounds positioned at void center points for quick reference
📖 Usage Guidelines
Detection Settings
Lookback Period: Default: 10 | Range: 5-100 | Number of bars analyzed for volume averaging and void detection. Lower values increase sensitivity to recent changes; higher values smooth detection across longer timeframes. Adjust based on your trading timeframe: short-term traders use 5-15, swing traders use 20-50, position traders use 50-100.
Volume Threshold: Default: 1.0 | Range: 0.1-2.0 (step 0.1) | Multiplier applied to average volume. Bars with volume below (average × threshold) trigger void conditions. Lower values detect only extreme volume depletion; higher values capture more moderate low-volume situations. Start with 1.0 and decrease to 0.5-0.7 for stricter detection.
Price Movement Sensitivity: Default: 1.5 | Range: 0.5-5.0 (step 0.1) | Multiplier for ATR-normalized price movement detection. Values above this threshold indicate rapid price changes suggesting liquidity voids. Increase to 2.0-3.0 for volatile instruments; decrease to 0.8-1.2 for ranging or low-volatility conditions.
Minimum Void Bars: Default: 10 | Range: 1-10 | Minimum consecutive bars exhibiting void conditions required before visualization is created. Filters out brief anomalies and ensures only sustained voids are displayed. Use 1-3 for scalping, 5-10 for intraday trading, 10+ for swing trading to match your time horizon.
Visual Settings
Low Liquidity Color: Default: Red (80% transparent) | Base color for zones where volume depletion or rapid movement indicates thin liquidity. These zones recede visually (back layer most transparent). Choose colors that contrast with your chart theme for optimal visibility.
High Liquidity Color: Default: Green (80% transparent) | Base color for zones with relatively higher liquidity compared to void threshold. These zones protrude visually (front layer most transparent). Ensure clear differentiation from low liquidity color.
Show Void Labels: Default: True | Toggle display of compact LV/HV labels at void centers. Disable for cleaner charts when trading; enable for analysis and review to quickly identify void types across your chart.
Max Visible Voids: Default: 50 | Range: 10-100 | Maximum number of void visualizations kept on chart. Each void uses 3 polylines, so setting of 50 maintains 150 total polylines. Higher values preserve more history but may impact performance on lower-end systems.
✅ Best Use Cases
Gap Fill Trading: Identify unfilled liquidity voids that price frequently returns to, providing high-probability retest and reversal opportunities when price approaches these zones
Breakout Validation: Distinguish genuine breakouts through established liquidity from false breaks into void zones that lack sustainable volume support
Support/Resistance Confluence: Layer void detection over key horizontal levels to validate structural integrity—levels within high liquidity zones are stronger than those in voids
Trend Continuation: Monitor for new void formation in trend direction as potential continuation zones where price may accelerate due to reduced resistance
Range Trading: Identify void zones within consolidation ranges that price tends to traverse quickly, helping to avoid getting caught in rapid moves through thin areas
Entry Timing: Wait for price to reach void boundaries rather than entering mid-void, as voids tend to be traversed quickly with limited profit-taking opportunities
⚠️ Limitations
Historical Pattern Indicator: Identifies past liquidity voids but cannot predict whether price will return to fill them or when filling might occur
No Volume on Forex: Indicator uses tick volume for forex pairs, which approximates but doesn't represent true trading volume, potentially affecting detection accuracy
Lagging Confirmation: Requires minimum consecutive bars (default 10) before void is visualized, meaning detection occurs after void formation begins
Trending Market Behavior: Strong trends driven by fundamental catalysts may create voids that remain unfilled for extended periods or permanently
Timeframe Dependency: Detection sensitivity varies significantly across timeframes; settings optimized for one timeframe may not perform well on others
No Directional Bias: Indicator identifies liquidity characteristics but provides no predictive signal for price direction after void detection
Performance Considerations: Higher max visible void settings combined with small minimum void bars can generate numerous visualizations impacting chart rendering speed
💡 What Makes This Unique
Industry-First 3D Visualization: Unlike flat volume or liquidity indicators, the three-layer rendering with directional depth perception provides instant visual hierarchy of liquidity quality
Dual-Mode Detection: Combines both volume-based and movement-based detection methodologies, capturing voids that single-approach indicators miss
Intelligent Qualification System: State machine logic prevents premature visualization by requiring sustained void conditions, reducing false signals and chart clutter
ATR-Normalized Analysis: All detection thresholds adapt to instrument volatility, ensuring consistent performance across stocks, forex, crypto, and futures without constant recalibration
Transparency-Based Depth: Uses progressive transparency gradients rather than colors or patterns to create depth, maintaining visual clarity while conveying information hierarchy
Comprehensive Strength Metrics: 0-100 void strength calculation considers both the degree of volume depletion and the magnitude of price movement for nuanced zone characterization
🔬 How It Works
Phase 1: Real-Time Detection
On each bar close, the indicator calculates average volume over the lookback period and compares current bar volume against the volume threshold multiplier
Simultaneously measures current bar's high-low range and normalizes it against ATR, comparing the result to price movement sensitivity parameter
If either volume falls below threshold OR movement exceeds sensitivity threshold, the bar is flagged as exhibiting void characteristics
Phase 2: Void Tracking & Qualification
When void conditions first appear, state machine initializes tracking variables: start bar index, initial top/bottom prices, consecutive bar counter, and cumulative strength accumulator
Each subsequent bar with void conditions extends the tracking, updating price boundaries to envelope all bars and accumulating strength scores
When void conditions cease, system checks if consecutive bar count meets minimum threshold; if yes, proceeds to visualization; if no, discards the tracking and resets
Phase 3: 3D Visualization Construction
Calculates average void strength by dividing cumulative strength by number of bars, then determines if void is low liquidity (>50 strength) or high liquidity (≤50 strength)
Generates three polyline layers spanning from start bar to end bar and from top price to bottom price, each with calculated vertical offset based on ATR
Applies progressive transparency (85%, 78%, 70%) with layer ordering creating recession effect for low liquidity zones and protrusion effect for high liquidity zones
Creates optional center label and pushes all visual elements into arrays for memory management
Phase 4: Memory Management & Display
Continuously monitors polyline array size (each void creates 3 polylines); when total exceeds max visible voids × 3, deletes oldest polylines via array.shift()
Similarly manages label array, removing oldest labels when count exceeds maximum to prevent memory accumulation over extended chart history
Plots diagnostic data to TradingView’s data window (void detection binary, current strength, average volume) for detailed analysis without cluttering main chart
💡 Note:
This indicator is designed to enhance your market structure analysis by revealing liquidity characteristics that aren’t visible through standard price and volume displays. For best results, combine void detection with your existing support/resistance analysis, trend identification, and risk management framework. Liquidity voids are descriptive of past market behavior and should inform positioning decisions rather than serve as standalone entry/exit signals. Experiment with detection parameters across different timeframes to find settings that align with your trading style and instrument characteristics.
ZigZag + Support/ResistanceZigZag + Support/Resistance — Overview
This tool combines a ZigZag swing-detection engine with an automatic Support and Resistance system. Swing highs become resistance zones, swing lows become support zones, and each zone is drawn, merged, extended, or expired according to market activity.
The goal of this indicator is to create a clear, structured view of market turning points and key levels, without manual plotting. It helps traders understand where price has previously reacted, where liquidity may rest, and how structure shifts over time.
How the Indicator Works
The ZigZag engine identifies significant market swings by waiting for price to move far enough in one direction to confirm a true turning point.
A confirmed swing low becomes a Support level.
A confirmed swing high becomes a Resistance level.
The indicator connects ZigZag pivots visually if enabled.
Every time a new swing forms, the indicator automatically adds or updates the nearest Support or Resistance zone.
Support and Resistance Zones
Instead of drawing simple horizontal lines, this script uses price “bands” taken from the candle’s wick and body at the swing point. This gives more realistic zones that represent true areas where the market reacted.
Each zone extends to the right for a user-defined number of bars and remains active until one of the following occurs:
Price breaks the level
(optional: requires a candle close depending on settings)
The level expires
based on the chosen lifetime or automatic timeframe-based defaults.
When a zone is broken or expires, it automatically disappears from the chart.
Zone Merging
The indicator includes advanced logic to identify overlapping or near-overlapping zones:
Zones that touch or nearly touch each other can be merged.
Merged zones can be displayed with a neutral color if desired.
The tool automatically combines, updates, and redraws these zones to keep the chart clean and organized.
This prevents clutter and highlights areas where multiple reactions have occurred, signaling stronger levels.
ZigZag Swings
The ZigZag component identifies major market swings using the “ZigZag Length” setting.
Higher values produce fewer, stronger swings.
Lower values produce more detailed swing structure.
When enabled, the indicator draws straight lines connecting each ZigZag pivot to the next, outlining the overall trend and showing the flow of market structure.
Each ZigZag pivot directly feeds the Support/Resistance system.
Key Features
Automatic support and resistance detection
Full zone visualization (rectangles or lines)
Optional merging of overlapping or nearby zones
Adjustable zone transparency and appearance
Time-based expiration of old or inactive levels
Option for break-confirmation using only candle closes
ZigZag swing visualization
Adaptable to any timeframe
Recommended Use
This indicator is designed for traders who rely on market structure, swing analysis, or price-reaction areas. It is useful for identifying potential turning points, breakout zones, liquidity areas, and strong historical supports/resistances.
Whether you trade reversals, breakouts, trend continuation, or liquidity concepts, this tool provides an organized and automated view of the most important levels on the chart.
[Algoros] BTC Major Trendline# BTC Major Trendline - Long-Term Bitcoin Trend Analysis
## Overview
BTC Major Trendline is a comprehensive technical analysis tool designed to track Bitcoin's long-term bullish trajectory using historically significant price points. This indicator establishes a primary upward trendline anchored to two major Bitcoin cycle lows, along with optional parallel channels and Fibonacci-based price projections.
## ⚠️ Important Requirements
**This indicator requires a Bitcoin chart with sufficient historical data dating back to at least April 2013.**
**✅ Recommended Charts:**
- `INDEX:BTCUSD` - Bitcoin Index (comprehensive history)
- `BITSTAMP:BTCUSD` - Bitstamp Bitcoin (default setting)
**❌ Will NOT work properly on:**
- Charts with limited history (Like hourly charts)
- Exchanges that launched after 2013
- Altcoin pairs or other cryptocurrencies
If the indicator doesn't display correctly, switch to one of the recommended Bitcoin charts above.
## Key Features
### 📈 Primary Trendline
- Anchored to two historically significant lows:
- **Start Point**: July 6, 2013 - Early Bitcoin accumulation phase
- **End Point**: November 21, 2022 - FTX collapse bottom
- Automatically calculates and extends the trendline based on these anchor points
- Displayed as a solid orange line
### 🔷 Parallel Channel Line (Optional)
- Creates an upper boundary by connecting historical high points:
- April 10, 2013 and June 11, 2017
- Helps identify potential resistance zones and channel breakouts
- Displayed as a blue dotted line for easy distinction
### 🎯 Fibonacci Trendline Multipliers (Optional)
- Seven Fibonacci-based projection lines: **1.6x, 2x, 3x, 5x, 8x, 13x, and 21x**
- Each multiplier creates a parallel trendline above the main trend
- Color-coded from teal to maroon for clear visual separation
- Useful for identifying potential profit-taking zones and long-term price targets
### 📉 Negative Fibonacci Trendlines (Optional)
- Seven division-based support lines: **÷1.6, ÷2, ÷3, ÷5, ÷8, ÷13, and ÷21**
- Projects downward channels below the main trendline
- Displayed in yellow tones for easy identification
- Helps identify extreme oversold conditions and potential bounce zones
## Customization Options
- **Symbol Input**: Track any Bitcoin pair with sufficient history (default: BITSTAMP:BTCUSD)
- **Show/Hide Components**: Toggle parallel line, Fibonacci multipliers, and negative Fibonacci lines independently
- **Line Extension**: Extend lines right, left, both directions, or none
- **Multi-Timeframe Compatible**: View on any timeframe once loaded on a compatible chart
## How to Use
1. **Setup**: First, open a Bitcoin chart with sufficient history (INDEX:BTCUSD or BITSTAMP:BTCUSD recommended)
2. **Trend Confirmation**: The main orange trendline represents the long-term bullish trajectory. Price staying above this line suggests the bull market remains intact.
3. **Channel Trading**: Use the parallel line (blue dotted) as a potential upper boundary for the long-term channel.
4. **Price Targets**: Enable Fibonacci multiplier lines to identify ambitious long-term price targets during bull runs. Higher multipliers (13x, 21x) represent parabolic extension zones.
5. **Support Identification**: Enable negative Fibonacci lines to spot potential support zones during corrections or bear markets.
6. **Risk Management**: Breaking below the main trendline could signal a shift in long-term trend, warranting caution.
## Technical Implementation
- Uses `request.security()` to fetch precise daily prices at historical timestamps
- Requires access to Bitcoin price data from April 2013 onwards
- Calculates slope dynamically based on anchor points
- All lines update in real-time as new price data emerges
- Efficient rendering system minimizes performance impact
## Best Used For
✅ Long-term Bitcoin investors and HODLers
✅ Identifying major trend direction
✅ Setting realistic long-term price targets
✅ Spotting potential support/resistance zones
✅ Multi-timeframe analysis (on compatible charts)
✅ Educational purposes (understanding logarithmic growth)
## Troubleshooting
**Lines not appearing?**
- Ensure you're viewing INDEX:BTCUSD or BITSTAMP:BTCUSD
- Check that the chart has data back to April 2013
- Verify the symbol input matches your chart
- Try switching to a daily or weekly timeframe first
Smart Levels📊 SMART LEVELS - Dynamic Support & Resistance Indicator
═══════════════════════════════════════════════════════════════
🎯 OVERVIEW
Smart Levels is an advanced support and resistance indicator that automatically identifies and displays the most significant price levels based on historical pivot points. Unlike simple pivot indicators, Smart Levels uses intelligent clustering and weighting algorithms to merge nearby extremums and highlight only the most reliable levels that matter for trading decisions.
This indicator emphasizes identifying key price levels where multiple pivot points converge, creating zones of increased probability for price reactions.
═══════════════════════════════════════════════════════════════
🔧 HOW IT WORKS
1. PIVOT POINT DETECTION
The indicator scans historical price data to identify pivot highs and pivot lows using configurable left/right bar parameters. Each detected extremum represents a potential support or resistance point where price previously reversed.
2. INTELLIGENT LEVEL CLUSTERING
KEY INNOVATION: Instead of drawing a line at every pivot point, Smart Levels uses an ATR-based clustering algorithm to merge nearby extremums into consolidated levels.
• Extremums within a specified percentage of ATR are grouped together
• The level price is calculated as a weighted average of all contributing pivot points
• This eliminates visual clutter and focuses on truly significant zones
3. TOUCH-BASED LEVEL RANKING
Levels are ranked by the number of pivot points (touches) that contributed to them:
• 5+ touches: Strong levels (solid lines, thicker width)
• 2-4 touches: Moderate levels (dashed lines, standard width)
• Only levels meeting the minimum touch threshold are displayed
4. LEVEL CLASSIFICATION
Each level is automatically classified based on the types of extremums it contains:
• 🟢 SUPPORT - Contains only pivot lows (green)
• 🔴 RESISTANCE - Contains only pivot highs (red)
• 🔵 MIRROR LEVEL - Contains both highs and lows, indicating a level that has acted as both support and resistance (blue)
═══════════════════════════════════════════════════════════════
📋 KEY FEATURES
✨ SMART LEVEL DETECTION
• ATR-Adaptive Clustering: Automatically adjusts merge zones based on market volatility
• Configurable History: Look back 50-500 bars to find relevant levels
• Touch-Based Filtering: Only show levels with minimum confirmation (2-10 touches)
• Top N Display: Automatically displays the strongest 3-20 levels to avoid clutter
📊 DETAILED PRICE INFORMATION
• Multi-Line Price Labels: Each level shows ALL contributing pivot prices in a vertical list
• Labels display the exact historical prices that formed the level
• Visual classification icons (↑ support, ↓ resistance, 🔄 mirror)
• Labels positioned to the right of current price for clear visibility
🎨 VISUAL CUSTOMIZATION
• Customizable colors for support, resistance, and mirror levels
• Automatic line styling based on level strength
• Optional debug mode showing all detected pivot points
• Highlight feature that marks which extremums contributed to displayed levels
📈 REAL-TIME UPDATES
• Levels recalculate on every bar for dynamic adaptation
• Lines extend into the future for forward-looking analysis
• Information table shows current ATR, merge zone, and level statistics
═══════════════════════════════════════════════════════════════
⚙️ INPUT PARAMETERS
EXTREMUM DETECTION
• Bars Left (7) - Number of bars to the left for pivot detection (2-20)
• Bars Right (7) - Number of bars to the right for pivot detection (2-20)
• Lookback History (200) - How many bars back to analyze for levels (50-500)
LEVEL SETTINGS
• Merge Percent (0.8% ATR) - Maximum distance to cluster extremums (0.2-3.0%)
• Minimum Touches (2) - Minimum pivot points required to display a level (2-10)
• Maximum Levels (10) - How many top levels to display (3-20)
VISUAL OPTIONS
• Support Color (Green) - Color for support levels
• Resistance Color (Red) - Color for resistance levels
• Mirror Color (Blue) - Color for mirror levels
• Show Debug Pivots - Display all detected pivot points
• Highlight Used Extremums - Mark extremums that form displayed levels
═══════════════════════════════════════════════════════════════
📖 HOW TO USE
BASIC SETUP
1. Add the indicator to your chart (works on any timeframe)
2. Start with default parameters and observe the detected levels
3. Adjust "Minimum Touches" to filter more/less levels
4. Tune "Merge Percent" based on your timeframe and instrument volatility
TRADING APPLICATIONS
1. Entry Timing: Watch for price reactions at identified levels for potential entry points
2. Stop Loss Placement: Place stops beyond strong levels (5+ touches)
3. Target Selection: Use the next significant level as a profit target
4. Breakout Confirmation: Monitor for decisive breaks of strong resistance/support levels
5. Mirror Level Strategy: Blue levels that flip from support to resistance (or vice versa) can provide high-probability setups
INTERPRETATION TIPS
• Solid thick lines (5+ touches) = Extremely reliable levels with strong historical significance
• Dashed lines (2-4 touches) = Valid levels but with less confirmation
• Mirror levels (blue) = Highest probability zones as they've worked in both directions
• Check the price labels to see the exact historical prices that formed each level
RECOMMENDED SETTINGS BY TIMEFRAME
• Scalping (1m-5m): Lookback 100-150, Merge 0.5-0.8%, Min Touches 2-3
• Intraday (15m-1h): Lookback 150-200, Merge 0.8-1.2%, Min Touches 3-4
• Swing (4h-1D): Lookback 200-300, Merge 1.0-1.5%, Min Touches 3-5
• Position (1D-1W): Lookback 300-500, Merge 1.5-2.0%, Min Touches 4-6
═══════════════════════════════════════════════════════════════
🔍 DEBUG FEATURES
Enable the debug options to understand how the indicator works:
• Show Debug Pivots: Displays small triangles at all detected pivot points (faded)
• Highlight Used Extremums: Bright colored triangles show which pivots contributed to displayed levels
• Info Table: Shows current ATR, merge zone size, number of detected extremums, and active levels
These features help you fine-tune parameters and understand why certain levels appear or disappear.
═══════════════════════════════════════════════════════════════
⚡ TECHNICAL DETAILS
• Version: Pine Script v5
• Overlay: Yes (draws directly on price chart)
• Maximum Lines: 50 (configurable limit)
• Maximum Labels: 50 (configurable limit)
• ATR Period: 14 bars (standard volatility measurement)
• Calculation Method: Weighted average of clustered pivot points
• Update Frequency: Every bar (dynamic recalculation)
═══════════════════════════════════════════════════════════════
💡 WHAT MAKES THIS INDICATOR ORIGINAL
1. INTELLIGENT CLUSTERING ALGORITHM
Unlike basic pivot indicators that draw every level, Smart Levels uses ATR-adaptive clustering to merge nearby extremums, highlighting only the most significant zones
2. DETAILED PRICE HISTORY
Multi-line labels show ALL historical prices that formed each level, providing transparency about level formation
3. DYNAMIC STRENGTH VISUALIZATION
Automatic line styling (solid vs dashed, thickness) based on level confirmation strength
4. MIRROR LEVEL DETECTION
Identifies zones that have acted as both support AND resistance, which are statistically more reliable
5. REAL-TIME ADAPTATION
Continuous recalculation ensures levels remain relevant as new price action develops
6. VISUAL DEBUGGING SYSTEM
Comprehensive tools to understand level formation and tune parameters effectively
═══════════════════════════════════════════════════════════════
⚠️ IMPORTANT NOTES
• This indicator identifies historical support/resistance zones - it does NOT predict future price movements
• Always combine with other forms of analysis (trend, volume, fundamentals) for trading decisions
• Levels can break - use proper risk management and stop losses
• Higher timeframes generally produce more reliable levels
• On first load, the indicator needs leftBars + rightBars bars to detect the first pivots
═══════════════════════════════════════════════════════════════
📚 METHODOLOGY BACKGROUND
This indicator implements a clustering-based approach to support and resistance analysis, which emphasizes:
• Identifying price levels where multiple extremums converge
• Focusing on the strongest, most tested levels rather than every minor pivot
• Using historical price behavior to anticipate future support/resistance
• Combining level analysis with proper risk management and position sizing
The clustering approach ensures that levels represent genuine zones of supply/demand accumulation rather than isolated price spikes, making them more reliable for trading decisions.
═══════════════════════════════════════════════════════════════
WaveLab GOLD Study**Description**
`WaveLab GOLD Study – Liquidity & Structure` is an educational chart study that visualizes market structure, liquidity context and confluence.
It is not a trading system and does not generate trade instructions or orders.
**Main Components**
* **Liquidity Engine** – Builds demand/supply-style boxes around strong breaks of structure, high-volume candles and optional FVG conditions.
When price revisits a strong box, the study can plot bar markers:
`B` below the bar for bullish context, `S` above the bar for bearish context.
* **Trend & LR / MTF Context** – Optional EMAs, Donchian, VWAP and a Linear Regression slope with simple angle classification (`strong up / flat / strong down`), plus multi-timeframe RSI to show broader directional background.
* **Price Action Layer** – Detects a small set of classic bar patterns (engulfing, hammer / shooting star, inside / outside bar) and summarizes them into a qualitative bias (bullish, bearish, inside, outside, neutral).
* **Dashboard** – Compact table that displays price, short-term momentum, trend state, PA status, liquidity context and the current B/S confluence marker.
**How to Use (Educational)**
1. Start from liquidity boxes to see where reactions cluster.
2. Add trend, LR and MTF context to understand whether price is moving with or against the broader environment.
3. Use B/S markers and the dashboard only as visual summaries to review bars and build a discretionary framework; they are not entry or exit signals.
**Disclaimer**
This script is for educational and illustrative purposes only.
It does not provide financial advice or recommendations, and any trading decisions remain entirely the user’s responsibility.






















