OPEN-SOURCE SCRIPT
Ultimate Sideways Market Detector PRO V2

Ultimate Sideways Market Detector PRO V2
Advanced Market Structure, Consolidation & Breakout Detection System
Ultimate Sideways Market Detector PRO V2 is an advanced all-in-one TradingView indicator designed to identify sideways markets, consolidation zones, volatility compression, liquidity sweeps, smart money activity, and potential breakout opportunities before major price movements occur.
Instead of relying on a single indicator, this system combines multiple market analysis techniques into one powerful scoring engine that helps traders understand current market conditions and prepare for future market expansion.
Suitable for Crypto, Forex, Stocks, Indices, and Commodities.
---
# Core Features
✅ Sideways Market Detection
✅ ADX Trend Strength Analysis
✅ Choppiness Index Analysis
✅ ATR Compression Detection
✅ Bollinger Band Width Compression
✅ EMA Flatness Detection
✅ Range Compression Analysis
✅ Volume Compression Filter
✅ Volatility Squeeze Detection
✅ Keltner Channel Compression
✅ Multi-Timeframe Confirmation
✅ Smart Money Consolidation Detection
✅ Liquidity Sweep Detection
✅ Fake Breakout Filter
✅ Auto Support & Resistance
✅ Breakout Probability Engine
✅ Sideways Strength Meter
✅ Market State Dashboard
✅ Trend Cloud Visualization
✅ Real-Time Alerts
---
# Market States
The dashboard automatically classifies market conditions into the following states:
### SIDEWAYS
Market is consolidating inside a range.
Best Use:
• Buy near support
• Sell near resistance
• Prepare for breakouts
---
### UPTREND
Strong bullish market.
Best Use:
• Focus on long opportunities
• Buy pullbacks
---
### DOWNTREND
Strong bearish market.
Best Use:
• Focus on short opportunities
• Sell pullbacks
---
### VOLATILE
High volatility environment.
Best Use:
• Reduce position size
• Expect larger price swings
---
### TRANSITION
Market is changing conditions.
Best Use:
• Wait for confirmation
• Avoid aggressive entries
---
# Dashboard Guide
### STATE
Current market condition.
### SCORE
Overall consolidation score.
Below 40 = Trending
40-70 = Moderate Consolidation
70-90 = Strong Sideways Market
Above 90 = Extreme Compression
---
### STRENGTH
Measures consolidation quality.
0-30 = Weak
30-60 = Moderate
60-80 = Strong
80-100 = Very Strong
Higher values often indicate stronger breakout potential.
---
### SQUEEZE
Measures volatility compression intensity.
Higher values indicate stronger energy build-up.
---
### MTF
Multi-Timeframe Agreement.
YES = Multiple timeframes agree.
NO = Timeframes disagree.
---
### BREAKOUT
Breakout Probability Meter.
0-40% = Low Probability
40-60% = Moderate Probability
60-80% = Strong Probability
80-100% = Very High Probability
---
### ADX
Trend Strength Measurement.
Below 20 = Weak Trend
Above 25 = Strong Trend
Above 35 = Very Strong Trend
---
### MODE
RANGE = Sideways Market
TREND = Trending Market
---
# Feature Breakdown
### ADX Analysis
Measures trend strength.
Low ADX often indicates consolidation.
High ADX often indicates trending conditions.
---
### Choppiness Index
Measures how directional or random price action is.
High Choppiness = Sideways Market
Low Choppiness = Trending Market
---
### ATR Compression
Measures volatility contraction.
Low ATR often appears before major expansion phases.
---
### Bollinger Band Width
Measures market compression.
Narrow Bands = Compression
Wide Bands = Expansion
---
### EMA Flatness
Flat EMA often indicates consolidation.
Steep EMA often indicates trend strength.
---
### Range Compression
Detects narrow trading ranges that may lead to future breakouts.
---
### Volume Compression
Detects reduced participation before volatility expansion.
---
### Volatility Squeeze
Compares Bollinger Bands and Keltner Channels to identify volatility compression.
Strong squeeze conditions often appear before significant market moves.
---
### Multi-Timeframe Confirmation
Uses multiple timeframes to improve signal quality and reduce false setups.
---
### Smart Money Consolidation
Highlights accumulation and distribution zones where larger market participants may be active.
---
### Liquidity Sweeps
Identifies potential stop hunts and liquidity grabs.
Bull Sweep:
Price breaks below support and quickly recovers.
Bear Sweep:
Price breaks above resistance and quickly rejects.
---
### Fake Breakout Filter
Attempts to eliminate weak breakout attempts and improve signal quality.
---
### Auto Support & Resistance
Automatically detects important swing levels for entries, exits, stop placement, and breakout validation.
---
# How To Use This Indicator
### Step 1
Check STATE.
Determine whether the market is Sideways, Trending, Volatile, or in Transition.
---
### Step 2
Check SCORE.
Higher scores indicate stronger consolidation.
---
### Step 3
Check STRENGTH.
Higher strength means stronger compression and greater breakout potential.
---
### Step 4
Check Volatility Squeeze.
Compression often precedes expansion.
---
### Step 5
Check MTF Agreement.
Signals become stronger when multiple timeframes agree.
---
### Step 6
Check Breakout Probability.
Higher values indicate stronger breakout potential.
---
### Step 7
Wait for a Valid BUY or SELL Breakout Signal.
---
### Step 8
Apply proper risk management.
---
# Best High-Probability Breakout Setup
Look for:
✅ STATE = SIDEWAYS
✅ SCORE Above 80
✅ STRENGTH Above 70
✅ Volatility Squeeze Active
✅ MTF Agreement = YES
✅ Breakout Probability Above 70
Then wait for:
✅ Valid BUY Breakout
or
✅ Valid SELL Breakout
---
# Best Reversal Setup
Look for:
✅ Bull Sweep near Support
or
✅ Bear Sweep near Resistance
Then wait for confirmation.
These setups often indicate trapped traders and liquidity grabs.
---
# Alerts Available
• Sideways Started
• Sideways Ended
• Bullish Breakout
• Bearish Breakout
• Bull Liquidity Sweep
• Bear Liquidity Sweep
• Volatility Squeeze Active
---
# Recommended Markets
✅ Crypto
✅ Forex
✅ Stocks
✅ Indices
✅ Commodities
---
# Recommended Timeframes
Scalping:
5M, 15M
Intraday:
15M, 30M, 1H
Swing Trading:
4H, 1D
---
# Important Notice
This indicator is intended for educational and decision-support purposes only.
No indicator can predict future price movements with complete accuracy.
Always use proper risk management, position sizing, and independent analysis before entering any trade.
Thank you for using Ultimate Sideways Market Detector PRO V2.
Advanced Market Structure, Consolidation & Breakout Detection System
Ultimate Sideways Market Detector PRO V2 is an advanced all-in-one TradingView indicator designed to identify sideways markets, consolidation zones, volatility compression, liquidity sweeps, smart money activity, and potential breakout opportunities before major price movements occur.
Instead of relying on a single indicator, this system combines multiple market analysis techniques into one powerful scoring engine that helps traders understand current market conditions and prepare for future market expansion.
Suitable for Crypto, Forex, Stocks, Indices, and Commodities.
---
# Core Features
✅ Sideways Market Detection
✅ ADX Trend Strength Analysis
✅ Choppiness Index Analysis
✅ ATR Compression Detection
✅ Bollinger Band Width Compression
✅ EMA Flatness Detection
✅ Range Compression Analysis
✅ Volume Compression Filter
✅ Volatility Squeeze Detection
✅ Keltner Channel Compression
✅ Multi-Timeframe Confirmation
✅ Smart Money Consolidation Detection
✅ Liquidity Sweep Detection
✅ Fake Breakout Filter
✅ Auto Support & Resistance
✅ Breakout Probability Engine
✅ Sideways Strength Meter
✅ Market State Dashboard
✅ Trend Cloud Visualization
✅ Real-Time Alerts
---
# Market States
The dashboard automatically classifies market conditions into the following states:
### SIDEWAYS
Market is consolidating inside a range.
Best Use:
• Buy near support
• Sell near resistance
• Prepare for breakouts
---
### UPTREND
Strong bullish market.
Best Use:
• Focus on long opportunities
• Buy pullbacks
---
### DOWNTREND
Strong bearish market.
Best Use:
• Focus on short opportunities
• Sell pullbacks
---
### VOLATILE
High volatility environment.
Best Use:
• Reduce position size
• Expect larger price swings
---
### TRANSITION
Market is changing conditions.
Best Use:
• Wait for confirmation
• Avoid aggressive entries
---
# Dashboard Guide
### STATE
Current market condition.
### SCORE
Overall consolidation score.
Below 40 = Trending
40-70 = Moderate Consolidation
70-90 = Strong Sideways Market
Above 90 = Extreme Compression
---
### STRENGTH
Measures consolidation quality.
0-30 = Weak
30-60 = Moderate
60-80 = Strong
80-100 = Very Strong
Higher values often indicate stronger breakout potential.
---
### SQUEEZE
Measures volatility compression intensity.
Higher values indicate stronger energy build-up.
---
### MTF
Multi-Timeframe Agreement.
YES = Multiple timeframes agree.
NO = Timeframes disagree.
---
### BREAKOUT
Breakout Probability Meter.
0-40% = Low Probability
40-60% = Moderate Probability
60-80% = Strong Probability
80-100% = Very High Probability
---
### ADX
Trend Strength Measurement.
Below 20 = Weak Trend
Above 25 = Strong Trend
Above 35 = Very Strong Trend
---
### MODE
RANGE = Sideways Market
TREND = Trending Market
---
# Feature Breakdown
### ADX Analysis
Measures trend strength.
Low ADX often indicates consolidation.
High ADX often indicates trending conditions.
---
### Choppiness Index
Measures how directional or random price action is.
High Choppiness = Sideways Market
Low Choppiness = Trending Market
---
### ATR Compression
Measures volatility contraction.
Low ATR often appears before major expansion phases.
---
### Bollinger Band Width
Measures market compression.
Narrow Bands = Compression
Wide Bands = Expansion
---
### EMA Flatness
Flat EMA often indicates consolidation.
Steep EMA often indicates trend strength.
---
### Range Compression
Detects narrow trading ranges that may lead to future breakouts.
---
### Volume Compression
Detects reduced participation before volatility expansion.
---
### Volatility Squeeze
Compares Bollinger Bands and Keltner Channels to identify volatility compression.
Strong squeeze conditions often appear before significant market moves.
---
### Multi-Timeframe Confirmation
Uses multiple timeframes to improve signal quality and reduce false setups.
---
### Smart Money Consolidation
Highlights accumulation and distribution zones where larger market participants may be active.
---
### Liquidity Sweeps
Identifies potential stop hunts and liquidity grabs.
Bull Sweep:
Price breaks below support and quickly recovers.
Bear Sweep:
Price breaks above resistance and quickly rejects.
---
### Fake Breakout Filter
Attempts to eliminate weak breakout attempts and improve signal quality.
---
### Auto Support & Resistance
Automatically detects important swing levels for entries, exits, stop placement, and breakout validation.
---
# How To Use This Indicator
### Step 1
Check STATE.
Determine whether the market is Sideways, Trending, Volatile, or in Transition.
---
### Step 2
Check SCORE.
Higher scores indicate stronger consolidation.
---
### Step 3
Check STRENGTH.
Higher strength means stronger compression and greater breakout potential.
---
### Step 4
Check Volatility Squeeze.
Compression often precedes expansion.
---
### Step 5
Check MTF Agreement.
Signals become stronger when multiple timeframes agree.
---
### Step 6
Check Breakout Probability.
Higher values indicate stronger breakout potential.
---
### Step 7
Wait for a Valid BUY or SELL Breakout Signal.
---
### Step 8
Apply proper risk management.
---
# Best High-Probability Breakout Setup
Look for:
✅ STATE = SIDEWAYS
✅ SCORE Above 80
✅ STRENGTH Above 70
✅ Volatility Squeeze Active
✅ MTF Agreement = YES
✅ Breakout Probability Above 70
Then wait for:
✅ Valid BUY Breakout
or
✅ Valid SELL Breakout
---
# Best Reversal Setup
Look for:
✅ Bull Sweep near Support
or
✅ Bear Sweep near Resistance
Then wait for confirmation.
These setups often indicate trapped traders and liquidity grabs.
---
# Alerts Available
• Sideways Started
• Sideways Ended
• Bullish Breakout
• Bearish Breakout
• Bull Liquidity Sweep
• Bear Liquidity Sweep
• Volatility Squeeze Active
---
# Recommended Markets
✅ Crypto
✅ Forex
✅ Stocks
✅ Indices
✅ Commodities
---
# Recommended Timeframes
Scalping:
5M, 15M
Intraday:
15M, 30M, 1H
Swing Trading:
4H, 1D
---
# Important Notice
This indicator is intended for educational and decision-support purposes only.
No indicator can predict future price movements with complete accuracy.
Always use proper risk management, position sizing, and independent analysis before entering any trade.
Thank you for using Ultimate Sideways Market Detector PRO V2.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
For access & queries: algochiefsupport@gmail.com
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
For access & queries: algochiefsupport@gmail.com
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.