Pivot Levels [BigBeluga]🔵 OVERVIEW
The Pivot Levels indicator automatically detects and draws key market pivot levels across multiple sensitivity settings. Each pivot level represents a significant local high or low in price structure, acting as potential zones of support and resistance. Traders can visualize short-, medium-, and long-term pivot layers simultaneously, helping to identify where price may react, reverse, or break out.
🔵 CONCEPTS
Different pivot lengths provide multi-length sensitivity on the same timeframe — shorter lengths detect local micro-swings, while longer lengths capture broader swing structure within the current chart.
ATR-based color logic marks active, bullish, or bearish pivot zones dynamically.
Lines can extend to the right or both sides to track reactions over time.
🔵 FEATURES
Detects up to four custom pivot levels simultaneously.
Each pivot level has independent settings for length , style , and extension mode .
Auto-colors each pivot as support (green), resistance (orange), or active zone (blue).
Displays dual-width line layers: a solid base and a transparent overlay for visual depth.
Dynamic price labels show exact pivot levels for clarity.
Fully customizable line styles: dashed (--), solid (-), or dotted (..).
Extends lines to the right for future reaction tracking or both directions for structure alignment.
🔵 HOW TO USE
Enable or disable pivot levels (1–4) to control how many layers of structure you want visible.
Use shorter pivot lengths for intraday turning points and longer ones for macro structure.
Watch for multiple pivot lines clustering in the same region — these often mark strong reversal zones.
Observe color changes: green = support, orange = resistance, blue = active neutral zone.
Combine with price action or volume analysis to confirm reactions near major pivots.
🔵 CONCLUSION
The Pivot Levels indicator provides a clean, multi-layered visualization of market structure.
By tracking pivots of varying lengths, traders can easily identify overlapping support and resistance regions, gauge breakout strength, and align trades with the dominant structural zones visible across multiple time horizons.
Unterstützung und Widerstand
Golden Zone Structure [Kodexius]Golden Zone Structure is a ZigZag based market structure and Fibonacci tool designed to make swing context easier to read directly on the price chart. It detects meaningful pivot highs and lows, labels the evolving structure (HH, HL, LH, LL, including equal highs and lows), and automatically projects a Fibonacci map across the most recent completed swing.
Instead of forcing you to manually anchor Fib tools after every new leg, the script rebuilds levels each time a fresh pivot is confirmed. This makes it well suited for traders who focus on swing continuation, pullback depth, and reaction zones where liquidity and orderflow often concentrate.
A key emphasis is the Golden Zone highlight. The indicator shades the zone that is most relevant to the current swing context so you can quickly spot where a retracement is approaching a higher probability reaction area, without cluttering the chart with too many permanent objects.
The tool is intentionally visual and configurable. You can choose pivot source (High/Low or Close), adjust swing sensitivity via ZigZag period, switch color themes, and decide how much detail you want on screen (levels, zigzag lines, labels).
Optional trading markers can be enabled for users who want a lightweight “zone interaction” prompt. These markers are not intended as a standalone trading system. They are meant to complement your own confirmation rules (structure alignment, volume, higher timeframe bias, or price action triggers).
🔹Features
🔸 ZigZag Swing Engine
- Uses a configurable ZigZag period to filter noise and confirm swing points only when the lookback logic validates the move.
Supports different pivot sources (High/Low or Close) so you can choose between cleaner structure or more reactive behavior depending on the instrument.
Optional ZigZag leg drawing to visualize swing flow without clutter.
🔸 Market Structure Labels (HH, HL, LH, LL + Equals)
- Automatically labels each confirmed pivot based on how it compares to the prior pivot of the same type.
High side classification: H, HH, LH, EH.
Low side classification: L, HL, LL, EL.
Equal highs and lows help reveal potential liquidity pools and “magnet” areas where price often reacts or breaks with intent.
🔸 Auto Fibonacci Map on the Active Swing
- Rebuilds Fibonacci levels every time a new pivot is confirmed, keeping the projection aligned with the most recent completed leg.
Core retracement levels: 0.236, 0.382, 0.500, 0.618, 0.786.
Extension levels: 1.272 and 1.618 for expansion targeting and continuation mapping.
Optional price labels on each level, formatted to tick size so levels remain readable across markets.
🔸 Golden Zone Highlighting (Context Aware)
- Highlights the most relevant retracement band with a soft fill so you can spot “zone approach” moments at a glance.
The zone selection adapts to swing context, focusing on a different retracement region depending on whether the last confirmed pivot is a peak or a trough.
Adjustable transparency keeps the chart clean while preserving the key reaction area.
🔸 Visual Customization + Themes
- Multiple color themes (Neon, Ocean, Sunset, Monochrome) so the tool fits different chart styles and backgrounds.
Independent toggles for Fib levels, Golden Zone shading, ZigZag lines, and price labels.
Line width controls for better scaling across timeframes.
🔸 Optional Trading Markers + Alerts
- Optional BUY and SELL labels based on zone interaction logic with candle confirmation filters.
ATR based placement offset scaled by sensitivity so labels stay visually separated during volatility.
Built in alert conditions for new pivot highs and new pivot lows so you can monitor structure changes without watching every bar.
▶ Practical Usage Tip
• Use structure labels to define bias (HH + HL for bullish structure, LH + LL for bearish structure).
• Use the Golden Zone as a location filter, then wait for your own trigger (break of minor structure, rejection candle, volume shift, etc.).
• Treat extensions as “map points” not guaranteed targets. They work best when structure supports continuation.
ICT Liquidity Sweep/Swing Fail Pattern V.1# ICT Liquidity Sweep/Swing Fail Pattern V.1
## Indicator Description & User Guide
---
## 📊 Indicator Overview
**Name:** ICT Liquidity Sweep/Swing Fail Pattern V.1
**Type:** Support/Resistance & Liquidity Detection
**Trading Style:** ICT Concepts (Inner Circle Trader)
**Best Timeframes:** 1M, 5M, 15M, 1H
---
## 🎯 Core Features
### 1. **Support & Resistance Lines**
- Automatically draws key swing high and swing low levels
- Based on significant pivot points in price structure
- Updates dynamically as new swings form
### 2. **"X" Mark - Liquidity Sweep**
- **Symbol:** X marker on chart
- **Meaning:** Indicates a liquidity sweep (stop hunt)
- **What it shows:** Price briefly moved beyond a key level to trigger stops, then reversed
- **Trading significance:** High-probability reversal zones after liquidity is taken
### 3. **"SFP" Label - Swing Failure Pattern**
- **Symbol:** SFP text label
- **Meaning:** Swing Failure Pattern detected
- **What it shows:** Price attempted to make a new high/low but failed and reversed sharply
- **Trading significance:** Strong reversal signal - smart money rejecting the level
---
## 📈 How to Use This Indicator
### Entry Setup Strategy:
#### **For SHORT Trades (Sell):**
1. Wait for **SFP** to appear at a swing high
2. Look for **X marker** confirming liquidity sweep above the high
3. **Entry Zone (Red Box):** Enter SHORT positions when price returns to this zone
4. **Stop Loss:** Place above the red zone (above the swept high)
5. **Take Profit (Green Box):** Target the green zone below
#### **For LONG Trades (Buy):**
1. Wait for **SFP** to appear at a swing low
2. Look for **X marker** confirming liquidity sweep below the low
3. **Entry Zone (Green Box):** Enter LONG positions when price returns to this zone
4. **Stop Loss:** Place below the green zone (below the swept low)
5. **Take Profit (Red Box):** Target the red zone above
---
## 🎨 Color Coding System
| Color | Zone Type | Usage |
|-------|-----------|-------|
| 🔴 **Red Box** | Stop Loss / Supply Zone | Place SL here for LONG trades / Entry zone for SHORT trades |
| 🟢 **Green Box** | Take Profit / Demand Zone | Target zone for LONG trades / Place SL here for SHORT trades |
| ❌ **X Mark** | Liquidity Sweep Point | Stop hunt occurred - reversal likely |
| 📝 **SFP Label** | Swing Failure Pattern | Failed breakout - strong reversal signal |
---
## 💡 Trading Examples
### Example 1: SHORT Trade (As shown in your chart)
```
1. SFP appears at swing high (Red zone around 4,000)
2. X marker confirms liquidity sweep above the high
3. Entry: SHORT when price re-enters red zone
4. Stop Loss: Above red zone (e.g., 4,002)
5. Take Profit: Green zone below (3,964-3,972)
6. Risk:Reward = 1:3+
```
### Example 2: LONG Trade
```
1. SFP appears at swing low (Green zone)
2. X marker confirms liquidity sweep below the low
3. Entry: LONG when price re-enters green zone
4. Stop Loss: Below green zone
5. Take Profit: Previous red zone above
6. Risk:Reward = 1:2 minimum
```
---
## ⚠️ Important Trading Rules
### ✅ DO:
- Wait for BOTH SFP and X marker confirmation
- Enter on price returning to the zone (not on first touch)
- Use proper position sizing (1-2% risk per trade)
- Combine with market structure analysis
- Look for confluences (orderblocks, fair value gaps)
### ❌ DON'T:
- Trade against the higher timeframe trend
- Enter without confirmation signals
- Ignore the colored zones for SL/TP placement
- Overtrade - wait for quality setups
- Move stop loss to breakeven too early
---
## 🔧 Indicator Settings (Typical)
**Adjustable Parameters:**
- Swing Length: Number of bars to identify swing points
- Show/Hide X markers
- Show/Hide SFP labels
- Zone opacity and colors
- Line thickness
---
## 📚 ICT Concepts Explained
### **Liquidity Sweep:**
Smart money intentionally pushes price beyond key levels to trigger retail stop losses, then reverses to their intended direction. The X marker identifies these moments.
### **Swing Failure Pattern (SFP):**
Price attempts to make a new high/low but lacks follow-through, indicating weak momentum and likely reversal. Similar to a "false breakout" but more specific to swing structures.
### **Supply & Demand Zones:**
- **Red zones** = Areas where selling pressure overwhelmed buyers
- **Green zones** = Areas where buying pressure overwhelmed sellers
- These zones act as magnets for price to return and react
---
## 🎓 Best Practices
1. **Confluence is Key:**
- Combine with daily/weekly bias
- Check for orderblocks nearby
- Look for imbalances (FVG)
2. **Session Timing:**
- Best during London/New York sessions
- Avoid low liquidity periods
3. **Risk Management:**
- Never risk more than 1-2% per trade
- Use proper lot sizing
- Take partial profits at key levels
4. **Timeframe Correlation:**
- Check higher timeframe for bias
- Enter on lower timeframe for precision
- Exit based on higher timeframe targets
---
## 📞 Support & Updates
**Version:** 1.0
**Compatibility:** TradingView Pine Script v5
**Updates:** Regular improvements based on ICT methodology
---
## ⚡ Quick Reference Card
| Signal | Action | SL Placement | TP Target |
|--------|--------|--------------|-----------|
| SFP + X at High | SHORT at Red Zone | Above Red | Green Zone |
| SFP + X at Low | LONG at Green Zone | Below Green | Red Zone |
**Remember:** The indicator shows you WHERE to trade, but YOU decide WHEN based on confirmation and market context.
---
*Disclaimer: This indicator is a tool for technical analysis. Always use proper risk management and never trade with money you cannot afford to lose.*
Williams Fractals / Goldilocks Edition / [NPR21]This indicator, Williams Fractals — Goldilocks Edition , is a high-visibility technical analysis tool designed to identify key price reversal points on your chart. It is a refined version of the classic Williams Fractal, optimized for modern dark-themed trading environments with an emphasis on clarity and precise visual anchoring.
Indicator Description
The indicator identifies local price peaks (Highs) and valleys (Lows) using a specific look-back and look-forward period. Unlike standard fractals that can be difficult to read, this version features:
Enhanced Contrast: Darkened background labels (Deep Teal for Buy, Deep Red for Sell) that make the white and yellow text highly legible.
Long "V" Stems: Integrated arrow extensions that bridge the gap between the label and the candle, pointing precisely to the pivot point to remove any ambiguity during high volatility.
Customizable Spacing: User-defined offsets that allow the labels to sit comfortably above or below price action without overlapping other indicators.
How to Use It
Identify Reversals: A BUY signal appears under a local low, suggesting a potential upward move. A SELL signal appears above a local high, suggesting a potential downward move.
Support & Resistance: Use the fractal points to draw horizontal support and resistance lines.
Trend Confirmation: Fractals are most effective when used in conjunction with other indicators (like the EMA or WMA visible in your setup) to confirm trend direction.
Wait for Confirmation: Remember that a fractal is only "confirmed" after $n$ bars have closed to the right of the signal.
Understanding the "Periods (n)" Setting
The frequency of signals is entirely dependent on your Periods (n) input.
Lower Values (e.g., n=2): The indicator will find many local pivots, resulting in more frequent signals. This is useful for scalping or lower timeframes but may lead to more "noise".
Higher Values (e.g., n=5 or 10): The indicator requires a more significant peak or valley to trigger, resulting in fewer, more significant signals. This is better for identifying major trend shifts.
Williams Fractals / Goldilocks [NPR21]📊 Williams Fractals — Goldilocks
Description
Williams Fractals — Goldilocks highlights confirmed swing highs and lows using a refined Williams Fractals approach that balances signal frequency and clarity. BUY and SELL labels mark structurally important pivot points while avoiding chart clutter. The Periods (n) setting controls how often signals appear—lower values produce more signals, higher values filter noise. Signals are non-repainting and work on any instrument and any timeframe. Best used as a market structure and confirmation tool.
🔧 How to Use (Quick Guide)
BUY labels = confirmed swing lows (potential support / pullback areas)
SELL labels = confirmed swing highs (potential resistance / exhaustion areas)
Use for structure and confirmation, not as a standalone entry system
Combine with trend direction, key levels, VWAP/EMAs, volume, or momentum
⏱️ Recommended Periods by Timeframe
The Periods (n) setting determines how many and how often labels print.
1m–3m (Scalping): n = 2
More frequent signals; captures short-term swings.
5m–15m (Intraday): n = 8-9
Balanced sensitivity; filters minor noise.
30m–1h+ (HTF/Swing): n = 15-21
Fewer, stronger pivots; highlights major structure.
Rule of thumb: Lower timeframe → lower n. Higher timeframe → higher n.
🌍 Markets & Timeframes
Not futures-only. Works well on stocks, ETFs, forex, crypto, indices, and any timeframe. Adjust n to match the market’s pace.
Gann VooDoo Lines [NPR21]GANN VooDoo Lines
Gann Square of 9 - TOS Scale Edition is a high-precision conversion of the classic ThinkOrSwim (TOS) Gann Square of 9 tool, specifically rebuilt for Pine Script v6. It is designed for traders who rely on mathematical price rotations to identify hidden support and resistance levels.
Unlike standard horizontal line tools, this version is specifically engineered to "handshake" with the TradingView price scale, ensuring that every mathematical rotation is clearly labeled on your Y-axis for instant reference.
How to Use This Script
Define Your Anchor Point:
Find a major swing high or swing low on your chart.
Open the script Settings (gear icon) and enter this value into the Manual Anchor Price field.
Select Market Direction:
Down (Support): Use this if your anchor is a Swing High. The script will calculate support levels below that price.
Up (Resistance): Use this if your anchor is a Swing Low. The script will calculate resistance levels above that price.
Adjust the Visual Scope:
Use the Extend Right and Extend Left toggles. If both are checked, the Gann levels will act as infinite "Voodoo Lines" across your entire chart history.
The "TOS Scale" Final Step (Crucial):
To see the colored price boxes on your vertical axis, Right-click the Price Scale (the numbers on the right of your chart).
Hover over Labels and ensure Indicator Value Labels is Checked.
IMPORTANT: Uncheck the option "No Overlapping Labels." Since Gann levels are mathematically precise, they can sometimes be close together; unchecking this forces TradingView to show every single level simultaneously, just like ThinkOrSwim.
Malama's Quantum Fusion Malama's Quantum Fusion is a unified trading system that integrates swing-based probability zones, multi-timeframe trend confirmation, and a reversal signal engine into a single indicator.
Differences from "Malama's Quantum Swing Modulator" (Why this is a new script): While this script utilizes the probability zone logic from my previous "Quantum Swing Modulator" (MQSM), it represents a distinct evolution in functionality:
From Analysis to Signals: MQSM was a passive analysis tool for visualizing zones. This script (MQF) adds an active Reversal Signal Engine that generates specific "BUY/SELL" diamond signals based on candle patterns and confluence.
Trend Cloud & Structure: MQF introduces a Dual-Supertrend Cloud and Fast/Slow EMA structure to filter trades, features not present in the original oscillator-based tool.
Automated Confluence: Unlike the previous tool which required manual interpretation, MQF mathematically fuses the Zone Score, Trend Cloud, and Volume analysis to filter false positives automatically.
How it Works: The system relies on a "Confluence of Three" approach:
The Context (Uncertainty Zones): Using ATR bands and Pivot Points, the script identifies where price is statistically likely to reverse (Overextended).
The Trend (Cloud & MTF): A dual Supertrend cloud (Fast & Slow) visualizes the immediate trend direction. Optional Multi-Timeframe (MTF) logic checks higher timeframe alignment.
The Trigger (Signal Engine): A valid signal is generated only when a specific reversal candle pattern occurs coincident with the trend direction and (optionally) within a high-probability zone.
Key Features:
Dynamic Dashboard: Displays real-time Regime (Trending vs. Choppy via ADX), Support/Resistance Probabilities, and MTF status.
Visual Signals: Plots Diamond labels with Stop Loss and 2:1 Take Profit targets.
Regime Detection: Automatically adjusts oscillator weighting based on whether the market is Trending or Ranging (ADX Filter).
Settings:
Signal Filters: You can toggle specific filters (Volume Spike, Cloud Alignment, Zone Proximity) to make the script more aggressive or conservative.
MTF: Enable/Disable Auto-MTF selection to filter noise using higher timeframe trends.
Visuals: Fully customizable colors for the Cloud, Zones, and Dashboard.
PyraTime FVG [Pro] | Smart Anchored Price ActionPyraTime FVG is a professional-grade institutional trading suite designed to declutter price action analysis. Unlike standard indicators that flood the chart with infinite zones, this tool uses a proprietary "Velcro" Anchoring Engine that physically snaps Fair Value Gaps (FVGs) and Order Blocks to the exact candle geometry.
This tool replaces 4 separate indicators (FVG, Market Structure, Order Blocks, and Trend Dashboard) with a single, performance-optimized Pine Script v6 script.
🎯 Key Features
1. The "Velcro" FVG Engine Most FVG indicators draw boxes that extend infinitely, making charts messy.
Smart Extension: Zones extend to the right but automatically "snap" and cut off the moment price mitigates (fills) them.
Precision Anchoring: Boxes are drawn from the exact wick/body limits of the originating candles—no floating pixels.
Mitigation Tracking: Mitigated zones are instantly dimmed and archived, keeping your chart clean for current price action.
2. Intelligent Structure Mapping (BOS & CHoCH) The script distinguishes between trend continuation and trend reversals:
BOS (Break of Structure): Marked with Dotted Lines. Signals that the current trend is healthy and continuing.
CHoCH (Change of Character): Marked with Solid Lines. Signals a potential major trend reversal (e.g., the first Lower Low after an uptrend).
3. Multi-Timeframe (MTF) Scanner A non-intrusive dashboard in the bottom-right corner scans the 1H, 4H, and Daily timeframes in real-time.
IN BULL GAP: Price is currently inside a Higher Timeframe Buying Zone.
IN BEAR GAP: Price is currently inside a Higher Timeframe Selling Zone.
CLEAR: No major HTF obstacles nearby.
📚 How to Trade With This Tool (Tutorial)
Step 1: Check the "Big Picture" Look at the MTF Scanner (Bottom Right).
If the 1H and 4H say "IN BEAR GAP" (Gold), you know the higher timeframe bias is Down. You should prioritize selling opportunities.
Step 2: Wait for Price to Visit a Zone On your current chart (e.g., 5m or 15m), wait for price to enter a Gold FVG (Resistance).
Note: The box will be bright gold. Once price touches it, the script will snap the box to that candle, confirming the test.
Step 3: Confirm with Structure Don't sell blindly. Wait for a CHoCH Label (Change of Character) to appear. This confirms that the short-term uptrend has broken and sellers are stepping in.
Step 4: Target the Opposing Zone Aim for the next unmitigated Teal FVG (Bullish Support) or Order Block below.
⚙️ Settings & Customization
Filter Small Gaps: Uses an ATR filter (default 0.5) to ignore insignificant noise. Increase to 1.0 for a cleaner "Swings Only" view.
Show Midpoint: Toggles a dotted 50% equilibrium line inside every active gap.
Visual Style: Fully customizable colors. Default scheme is PyraTime Desert Gold & Oasis Teal.
Witch-Fire ALMA signals: Dynamic Liquidity & Trend GlowThe Witch-Fire ALMA is a high-precision trend bias and liquidity mapping tool designed for price action traders and Smart Money practitioners. Unlike traditional indicators that clutter your chart with lagging signals, this script provides a "clean-yet-powerful" visual anchor to help you stay on the right side of the market while identifying key Points of Interest (POIs).
At its core, the script utilizes an optimized Arnaud Legoux Moving Average (ALMA). Known for its superior ability to balance smoothness and responsiveness, the ALMA effectively filters out market noise and "whipsaws" that often plague standard EMAs.
Key Features:
The Witch-Fire Glow: A neon-styled ALMA line that shifts between Bullish Green and Bearish Red. The white core provides surgical precision for price intersection, while the outer glow visualizes the strength and dominance of the current trend.
Scaled Liquidity Levels: Automatically maps Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL). These levels are dynamic—they scale proportionally with your ALMA settings. This ensures that the liquidity zones you see are always relevant to the trend cycle you are analyzing.
Strategic Bias Background: A subtle background tint provides an instant psychological filter. Only look for Longs in the green zone and Shorts in the red zone to maintain a high-probability strike rate.
How to Trade with Witch-Fire:
Identify the Bias: Look at the Fire ALMA. If the "fire" is red and the price is below the line, your bias is strictly bearish.
Watch the Sweeps: Wait for the price to "sweep" (pierce with a wick) the horizontal SSL (Green) or BSL (Red) lines.
Execution: Look for a strong rejection candle (long wick, small body) at these levels that closes back towards the ALMA line.
Best Used On: 15m, 1H, and 4H timeframes. Works exceptionally well for Crypto, Forex, and Indices.
Malama's Pre-Market BoxThis script is a comprehensive Pre-Market range visualizer designed to replace older, single-candle analysis tools. It automatically highlights the full pre-market session (04:00–09:30 EST) and extends key support/resistance levels into the regular trading day.
Why this script was created (Evolution from previous versions): This is a complete architectural rewrite of the older "Malama's KAYCAP Pre-Market Box."
Old Logic: The previous version focused on isolating a single, specific 1-minute candle (e.g., exactly 4:00 AM) to determine levels.
New Logic: This version tracks the entire pre-market session range. It dynamically updates the True High and True Low as the pre-market develops, providing a much more accurate support/resistance zone for the open.
Visual Overhaul: Instead of static plots, this version uses Pine Script v6 box and line objects to draw a clean, shading-customizable range that automatically extends rightward until the trading session ends.
How it works:
Session Tracking: The script monitors the user-defined session (default 04:00-09:30).
Dynamic Box: As price moves during pre-market, a box is drawn covering the highest high and lowest low of that period.
Level Extension: At 09:30 (Market Open), the script locks the High and Low values. It then projects two horizontal lines (Resistance and Support) across the chart for the rest of the day.
Breakout Detection: If the price closes outside these levels during regular hours, the script can optionally trigger Alerts and plot "BREAK" labels on the chart.
Settings:
Time Settings: Customizable session string (default captures standard US Pre-Market).
Visuals: Fully adjustable box colors, border transparency, and line width.
Signals: Toggle breakout labels on/off.
Alerts Included:
Bullish Breakout: Triggers when price crosses and closes above the Pre-Market High.
Bearish Breakdown: Triggers when price crosses and closes below the Pre-Market Low.
Monday Range - User Defined LookbackEnglish Description
Monday Range Expansion & Multi-Week Projections
This indicator identifies the Monday Range (the price action from Monday's open at 00:00) and projects symmetric expansion levels across the entire trading week. It is designed for traders who use the weekly open and Monday's volatility as a benchmark for the week's price action.
Key Features:
Exact Monday 00:00 Start: Using advanced logic, the indicator pins the starting point precisely to the weekly open (Monday 00:00), ensuring no lag or offset regardless of your timeframe.
Symmetric Expansion Levels: It calculates the Monday High-Low range and projects a +100%, +50%, -50%, and -100% expansion, providing clear support and resistance targets.
User-Defined Lookback: You can choose exactly how many past weeks to display on your chart, keeping your workspace clean and focused.
Force Overlay Technology: All lines and labels use force_overlay, ensuring they always stay on the top layer, above candles and other indicators.
Weekly Freeze: Historical weeks stay "frozen" at their Friday closing points, allowing for clear backtesting of previous weekly levels.
SMC Structure & Expectation [WavesUnchained]SMC Structure & Expectation - Professional Context & Confirmation Tool
A sophisticated Smart Money Concepts indicator that combines objective market structure analysis with intelligent expectation logic and professional order block validation. Built for traders who value context over signal spam.
4-LAYER ARCHITECTURE
Layer 1: Market Structure
✓ Objective HH/HL/LH/LL detection based on confirmed pivot swings
✓ Internal structure tracking (micro swings within major legs)
✓ Structure alignment detection (Internal + External agreement)
✓ No predictions - pure price action description
Layer 2: Expectation/Bias
✓ Logical hypotheses derived from current structure
✓ "Expect HL" in bullish structure / "Expect LH" in bearish structure
✓ "Expect Continuation" after BOS events
✓ Expectation ≠ Signal (can be wrong, that's the point)
Layer 3: Confirmation (BOS + Order Blocks)
✓ Break of Structure (BOS) detection with 2 modes:
• Conservative: Close-cross (default)
• Aggressive: High/Low-cross with optional close confirmation
✓ Professional Order Block System with 8 intelligent filters
✓ Only creates OBs when expectation is met
✓ Maximum 1 OB per direction (quality over quantity)
Layer 4: Optional Warnings
✓ Trendline break detection
✓ Early Top/Bottom warnings (volume + volatility divergence)
✓ Can be disabled for clean chart focus
PROFESSIONAL ORDER BLOCK SYSTEM
8 Quality Filters (Cascade Logic):
1. BOS-Only Guard : No OB without confirmed Break of Structure
2. Displacement Filter : Minimum 1.0 ATR momentum (customizable)
3. Location Filter : Must be in Premium (bearish) or Discount (bullish) zone
4. Size Filter : 3 modes available:
• Hard Limit: Reject oversized OBs (strict)
• Score Penalty: Allow but reduce priority (balanced, default)
• Disabled: No size filtering (permissive)
5. Volume Filter : Optional relative volume threshold
6. FVG Filter : Optional Fair Value Gap requirement
7. Mitigation Tracking : 30% penetration = mitigated (score penalty)
8. TTL (Time-To-Live) : Auto-delete after 80 bars (prevents chart clutter)
Priority Scoring System (0-100):
• HIGH Priority (>80) : Bright colors, zero transparency
• MED Priority (50-80) : Normal colors, 30% transparency
• LOW Priority (<50) : Faded colors, 60% transparency
Score Components:
✓ Displacement strength (10-30 points)
✓ FVG confluence (+20 points)
✓ Relative volume (+5-15 points)
✓ Premium/Discount location (+10-20 points)
✓ Structure alignment (+30 points if aligned, -15 if conflict)
✓ Leg strength (+15-25 points for strong impulse vs correction ratio)
✓ Size penalty (-0 to -30 points if oversized, Score Penalty mode only)
BAR COLORING MODES
Choose your preferred visual feedback:
1. Off : No bar coloring
2. Structure : Bullish/Bearish/Neutral structure states
3. Expectation : Continuation zones (green = expect bullish, red = expect bearish)
4. BOS + OB Priority (Default):
• Highlights active Order Blocks by priority
• BOS events in bright neon
• Faded structure colors when no OB active
5. Multi-Layer : Combines structure + priority intensity
6. Alignment : Shows Internal/External structure alignment (orange = conflict warning)
INTELLIGENT LOGGING SYSTEM
Priority-based log filtering to reduce noise:
• All : Every event (debug mode)
• MED+ : Only medium and high priority events
• HIGH Only : Only high priority setups
• Smart (Default): Adaptive filtering based on priority + context
Logs include:
✓ Structure changes (HH/HL/LH/LL)
✓ Expectation updates
✓ BOS events with confirmation status
✓ OB creation with full scoring breakdown
✓ OB reactions (Tap/Deep/Failure classification)
✓ Rejection reasons with "Potential Lost" analysis
CONFIGURATION HIGHLIGHTS
Layer 1: Structure
• Pivot detection length: 5 (left) / 5 (right)
• Internal structure: Optional micro-swing tracking
• Swing confirmation: Closes beyond pivot required
Layer 2: Expectation
• Expectation expiry: 40 bars (auto-reset after timeout)
• Visual feedback: Labels + optional expectation zones
Layer 3: Confirmation
• BOS Mode: Close-cross (conservative) / High/Low-cross (aggressive)
• Close Confirmation: Optional 3-bar window for aggro mode
• Displacement: Min 1.0 ATR (customizable)
• Size Filter Mode: Hard Limit / Score Penalty / Disabled
• OB Location: 38% discount / 62% premium thresholds
• OB Size Range: 0.3-1.2 ATR (customizable)
• TTL: 80 bars default
• Volume Filter: Optional, 1.0x minimum
• FVG Requirement: Optional
Layer 4: Warnings
• Trendline break detection
• Early Top/Bottom signals
• Can be fully disabled
BEST USE CASES
✓ Context Tool : Understand where you are in the market cycle
✓ Confirmation Filter : Validate trade ideas with structure alignment
✓ Order Block Trading : High-probability zones with priority scoring
✓ Educational : Learn SMC concepts with transparent logic
✓ Multi-Timeframe Analysis : Combine with HTF structure for confluence
Optimized for:
• Commodities (NatGas, Gold, Oil)
• 1H - 4H timeframes
• Swing trading / Intraday positioning
KEY FEATURES SUMMARY
✓ Zero signal spam - only high-conviction setups
✓ Transparent scoring system - know why each OB matters
✓ Adaptive to market conditions - structure alignment detection
✓ Flexible filtering - customize to your risk tolerance
✓ Priority-based visuals - instantly identify best opportunities
✓ Professional logging - learn from rejections and acceptances
✓ Clean chart - auto-cleanup with TTL system
✓ Bar coloring modes - choose your visual feedback style
✓ Size Filter Mode - prevent blocking of high-quality oversized setups
PHILOSOPHY
This indicator follows the principle: "Context over signals, quality over quantity"
Expectations can be wrong - that's the point. They help you stay aware of the most likely scenario while remaining open to structure changes. When expectation is met AND confirmed by BOS + quality OB, you get a high-conviction setup.
Not a holy grail. Not a signal service. A professional analysis tool.
Version: 1.0.0
Author: WavesUnchained
Pine Script: v6
Custom Session ORB - Extending Past Current CandleCustom Session ORB - Extending Past Current Candle
This indicator plots Opening Range Breakout (ORB) levels for one or two customizable trading sessions directly on your chart. It dynamically tracks the high, low, and midpoint of the defined session(s) and extends these levels beyond the session using a configurable offset.
Features:
Supports two custom sessions.
New York and Asia pre-saved.
Automatically tracks session High, Low, and Mid.
Option to extend ORB levels past the live candle.
Option to display only the most recent ORB for a clean chart.
Configurable line thickness, style, and label size.
Works in Eastern Standard Time (EST) without manual adjustment.
Settings:
Show Labels: Toggle to display ORB values on chart.
Label Font Size: Small, Normal, Large.
Mid Line Style: Solid, Dashed, or Dotted.
ORB Line Thickness: Set line thickness of ORB levels.
Extend Past Current Candle by N Bars: Controls how far the ORB extends visually.
Show Only Current ORB: Cleans chart by removing previous session ORB levels.
Enable Session 1 / 2: Toggle individual sessions on/off.
Session Time: Set the start and end times for each session (automatically in EST).
How It Works:
The indicator monitors the defined session time, records the high, low, and midpoint, and draws lines at those levels. When the session ends, the lines are extended by the specified offset for easy breakout visualization. Labels can optionally show the exact price levels.
Liquidity ZonesLiquidity Zones
Liquidity Zones is a price-action–based indicator designed to identify high-probability support and resistance areas where liquidity has historically accumulated.
Instead of drawing single lines, the script builds dynamic price zones based on repeated pivot reactions validated by volume, helping traders focus on meaningful levels rather than noise.
How It Works
Pivot Detection
The indicator scans historical price data for pivot highs and pivot lows using a fixed pivot strength.
Each pivot represents a potential liquidity interaction point.
Volume Qualification
A pivot is only considered valid if the volume at the pivot bar exceeds:
Volume SMA × Sensitivity
This filters out weak or low-participation levels and keeps zones formed during strong market interest.
Zone Construction
Nearby pivots are grouped into a single zone if their price difference stays within an ATR-based threshold.
Each time price reacts within this threshold, the zone’s touch count increases.
Once the minimum number of touches is reached, a liquidity zone is drawn and extended to the right.
Adaptive Zone Expansion
As new qualifying pivots appear, zones automatically expand to reflect the true liquidity range instead of staying static.
Dynamic Zone Coloring
Zones update their color in real time based on price position:
Green (Support) → Price is above the zone
Red (Resistance) → Price is below the zone
Gray (In-Zone) → Price is trading inside the zone
This allows instant visual feedback on whether a level is acting as support, resistance, or an active liquidity area.
Settings Overview
Bars to Apply
Controls how much historical data is scanned for liquidity zones.
Volume Sensitivity
Higher values require stronger volume spikes to validate pivots, resulting in fewer but higher-quality zones.
Styling Options
Fully customizable colors and transparency for support, resistance, and in-zone states.
Best Use Cases
Identifying high-liquidity support and resistance zones
Planning entries, exits, and stop placement
Combining with trend-following or momentum indicators
Filtering out weak levels in sideways or choppy markets
Support and ResistanceSupport & Resistance Zones
This indicator automatically identifies support and resistance zones by clustering confirmed pivot highs and lows into statistically valid price areas.
Instead of drawing single horizontal lines, it creates price zones whose width is dynamically controlled using ATR (Average True Range), allowing the zones to adapt to market volatility.
Core Logic
The indicator scans a user-defined number of historical bars and detects pivot highs and pivot lows using a configurable pivot strength.
Each new pivot is evaluated against previously detected zones:
A zone becomes visible only after receiving sufficient confirmation (minimum number of pivot touches).
This ensures that only structurally meaningful levels are drawn.
Zone Construction Rules
Zones are formed by grouping pivot points whose total price range remains within ATR range
Each zone expands dynamically as new pivots confirm it
Zones are drawn as rectangular areas, not lines
Zones extend to the right, remaining active until price structure changes
This approach avoids over-plotting and reduces noise commonly seen in traditional support/resistance tools.
Dynamic Zone Coloring
Zones automatically change color based on current price position:
Support Color → Price is above the zone
Resistance Color → Price is below the zone
Neutral (In-Zone) Color → Price is trading inside the zone
This makes it easy to visually assess market context without additional indicators.
Inputs Explained
Logic Settings
Bars to Apply
Number of historical bars scanned to detect pivots and construct zones.
Pivot Strength
Number of candles required on both sides of a pivot high/low for confirmation.
Min Pivot Confirmation
Minimum number of aligned pivots required before a zone is drawn.
Styling
Support, resistance, and in-zone colors
Zone fill transparency
Why This Approach
Uses price structure, not arbitrary levels
Adapts to market volatility via ATR
Filters out weak, single-touch levels
Works across all markets and timeframes
This indicator is designed to highlight areas of interest, not generate buy or sell signals.
It is best used in combination with trend, momentum, or volume-based tools.
Daily/Weekly Swing Highs-Lows + Candle PatternsDescription
Daily/Weekly Swing Highs-Lows + Candle Patterns
This indicator plots the most recent Daily and Weekly Swing Highs and Lows (key support/resistance levels) using a simple and effective logic: a swing high/low is confirmed when the previous bar's extreme is higher/lower than both the current and the one before it.
Features:
• Daily Swing Highs/Lows (teal/maroon circles) – toggleable
• Weekly Swing Highs/Lows (blue/purple circles) – optional
• Visual separators for new daily and weekly bars (light background color)
• Daily candle pattern labels (optional):
- US = Up Swing (strong bullish continuation)
- DS = Down Swing (strong bearish continuation)
- IN = Inside Bar
- OUT = Outside Bar
• Daily close position labels (optional):
- P = Positive (close in upper 25% of the range)
- mP = minor Positive (50–75%)
- mN = minor Negative (25–50%)
- N = Negative (lower 25%)
All elements are fully customizable (colors, visibility) and work on any timeframe.
Best suited for intraday timeframes (1 min to 4 hours) where daily and weekly key levels provide important context for price action and reversals.
The optional "Trading session length" input is mainly useful for markets with shorter sessions (e.g., European indices) and does not affect swing detection.
Open-source, free to use and modify.
How to Use the Indicator + Practical Use Case
Key Settings (Inputs)
Trading session length (hours) → Default 8.5 h (useful for FTSEMIB, DAX, etc.). Leave it as is unless you trade a market with a different session length.
Daily Swing Levels → Show/Hide daily swing highs (teal) and lows (maroon).
Weekly Swing Levels → Usually keep off on intraday charts to avoid clutter (turn on for higher-timeframe context).
Daily Candle Patterns → Enable only if you want to see US/DS/IN/OUT labels on the daily close.
Close Position (P/mP/mN/N) → Enable if you want to quickly see how strong/weak the daily close was.
What You See on the Chart
Teal circles = Last confirmed daily swing high (resistance).
Maroon circles = Last confirmed daily swing low (support).
Blue/purple circles (if enabled) = Weekly swing high/low.
Light gray background = Start of a new trading day.
Purple background (if weekly enabled) = Start of a new week.
Small labels on daily close (if enabled):
- US = strong bullish day
- DS = strong bearish day
- IN = inside bar (consolidation)
- OUT = outside bar (expansion)
- P/mP/mN/N = how far the close was from the high/low of the day.
Best Timeframes 1 min to 240 min charts → Daily levels act as major support/resistance zones for intraday trading.
Avoid using on daily or higher charts (the logic is designed for intraday context).
Why this works well intraday:
The daily swing high/low levels are high-probability zones where institutions and algorithms often defend positions. On intraday charts, they act as “magnets” for price, giving you clean entries and exits with clear invalidation levels.
This indicator keeps your chart clean while providing exactly the context most intraday traders need: key daily levels + daily momentum context.
Algorithmic Volume Rejection Zones [AVRZ]Hello traders,
I am pleased to release the Algorithmic Volume Rejection Zones (AVRZ). This is a specialized decision-support system designed to identify high-probability reversal points by synthesizing candle geometry, market structure, and statistical volume anomalies.
Trading reversals often presents a dilemma: wait for confirmation and miss the move, or enter early and get stopped out by noise. AVRZ solves this by quantifying "Institutional Absorption." It filters out weak price probes and highlights only the specific moments where significant volume has stepped in to defend a price level.
🛡️ The Concept: Attacking The Zonesl
You will often see price aggressively "attack" a support or resistance level with speed and high volume. To the untrained eye, this looks like a breakout. However, professional analysis reveals that this is often an Efficiency Event—liquidity is being absorbed by passive limit orders.
The AVRZ indicator is specifically engineered to detect this phenomenon. When price strikes a level and volume spikes (>2.0 Sigma), it signals that the auction is becoming efficient and a reversal is imminent. The script captures this "Attack" via the Climax Bypass logic, plotting a fresh zone immediately to mark where the liquidity was defended.
Pivot point moving averagesPivot Point Moving Averages builds moving averages from confirmed pivots, not from every bar.
Instead of averaging all highs and lows, this script:
Detects swing pivot highs and pivot lows using a configurable Pivot length (pivotLen).
Converts these sparse pivot prices into continuous series of:
last confirmed pivot low
last confirmed pivot high
Applies a user-selectable moving average (SMA / EMA / RMA / WMA / VWMA) to each of those pivot series.
Plots the two resulting lines and shades the area between them as a pivot value cloud.
Because the lines only move when a new pivot is confirmed, they represent structural acceptance rather than raw volatility. Short “noise” moves and stop hunts between pivots have much less impact on these averages.
You can also enable an optional second pivot MA cloud:
Uses the same Pivot length for structural detection.
Has its own MA length and type.
Can run on a different timeframe (e.g. D, 240, W).
Is projected back onto the current chart so you see local pivot value and higher-timeframe pivot value together.
Why it’s useful
Traditional MAs:
React to every bar.
Move on noise, wicks, and stop runs.
Don’t distinguish between “meaningful” structure and random fluctuation.
This tool uses confirmed pivots, so it is better suited to market structure and phase analysis:
Pivot MA low reflects how demand is stepping up (or down) as new swing lows form.
Pivot MA high reflects how supply is pressing down (or easing) as new swing highs form.
The cloud between them acts as a dynamic, structure-based value area.
Typical interpretations:
Price inside the pivot cloud → balance / fair value area.
Price above the pivot cloud → bullish value expansion.
Price below the pivot cloud → bearish value expansion.
Cloud compressing → possible energy build-up, transition between phases.
Cloud expanding → stronger directional conviction.
With the second cloud enabled on a higher timeframe, you can:
See whether lower-timeframe structure is building with or against the higher-timeframe pivot value.
Use the HTF cloud as a background bias and the LTF cloud for timing and fine-grained context.
Notes
All pivot-based tools have inherent delay: a pivot is only confirmed after pivotLen bars to the right.
On very low timeframes, long pivotLen + long MA lengths will make the lines slower to react.
This is intended as a context and structure tool, not a standalone entry signal.
Global J-1 & W-1 Levels (Fixed Lines / Lignes Fixes)Description
This indicator automatically plots key price levels from the previous day (D-1) and the previous week (W-1). It is designed for Day Traders and Scalpers who need clear visual references without cluttering their chart with past history.
Unlike standard indicators that use plot() and create "step-like" lines, this script uses graphic objects (line.new) to display fixed, infinite horizontal lines, just as if you had drawn them manually.
Key Features:
D-1 Levels (Blue): Previous Day High (DR-1) and Low (DS-1).
W-1 Levels (Red): Previous Week High (WR-1) and Low (WS-1).
Clean Chart: Lines are displayed only for the current session. No historical clutter.
Readability: Dashed lines with level names and exact prices displayed on the right.
How to use it? These levels often act as institutional support and resistance. Watch for price reactions (bounces or breakouts) near these zones to confirm your trade entries.
Auto-Anchored Fibonacci Volume Profile [Custom Array Engine]Description:
1. The Theoretical Foundation: Structure vs. Participation In professional technical analysis, traders often struggle to reconcile two distinct datasets: Price Geometry (where price should go) and Market Participation (where money actually went).
Why Fibonacci? (The Structure) Fibonacci Retracements map the mathematical structure of a trend. They identify psychological and algorithmic "interest zones" (0.382, 0.5, 0.618) where a correction is statistically likely to terminate. However, Fibonacci levels are theoretical—they are "lines in the sand" that do not guarantee liquidity or reaction.
Why Volume Profile? (The Verification) Volume Profile maps the historical exchange of shares at specific price levels. It reveals "fair value" (High Volume Nodes) and "market imbalance" (Low Volume Nodes). It is the only tool that verifies if a specific price level was actually accepted by institutional participants.
2. Underlying Calculations (The Custom Engine) This script operates on a custom-built calculation engine that bypasses standard built-in functions entirely. It uses Pine Script Arrays to build a Volume Profile from scratch. Here is the breakdown of the proprietary code logic:
A. The "Smart-Fill" Distribution Algorithm (Solves Gapping)
The Problem: Standard volume scripts often assign a candle's entire volume to a single price row. In volatile markets or steep trends, this creates visual "gaps" or a "barcode" effect because price moved too fast to register on every row.
My Solution: I wrote a custom loop that calculates the vertical overlap of every candle against the profile grid.
The Math: Volume Per Bin = Total Candle Volume / Bins Touched.
The Result: If a single volatile candle spans 10 price rows (bins), the script mathematically divides that volume and distributes it equally into all 10 array indices. This generates a solid, continuous distribution curve that accurately reflects price action through the entire candle range, not just the close.
B. Dynamic Arrays & Split-Volume Logic The script initializes two separate floating-point arrays (buyVolArray and sellVolArray) sized to the user's resolution (up to 300 rows). It iterates through the specific time-window of the swing:
If Close >= Open, the calculated volume slice is injected into the Buy Array.
If Close < Open, it is injected into the Sell Array.
These arrays are then visually stacked to render the dual-color profile, allowing traders to see the "Delta" (Buyer vs. Seller aggression) at key structural levels.
C. Custom Garbage Collection (Performance) To enable the "Auto-Anchoring" feature without causing chart lag or visual artifacts ("ghosting"), the script includes a Garbage Collection System. Before drawing a new profile, the script iterates through a tracking array of all existing objects (box.delete, line.delete) and clears them from memory. This ensures the indicator remains lightweight and responsive even when dragging chart margins or switching timeframes.
3. The Synthesis: Why Combine Them? The core philosophy of this script is Confluence . A Fibonacci level without volume is merely a suggestion; a Fibonacci level backed by volume is a defensive wall. By algorithmically anchoring a Volume Profile to the exact coordinates of a Fibonacci swing, this tool allows traders to instantly answer critical questions:
"Is the Golden Pocket (0.618) supported by a High Volume Node (HVN), or is it a Low Volume Node (LVN) that price might slice through?"
"Is the Shallow Retracement (0.382) holding because of structural support, or just a lack of selling pressure?"
4. How to Read the Indicator
The Geometry: The script automatically detects the trend and draws standard Fib levels (0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0).
The Confluence Check: Look for the Point of Control (Red Line). If this High Volume Node aligns with a key Fib level (e.g., the 0.618), the probability of a reversal increases significantly.
The Imbalance Check: Look for "Valleys" in the profile (Low Volume Nodes). These gaps often act as "slippage zones" where price travels quickly between structural levels.
Buy/Sell Splits: The dual-color bars (Teal/Red) reveal the composition of the volume. A 0.618 level held up by dominant Buy Volume is a stronger bullish signal than one with mixed volume.
5. Settings & Customization
Lookback Length: Sensitivity of the swing detection (Default: 200 bars).
Resolution: Granularity of the profile rows (Default: 100). Higher values provide smoother definition.
Width (%): Responsive sizing that scales the profile relative to the trend's duration.
Extend Lines: Option to project structural levels infinitely to the right.
Disclaimer This script is an analytical tool for visualizing historical market data. It does not provide trade signals or financial advice.
Quasimodo (QML) Pattern [Kodexius]Quasimodo (QML) Pattern is a market structure indicator that automatically detects Bullish and Bearish Quasimodo formations using confirmed swing pivots, then visualizes the full structure directly on the chart. The script focuses on the classic liquidity-grab narrative of the QML: a sweep beyond a prior swing (the Head) followed by a decisive market structure break (MSB), leaving behind a clearly defined reaction zone between the Left Shoulder and the Head.
Detection is built on pivot highs and lows, so patterns are evaluated only after swing points are validated. Once a valid 4 pivot sequence is identified, the indicator draws the pattern legs, highlights the internal triangle area to emphasize the grab, marks the MSB leg, and projects a QML zone that can be used as a potential area of interest for retests.
This tool is designed for traders who work with structure, liquidity concepts, and reversal/continuation triggers, and who want a clean, repeatable QML visualization without manually marking swings.
🔹 Features
🔸 Confirmed Pivot Based Structure Mapping
The script uses classic built-in pivot logic to detect swing highs and swing lows.
🔸 Automatic Bullish and Bearish QML Detection
The indicator evaluates the most recent 4 pivots and checks for a valid alternating sequence (High-Low-High-Low or Low-High-Low-High). When the sequence matches QML requirements, the script classifies the setup as bullish or bearish:
Bullish logic (structure reversal up):
- Left Shoulder is a pivot Low
- Head is a lower Low than the Left Shoulder (liquidity sweep)
- MSB pivot exceeds the Reaction pivot
Bearish logic (structure reversal down):
- Left Shoulder is a pivot High
- Head is a higher High than the Left Shoulder (liquidity sweep)
- MSB pivot breaks below the Reaction pivot
🔸 Full Pattern Visualization (Legs + Highlighted Core)
When a pattern triggers, the script draws:
Three main legs: Left Shoulder to Reaction, Reaction to Head, Head to MSB
A shaded triangular highlight over the internal structure to make the liquidity-grab shape easy to spot at a glance
🔸 QML Zone Projection
A QML Zone box is drawn using the price range defined between the Left Shoulder and the Head, then extended to the right to remain visible as price develops. This zone is intended to act as a practical reference area for potential retests and reaction planning after MSB confirmation.
🔸 MSB Emphasis
A dotted MSB line is drawn between the Reaction point and the MSB point to visually emphasize the confirmation leg that completes the pattern logic.
🔸 Clean Point Tagging and Directional Labeling
Key points are labeled directly on the chart:
- “LS” at the Left Shoulder
- “Head” at the sweep pivot
- “MSB” at the break pivot
A directional label (“Bullish QML” or “Bearish QML”) is also printed to quickly identify the detected bias.
🔸 Configurable Visual Style
All main visual components are user configurable:
- Bullish and bearish colors
- Line width
- Label size
🔸 Efficient Update Logic
Pattern checks are only performed when a new pivot is confirmed, avoiding unnecessary repeated calculations on every bar. The most recent pattern’s projected elements (zone and label positioning) are updated as new bars print to keep the latest setup readable.
🔹 Calculations
This section summarizes the core logic used for detection and plotting.
1. Pivot Detection (Swing Highs and Lows)
The script relies on confirmed pivots using the user inputs:
Left Bars: how many bars must exist to the left of the pivot
Right Bars: how many bars must exist to the right to confirm it
float ph = ta.pivothigh(leftLen, rightLen)
float pl = ta.pivotlow(leftLen, rightLen)
When a pivot is confirmed, its true bar index is the pivot bar, not the current bar, so the script stores:
bar_index
2. Pivot Storage and History Window
Each pivot is stored as a structured object containing:
- price
- index
- isHigh (true for pivot high, false for pivot low)
A rolling history is maintained (up to 50 pivots) to keep processing stable and memory usage controlled.
3. Sequence Validation (Alternation Check)
The pattern evaluation always uses the latest 4 pivots:
p0: Left Shoulder candidate
p1: Reaction candidate
p2: Head candidate
p3: MSB candidate
Before checking bullish/bearish rules, the script enforces alternating pivot types:
bool correctSequence =
(p0.isHigh != p1.isHigh) and
(p1.isHigh != p2.isHigh) and
(p2.isHigh != p3.isHigh)
This prevents invalid structures like consecutive highs or consecutive lows from being interpreted as QML.
4. Bullish QML Conditions
A bullish QML is evaluated when the Left Shoulder is a Low:
Head must be lower than Left Shoulder (sweep)
MSB must be higher than Reaction (break)
if not p0.isHigh
if p2.price < p0.price and p3.price > p1.price
// Bullish QML confirmed
Interpretation:
p2 < p0 represents the liquidity grab below the prior swing low
p3 > p1 represents the market structure break above the reaction high
5. Bearish QML Conditions
A bearish QML is evaluated when the Left Shoulder is a High:
Head must be higher than Left Shoulder (sweep)
MSB must be lower than Reaction (break)
if p0.isHigh
if p2.price > p0.price and p3.price < p1.price
// Bearish QML confirmed
Interpretation:
p2 > p0 represents the liquidity grab above the prior swing high
p3 < p1 represents the market structure break below the reaction low
6. Drawing Logic (Structure, Highlight, Zone, Labels)
When confirmed, the script draws:
Three connecting legs (LS to Reaction, Reaction to Head, Head to MSB)
A shaded triangle using a transparent “ghost” line to enable filling
A dotted MSB emphasis line between Reaction and MSB
A QML Zone box spanning the LS to Head price range and projecting to the right
Point labels: LS, Head, MSB
A direction label: “Bullish QML” or “Bearish QML”
7. Latest Pattern Extension
To keep the newest setup readable, the script updates the most recently detected pattern by extending its projected elements as new bars print:
QML zone right edge is pushed forward
The main label x position is pushed forward
This keeps the last identified QML zone visible as price evolves, without having to redraw historical patterns on every bar.
FVG Heatmap [Hash Capital Research]FVG Map
FVG Map is a visual Fair Value Gap (FVG) mapping tool built to make displacement imbalances easy to see and manage in real time. It detects 3-candle FVG zones, plots them as clean heatmap boxes, tracks partial mitigation (how much of the zone has been filled), and summarizes recent “fill speed” behavior in a small regime dashboard.
This is an indicator (not a strategy). It does not place trades and it does not publish performance claims. It is a market-structure visualization tool intended to support discretionary or systematic workflows.
What this script detects
Bullish FVG (gap below price)
A bullish FVG is detected when the candle from two bars ago has a high below the current candle’s low.
The zone spans from that prior high up to the current low.
Bearish FVG (gap above price)
A bearish FVG is detected when the candle from two bars ago has a low above the current candle’s high.
The zone spans from the current high up to that prior low.
What makes it useful
Heatmap zones (clean, readable FVG boxes)
Bullish zones plot below price. Bearish zones plot above price.
Partial fill tracking (mitigation progress)
As price trades back into a zone, the script visually shows how much of the zone has been filled.
Mitigation modes (your definition of “filled”)
• Full Fill: price fully trades through the zone
• 50% Fill: price reaches the midpoint of the zone
• First Touch: price touches the zone one time
Optional auto-cleanup
Optionally remove zones once they’re mitigated to keep the chart clean.
Fill-Speed Regime Dashboard
When zones get mitigated, the script records how many bars it took to fill and summarizes the recent environment:
• Average fill time
• Median fill time
• % fast fills vs % slow fills
• Regime label: choppy/mean-revert, trending/displacement, or mixed
How to use
Use FVG zones as structure, not guaranteed signals.
• Bullish zones are often watched as potential support on pullbacks.
• Bearish zones are often watched as potential resistance on rallies.
The fill-speed dashboard helps provide context: fast fills tend to appear in more rotational conditions, while slow fills tend to appear in stronger trend/displacement conditions.
Alerts
Bullish FVG Created
Bearish FVG Created
Notes
FVGs are not guaranteed reversal points. Fill-speed/regime is descriptive of recent behavior and should be treated as context, not prediction. On realtime candles, visuals may update as the bar forms.
SMC Academy [PhenLabs]📊 SMC Academy
Version: PineScript™ v6
📌 Description
The SMC Academy indicator is a comprehensive educational tool designed to demystify Smart Money Concepts (SMC) for traders of all levels. Unlike standard indicators that simply print signals, this script uses a “Learning Phase” system that allows users to toggle between individual concepts—such as Market Structure, Liquidity, Imbalances, and Order Blocks—or view them all simultaneously. It lets you focus on one piece of the puzzle at a time.
🚀 Points of Innovation
Progressive Learning Modes: Toggle between 5 distinct phases to master concepts individually before using the Full Strategy Mode.
Educational Tooltips: Hover over labels to read detailed explanations of why a BOS, MSS, or Liquidity zone was identified.
Smart Filtering: Uses ATR and Volume integration to filter out low-quality Fair Value Gaps and weak Order Blocks.
HTF Dashboard: A built-in panel analyzes Higher Timeframe (4H) data to ensure you are trading in alignment with the broader trend.
🔧 Core Components
Market Structure Engine: Automatically detects Swing Highs and Lows to map out market direction using configurable swing lengths.
Liquidity Manager: Identifies unmitigated swing points that serve as Buy-Side (BSL) and Sell-Side (SSL) liquidity magnets.
Imbalance Detector: Highlights Fair Value Gaps (FVG) where price inefficiencies exist, using ATR thresholds to ignore noise.
Order Block Identifier: Locates the specific candles responsible for structure breaks, validated by volume analysis.
🔥 Key Features
Break of Structure (BOS): Automatically marks trend continuation signals with solid lines and color-coded labels.
Market Structure Shift (MSS): Identifies potential trend reversals when significant swing points are breached.
Dashboard Context: Displays the current trend direction and the 4H context directly on your chart.
Custom Alerts: Built-in alert conditions for structure breaks and new Order Blocks allow for automated tracking.
🎨 Visualization
Structure Lines: Solid lines indicate confirmed breaks (Green for Bullish, Red for Bearish).
Liquidity Zones: Dotted lines extending rightward indicate resting liquidity levels that price may target.
FVG Boxes: Shaded boxes highlight imbalance zones, automatically extending for a user-defined number of bars.
Dashboard: A clean, non-intrusive table in the top-right corner displays trend status and active mode.
📖 Usage Guidelines
Setting Categories
Learning Mode: Select from ‘1. Market Structure’ through ‘5. Full Strategy Mode’ to filter what appears on the chart.
Swing Detection Length: Default (5). Determines the sensitivity of the swing high/low detection.
Structure Break Type: Options (Close/Wick). Choose whether a candle close or just a wick is required to confirm a break.
Min FVG Size: Default (0.5 ATR). Filters out gaps smaller than this multiplier to reduce noise.
Filter Weak OBs by Volume: Default (True). Only highlights Order Blocks where volume exceeds the 20-period average.
✅ Best Use Cases
Educational Study: Isolate “Phase 1: Market Structure” to practice identifying trend changes without distraction.
Trend Following: Use “Phase 3: Imbalances” to find entry points within an established trend.
Reversal Trading: Combine “Phase 2: Liquidity” and “Phase 4: Order Blocks” to catch reversals at key levels.
⚠️ Limitations
Subjectivity: Market structure can be interpreted differently depending on the swing length settings used.
Ranging Markets: Like all trend-following concepts, false BOS/MSS signals may generate during choppy, sideways price action.
Repainting: While the signals are non-repainting once confirmed, the live candle may flash a signal before the close if “Close” mode is selected.
💡 What Makes This Unique
Interactive Learning: The inclusion of tooltip explanations transforms this from a simple tool into an active mentor.
Phase-Based Workflow: The ability to strip the chart back to basics at the click of a button is unique to the PhenLabs ecosystem.
🔬 How It Works
Swing Analysis: The script calculates pivot highs and lows based on your length input to define the structural landscape.
Break Validation: It checks if price crosses these pivot points to trigger BOS (Continuation) or MSS (Reversal) logic.
Volume Confirmation: For Order Blocks, it looks back inside the swing leg to find the specific candle responsible for the move, verifying it has significant volume.
💡 Note:
For the best experience, start in Phase 1 to calibrate your Swing Detection Length to the specific volatility of the asset you are trading before enabling Full Strategy Mode.






















