OPEN-SOURCE SCRIPT

Market Structure HH-HL / LL-LH / Xcelerate Trade

489
Xcelerate - Market Structure HH-HL / LL-LH
📈 Overview

Professional market structure identification tool that automatically detects Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) with intelligent timeframe-optimized settings. Perfect for swing trading, trend analysis, and market structure breaks.

🎯 Key Features

🔧 Auto Timeframe Optimization:

1m charts: L=3/R=2 (Fast scalping detection)
5m charts: L=4/R=3 (Day trading optimized)
15m charts: L=5/R=4 (Swing entry points)
1H+ charts: L=6/R=4 (Position trading structure)
📊 Visual Indicators:

Green triangles: HH (up) and HL (down) - Bullish structure
Red triangles: LH (up) and LL (down) - Bearish structure
Clean, minimal design that doesn't clutter your charts
Auto-sizing markers that adapt to chart zoom
⚡ Smart Alerts:

HH-HL-HH Pattern: Bullish structure continuation
LL-LH-LL Pattern: Bearish structure continuation
Custom alert messages with ticker and timeframe info
⚙️ Settings

Auto Settings (Recommended):

Toggle ON for automatic timeframe optimization
Real-time display panel shows current L/R values
Tested across multiple market conditions
Manual Override:

Custom Pivot Length Left/Right for advanced users
Wait for bar close option for confirmed signals
Filter pivots option for cleaner visualization
🎯 How to Use

Trend Identification: Follow the color-coded structure

Green sequence = Bullish trend
Red sequence = Bearish trend
Entry Points: Look for HL in uptrends, LH in downtrends

Structure Breaks: When HH/HL sequence breaks = potential reversal

Multi-Timeframe: Use on different timeframes for confluence

📚 Best Practices

Combine with support/resistance levels
Use alerts for automated monitoring
Higher timeframes for major structure, lower for entries
Wait for bar close confirmation on important levels
🔔 Alert Setup

Go to "Create Alert"
Select "HH-HL-HH Alert" or "LL-LH-LL Alert"
Choose "Once Per Bar Close" for best results
Perfect for: Swing Traders, Position Traders, Market Structure Analysis, Trend Following Systems

Works on: All markets (Forex, Stocks, Crypto, Commodities), All timeframes

Developed by Xcelerate Trading - Professional tools for serious traders
May 2
Release Notes
Market Structure HH-HL / LL-LH / Xcelerate Trade

Overview

Professional market structure tool that automatically labels confirmed swing pivots as Higher High (HH), Higher Low (HL), Lower High (LH), and Lower Low (LL) using classic Williams pivot logic. Includes timeframe-aware auto pivot settings, an optional noise filter, and pattern-based alerts for bullish (HH → HL → HH) and bearish (LL → LH → LL) continuation sequences. Ideal for swing trading, trend context, and clean structure mapping without overloading the chart.

Developed by the Xcelerate Trade team — production-minded tooling for serious discretionary and systematic traders.

Key features

Auto timeframe optimization (recommended)
Automatically sets pivot left/right lengths based on chart resolution:

1m: L=3 / R=2 — faster structure for scalping-style monitoring
5m: L=4 / R=3 — balanced for intraday structure
15m: L=5 / R=4 — swing-friendly pivot confirmation
1H+: L=6 / R=4 — broader structure for higher timeframe bias
When auto mode is enabled, a compact info panel (top-right) shows the active timeframe and current L / R values.

Visual structure (minimal + readable)

Green markers: HH (up) and HL (down) — bullish swing structure
Red markers: LH (up) and LL (down) — bearish swing structure
Auto-sized shapes that stay readable across zoom levels
Markers are aligned to the pivot confirmation timing using the script’s offset logic
Smart pivot filtering (optional)
Reduce “chop pivots” by requiring a minimum move vs the prior stored pivot on the same side:

ATR-based threshold (default path), or
Tick-based threshold when ATR mode is disabled
Alerts (pattern completion)

HH-HL-HH: bullish continuation sequence (HH, then HL, then next HH completes)
LL-LH-LL: bearish continuation sequence (LL, then LH, then next LL completes)
Use TradingView Create Alert on the indicator’s alert conditions for clean, repeatable notifications. Optional runtime alert() is available but disabled by default to avoid duplicate notifications.

Settings

Auto settings (recommended)
Toggle ON for automatic L/R optimization + live display of active parameters.

Manual override
Set custom Pivot Length Left / Right for advanced users or special instruments.

Signal timing

Wait for bar close: helps avoid repainting behavior on the forming bar (recommended for consistency)
Filtering

Filter pivots: ON/OFF
Choose ATR-based vs tick-based minimum move and tune sensitivity for your market
How to use

1) Trend / regime context
Track sequences:

Dominant green structure → bullish swing bias
Dominant red structure → bearish swing bias
2) Pullbacks in trend
In bullish structure, watch for HL after HH; in bearish structure, watch for LH after LL.

3) Multi-timeframe workflow
Use higher timeframes for bias / major swings, lower timeframes for execution structure and confluence.

4) Alerts
Create alerts on:

HH-HL-HH
LL-LH-LL
Prefer Once Per Bar Close if you want the strictest confirmation behavior.

Best practices

Combine structure labels with key levels (sessions, ranges, liquidity) for higher-quality decisions
Keep filter pivots enabled on noisy symbols, then tune ATR multiple slowly (small changes matter)
Higher TF for direction; lower TF for timing
If signals feel late, that’s often the tradeoff for confirmation — adjust L/R manually only if you understand the pivot delay mechanics
Works on

All liquid markets (Forex, indices, stocks, crypto, commodities) and standard timeframes (subject to TradingView / instrument data availability).

Credits

Developed by Xcelerate Trade — professional-grade tools designed for disciplined market structure workflows.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.