Multi-Session H/L - Sweep & Grab v5# Multi-Session High/Low Levels with Liquidity Sweep & Grab Detection
## Overview
This indicator automatically identifies and plots the High and Low levels of key trading sessions (Asia, London, New York AM, New York PM) and Previous Day levels. It features advanced **Liquidity Sweep** and **Liquidity Grab** detection based on ICT/SMC methodology.
## Key Features
### 📊 Multi-Session Tracking
- **Asia Session** - Captures the Asian trading range
- **London Session** - Tracks the London open volatility
- **New York AM Session** - Monitors the NY morning session
- **New York PM Session** - Follows the afternoon price action
- **Previous Day High/Low** - Key daily reference levels
### 💧 Liquidity Detection (ICT/SMC Concepts)
**Liquidity Grab:**
- Detected when price **wicks through** a level but **closes back** inside
- Single candle event with rejection
- Often signals a potential reversal
- Label shows: `"Session H/L (Grab)"`
**Liquidity Sweep:**
- Detected when price **closes beyond** the level
- Indicates liquidity has been fully taken
- Label shows: `"Session H/L (Swept)"`
### 🎯 Visual Features
- Lines automatically **stop at the candle** where liquidity was grabbed or swept
- Different line styles for Active / Grabbed / Swept levels
- Customizable colors for each session
- Optional session background highlighting
- Information table showing all levels and their status
### ⚙️ Customization Options
- Adjustable session times for any timezone (GMT+0 to GMT+5)
- Calculation timeframe selection
- Line width and style settings
- Label size options
- Toggle each session on/off
- "Stop Line on Grab" option
### 🔔 Alerts
- Separate alerts for **Liquidity Grab** events
- Separate alerts for **Liquidity Sweep** events
- Available for all sessions and Previous Day levels
## How to Use
1. **Identify Key Levels:** The indicator automatically marks session highs and lows
2. **Watch for Liquidity Events:** Monitor when price approaches these levels
3. **Grab = Potential Reversal:** A liquidity grab (wick rejection) often signals smart money has collected orders and price may reverse
4. **Sweep = Liquidity Taken:** A sweep (close beyond level) confirms the liquidity pool has been cleared
5. **Plan Your Trades:** Use these levels in confluence with other SMC concepts like Fair Value Gaps (FVG) and Order Blocks (OB)
## Status Colors in Table
- 🟢 **Green (Active)** - Level has not been touched
- 🟠 **Orange (Grab)** - Wick touched the level, potential reversal zone
- 🔴 **Red (Swept)** - Close beyond level, liquidity fully taken
## Settings Explained
| Setting | Description |
|---------|-------------|
| Calculation Timeframe | Timeframe used for session calculations |
| Timezone | Your broker's timezone (GMT+0 to GMT+5) |
| Extend Lines | Extend active lines into the future |
| Stop Line on Grab | If enabled, lines stop when grabbed (not just swept) |
| Swept/Grab Line Style | Visual differentiation for liquidity events |
## Notes
- Works on all markets (Forex, Crypto, Stocks, Indices, Commodities)
- Best used on timeframes from 1min to 1H
- Session times are fully customizable to match your time zone
- The indicator respects the ICT/SMC definition where a **Grab** is a single-candle wick rejection and a **Sweep** involves price closing beyond the level
Ciclos
Cycles by AlgoKingsCycles by AlgoKings
RISK DISCLAIMER: This indicator is an analytical tool for educational purposes only, not financial advice. Trading carries substantial risk of loss. This tool does not guarantee profitable trades. Always use proper risk management and never risk more than you can afford to lose.
WHAT ARE CYCLES?
Cycles visualizes institutional time windows and key opening price levels. Instead of analyzing price patterns, this indicator segments the trading day into institutional order flow periods (90-minute, 30-minute, 10-minute cycles) and marks significant opening prices (session, daily, weekly, monthly, yearly) that often act as reference points for intraday price action.
Example: The 09:30 open price marks the start of regular US equity trading and often serves as a pivot level throughout the day. The London 1 (LN 1) 90-minute cycle from 02:30-04:00 EST represents the first institutional accumulation window.
UNDERLYING METHODOLOGY
This indicator combines three analytical layers:
1. INTRADAY CYCLE SEGMENTATION
Divides the trading day into institutional time windows:
ASIA SESSION:
18:00-02:30 EST (overnight session before London open)
90-MINUTE CYCLES:
Nine windows per trading day aligned with ICT methodology:
- LN 1, LN 2, LN 3: London session (02:30-04:00, 04:00-05:30, 05:30-07:00)
- AM 1, AM 2, AM 3: New York AM session (07:00-08:30, 08:30-10:00, 10:00-11:30)
- PM 1, PM 2, PM 3: New York PM session (11:30-13:00, 13:00-14:30, 14:30-16:00)
Technical implementation:
- 90m detection: Calculates ((hour * 60 + minute) - 150) % 90 == 0 to identify cycle boundaries from 02:30 EST baseline
- Session boundaries: Tracks inSession flag using time("", "0230-1600", gTimezone) to detect entry/exit from trading window
- Index tracking: Maintains counter (1-9) to assign sequential names (LN 1, AM 2, etc.) and color rotation (A/M/D pattern)
Color coding:
Each 90m cycle alternates three colors in A-M-D pattern (Accumulation-Manipulation-Distribution phases based on ICT concepts)
30-MINUTE CYCLES:
27 windows per trading day (2:30-16:00 EST), color-coded in A-M-D triplet pattern
10-MINUTE CYCLES:
81 windows per trading day (2:30-16:00 EST), single color for all
Cycle visualization:
- Box backgrounds highlight time ranges
- High/low tracked dynamically as cycle forms
- EQ (equilibrium) line at midpoint for 90m cycles
- Borders (optional) delineate cycle boundaries
2. OPENING PRICE TRACKING
Marks key opening levels that serve as institutional reference points:
SWING OPENS:
- Year Open: First price of calendar year
- Quarter Open: First price of Q1, Q2, Q3, Q4
- Month Open: First price of calendar month
- Week Open: First price of Sunday 18:00 EST (Monday for crypto)
INTRADAY OPENS:
- 00:00 Open: Midnight EST (new trading day for 24h markets)
- 09:30 Open: US equity market open
- Current Cycle Open (C.O): Opening price of most recent 90m cycle
Technical implementation:
- Period opens: Uses request.security to detect new bar on higher timeframe (time != previous time )
- Timed opens: Pattern matches hour/minute (e.g., hour==9 and minute==30 for 09:30)
- Line extension: Opens extend right dynamically (end = time + offset) to stay visible
History parameter controls how many previous opens to display per type.
3. OVERLAP CONSOLIDATION
When multiple opens share the same price level, consolidates into single visual:
ALGORITHM:
At barstate.islast, compares all active Level objects by price coordinate. When match found, merges labels into combined text with bullet separator (e.g., "M.O, W.O •" indicates Month Open and Week Open coincide). Lower precedence level undrawn, higher precedence level preserves visual with concatenated tooltip.
This prevents chart clutter when weekly, monthly, or quarterly opens align at same price.
WHY CLOSED-SOURCE?
This script protects proprietary algorithms:
- 90m cycle detection: Custom time arithmetic ((hour * 60 + minute) - 150) % 90 == 0 that calculates exact 90-minute boundaries from 02:30 baseline, with session boundary detection to exclude overnight periods
- Cycle index management: State machine that resets index to 1 on session start, increments through 1-9, applies modulo arithmetic for color rotation (index % 3), and assigns sequential names based on position
- Dynamic range tracking: Real-time high/low updating during cycle formation (h = math.max(h, high), l = math.min(l, low)) with isFinal flag transition when cycle completes
- Timed open detection: Pattern matching on hour/minute combinations with timezone conversion (gTimezone = "America/New_York") and proper handling of 24h markets vs traditional session starts
- Overlap consolidation: Price-based comparison of all Level objects at barstate.islast, string concatenation of names, selective undrawing to maintain single visual per price level
- Day of week positioning: Complex time offset calculations (newNoonTime = time - D/2, newMidTime for Sunday handling) to center labels at day midpoints considering crypto 24/7 vs traditional market schedules
Standard cycle indicators show fixed time periods. This script provides ICT-aligned institutional windows with smart label management and multi-timeframe open tracking.
TECHNICAL COMPONENTS
Core structures:
- Security Object: Stores timeframe data (open, time, time ) from request.security calls, maintains isNew flag for cycle detection
- Range Object: Represents cycle box with coordinates (start, end, h, l), isFinal state, drawing objects (box, label, eq line)
- Level Object: Represents open price line with coordinates (price, start, end, startCtf), isFinal state, drawing objects (line, label)
- Option Object: Centralized settings container with cycle-specific overrides for colors, styles, history counts
Cycle detection patterns:
- 90m: if (security.isNew and ((hour * 60 + minute) - 150) % 90 == 0 and inSession)
- 30m: if (security.isNew and inSession), index cycles 1-2-3 for color
- 10m: if (security.isNew and inSession)
- Period opens: if (security.isNew) on higher timeframe
- Timed opens: if (security.isNew and hour == h and minute == m)
Extension logic:
- Ranges: end = time, h = max(h, high), l = min(l, low) while not isFinal
- Levels: end = time + offset (offset = ctfSeconds * 12000 for far-right placement)
HOW TO USE
Setup:
1. Apply to intraday chart (works best on 1m-30m timeframes)
2. Enable/disable cycle types in Time Cycles section
3. Enable/disable open types in Opens section
4. Configure History to control how many days/periods to show
5. Adjust colors and line styles to preference
Chart Timeframe Requirements:
Designed for intraday charts (seconds to 30m). Higher timeframes (1H+) will show opens but cycles may not display properly.
Interpretation:
CYCLES (Box Backgrounds):
- ASIA = Gray box covering 18:00-02:30 EST
- LN 1/2/3 = Blue/Red/Green boxes (London 90m cycles)
- AM 1/2/3 = Blue/Red/Green boxes (NY morning 90m cycles)
- PM 1/2/3 = Blue/Red/Green boxes (NY afternoon 90m cycles)
- 30m/10m = Smaller nested cycles within 90m windows
- EQ line = 50% equilibrium level within 90m cycle range
OPENS (Horizontal Lines):
- C.O = Current 90m cycle open (most recent)
- 00:00 = Midnight EST open
- 09:30 = US equity market open
- W.O = Week open (Sunday 18:00)
- M.O = Month open
- Q.O = Quarter open
- Y.O = Year open
- Bullet (•) in label = Multiple opens at same price
DAY OF WEEK:
- Labels at chart bottom (Monday, Tuesday, etc.)
- Vertical dividers at midnight (optional)
SETTINGS EXPLAINED
Time Cycles:
- Asia: Enable/disable Asia session box (18:00-02:30 EST) with color picker
- 90m Cycle: Enable/disable 90m windows with three color pickers (A/M/D phases)
- 90m EQ: Show/hide equilibrium line at midpoint of 90m cycles
- 30m Cycle: Enable/disable 30m windows with three color pickers
- 10m Cycle: Enable/disable 10m windows with single color
- Label: Size for cycle names (LN 1, AM 2, etc.)
- Border: Show/hide cycle box outlines with style picker
- History (Days): Number of days to show cycles (0-4)
Opens:
- Label: Color and size for all open price labels
- Line Width: Thickness for all open price lines
- Current Cycle: Enable/disable C.O (current 90m cycle open)
- 00:00: Enable/disable midnight open with color and history count
- 09:30: Enable/disable equity market open with color and history count
- Week: Enable/disable weekly open with color and history count
- Month: Enable/disable monthly open with color and history count
- Quarter: Enable/disable quarterly open with color and history count
- Year: Enable/disable yearly open with color and history count
History count determines how many previous opens to display (e.g., History=2 for Weekly shows this week and last week's opens)
Day of Week:
- Day: Enable/disable day name labels at chart bottom
- Divider: Enable/disable vertical lines at midnight boundaries with style picker
UPDATES
This script is actively maintained. Updates released through TradingView's native update system. For technical questions, use the comment section below.
Asia range + liquidity and PDH/PDLThis comprehensive ICT indicator automatically plots a fully customizable Asian Range with 'smart' liquidity rails that terminate on wick contact, alongside Previous Day High/Low (PDH/PDL) levels featuring a unique 'body-break' stop logic, all while offering complete style control and a 'clean history' mode to display only the current session's key levels."
PXX Levels by AlgoKingsPXX Levels by AlgoKings
RISK DISCLAIMER: This indicator is an analytical tool for educational purposes only, not financial advice. Trading carries substantial risk of loss. This tool does not guarantee profitable trades. Always use proper risk management and never risk more than you can afford to lose.
WHAT ARE PXX LEVELS?
PXX (Previous X High/Low) displays key support and resistance levels from completed market cycles. Unlike standard pivot indicators that use fixed bars, this tool calculates levels using natural market rhythms (sessions, 90-minute institutional windows, true daily periods) that align with institutional trading behavior.
Example: Previous Day High at 15,200 acts as resistance. Previous London session Low at 15,150 acts as support.
UNDERLYING METHODOLOGY
This indicator combines four analytical layers:
1. CYCLE-BASED PERIOD DETECTION
Tracks 10 cycle types across swing and intraday timeframes:
SWING CYCLES:
- Yearly: 12-month institutional rebalancing highs/lows
- Quarterly: 3-month earnings cycle extremes
- Monthly: Calendar month highs/lows
- Weekly: 7-day swing extremes
- Daily: Standard 18:00-18:00 EST bars
- TrueDay: 00:00-00:00 EST for 24-hour markets (futures, forex, crypto)
INTRADAY CYCLES:
- Session: Asia (18:00-02:00), London (02:00-08:30), NY AM (08:30-12:00), NY PM (12:00-17:00) EST
- 90m: Three 90-minute institutional windows (LN 1/2/3, AM 1/2/3, PM 1/2/3)
- 30m: 30-minute cycle extremes
- 10m: 10-minute cycle extremes
Technical implementation:
- TrueDay calculation: Detects candle closes at exactly 00:00 EST using time modulo arithmetic on 24-hour markets
- Session detection: Pattern matching on hour:minute timestamps (e.g., hr==2 and mn==30 triggers London session end at 02:30)
- 90m subdivision: Three 90-minute windows per session identified by specific time boundaries
- Cycle completion: Uses request.security with lookahead_on to detect when previous period (high , low ) closes
2. LEVEL TRACKING AND STATE MANAGEMENT
Proprietary state machine for each level:
LEVEL STATES:
- Live: Current cycle forming, level updates bar-by-bar as new highs/lows form
- Final: Cycle completed, level locked at cycle's high/low
- Taken: Price has touched/exceeded the level (mitigation)
- Extended: Level continues displaying after cycle completion or mitigation
State transitions:
- New cycle detected → Create Live level at current high/low
- Cycle completes → Transition Live to Final, lock coordinates
- Price touches level → Mark as Taken, optional removal from chart
- History limit reached → Purge oldest levels
Technical components:
- Level Object: Tracks y-price, x-start time, x2-current extension, isFinal/isTaken/isLive/isExtend flags
- Dynamic extension: Levels extend to current bar (x2 = time) until finalized or taken
- Mitigation detection: Compares current high >= level for resistance, low <= level for support
3. OFF-CHART LEVEL BACKFILL
Handles higher timeframe levels that formed before chart data:
When chart timeframe is lower than cycle period (e.g., 5m chart showing Daily levels), the indicator backfills up to 4 historical cycles using nested request.security calls (high , low , high , low , etc.). These off-chart levels are marked with tag in tooltips.
Anchor detection: If price matches an off-chart level's value, the indicator anchors it to the current bar time, removing the off-chart designation and making it actionable.
4. OVERLAP CONSOLIDATION AND PURGE HIERARCHY
Advanced filtering to prevent chart clutter:
OVERLAP DETECTION:
When multiple cycles produce identical levels (same y-price and x2-extension), the indicator combines them into a single visual with merged labels. Example: "P D, P W H" shows Previous Day and Previous Week High coincide.
Algorithm compares all levels at barstate.islast, identifies duplicates by y-coordinate and x2-endpoint, undraws lower precedence levels, and appends their names to higher precedence level's tooltip.
PURGE HIERARCHY:
- "Purge 10m/30m on new 90m Cycle": When 90m cycle completes, removes all 10m and 30m sub-cycle levels from chart
- "Purge 90m on new Session Cycle": When Session cycle completes, removes all 90m levels from chart
- This prevents clutter by automatically cleaning sub-levels when parent cycle resets
Implementation uses array-based tracking where higher cycle types (Session, 90m) hold references to lower cycle Pxx objects, allowing cascading purge operations on cycle completion.
WHY CLOSED-SOURCE?
This script protects proprietary algorithms:
- Cycle boundary detection: Custom logic for TrueDay (00:00 EST detection), Session identification (time-based pattern matching for 5 sessions), 90m subdivision (9 windows per day with specific time triggers), requiring complex hour/minute arithmetic
- Off-chart backfill system: Nested request.security calls to retrieve 4 historical cycles with isOffChart flagging and dynamic anchor detection when price revisits historical levels
- Level state machine: Multi-state tracking (Live/Final/Taken/Extended) with transition logic, including dynamic y-coordinate updates during Live state and precise finalization timing
- Overlap consolidation algorithm: Compares all active levels at each bar using y-coordinate and x2-endpoint matching, merges duplicate levels, preserves highest precedence visual while concatenating names
- Purge hierarchy system: Parent-child relationships between cycle types (Session→90m→30m/10m) with cascading cleanup operations triggered on cycle completion events
Standard support/resistance indicators show fixed pivot points. This script provides institutional-level cycle tracking with intelligent state management and visual optimization.
TECHNICAL COMPONENTS
Core structures:
- Cycle Object: Tracks cycle type, period string, current bar data, and array of historical CycleBar objects (up to 5 cycles deep)
- CycleBar Object: Stores high/low values, timestamps (open, close, high-time, low-time), cycle name, and off-chart status
- Level Object: Contains y-price, start/end coordinates, state flags (isFinal, isTaken, isLive, isExtend, isOffChart, isCurrent), and drawing objects (line, labels)
- Pxx Object: Manages array of high levels and array of low levels for one cycle type, handles updates/extensions/purging
Cycle detection:
- TrueDay: Tests hour==0 and minute==0 at time_close OR dayofweek change (excluding Monday for non-crypto)
- Session: Matches hour:minute pairs (17:00=ASIA, 02:30=LN, 07:00=AM, 11:30=PM, 16:00=VOID)
- 90m: Nine specific time boundaries from 02:30 to 16:00 EST
- Default cycles: Uses previous period close time (time ) from request.security
HOW TO USE
Setup:
1. Apply to any chart (works on all symbols and timeframes)
2. Enable/disable cycle types in settings (Swing Cycles, Intraday Cycles)
3. Configure History count for each cycle (how many previous levels to show)
4. Enable "Live" to see current cycle levels forming in real-time
5. Enable "Extend" to keep levels visible after mitigation
Chart Timeframe Requirements:
- Swing cycles: Chart TF must be <= cycle period and divide evenly (e.g., Daily requires 1H or lower)
- Intraday cycles: Chart TF must divide evenly into cycle (e.g., Session/90m/30m require 30m or lower, 10m requires 10m or lower)
- TrueDay: Automatically used instead of Daily on 1H and below for 24-hour markets
Interpretation:
- Horizontal lines show Previous High (resistance) and Previous Low (support) from completed cycles
- "P" prefix = Previous cycle (e.g., "P D H" = Previous Day High)
- No prefix = Current cycle forming (e.g., "LN 2 L" = Current London 2nd 90m Low)
- Dotted line = Level has been taken (mitigated)
- Solid line = Level still active
- Dot at left = Level formation point
- Label at right = Cycle name and high/low designation
- in tooltip = Level formed before chart data, not yet anchored
SETTINGS EXPLAINED
Time Cycles (Each cycle has 5 settings):
- Checkbox: Enable/disable cycle
- Color: Line color for this cycle's levels
- History: Number of previous cycles to display (1-4, or higher for intraday)
- Extend: Keep level visible after mitigation
- Live: Show current cycle's level as it forms bar-by-bar
Swing Cycles Available:
Year, Quarter, Month, Week, Day (uses TrueDay automatically on 1H and below for 24h markets)
Intraday Cycles Available:
Session (5 sessions per day), 90m (9 windows per day), 30m, 10m
Options:
- Line Width: Thickness of level lines (default: 1)
- Label: Show/hide text labels with size and color options
- Show Mitigated: Keep levels on chart after taken (shows as dotted) or remove them
- Purge 10m/30m on new 90m Cycle: Auto-remove sub-levels when 90m completes
- Purge 90m on new Session Cycle: Auto-remove 90m levels when Session completes
Common Configurations:
- Scalping: Enable 10m, 30m, 90m with History=1-3, Live=true, Extend=false
- Day Trading: Enable Session, 90m, Day with History=1-4, Live=true
- Swing Trading: Enable Day, Week, Month with History=1-2, Extend=true
- Position Trading: Enable Week, Month, Quarter, Year with Extend=true
UPDATES
This script is actively maintained. Updates released through TradingView's native update system. For technical questions, use the comment section below.
SMT Cycles by AlgoKingsSMT Cycles by AlgoKings
RISK DISCLAIMER: This indicator is an analytical tool for educational purposes only, not financial advice. Trading carries substantial risk of loss. This tool does not guarantee profitable trades. Always use proper risk management and never risk more than you can afford to lose.
WHAT ARE SMT CYCLES?
This indicator identifies Smart Money Technique divergences using cycle-based analysis rather than standard timeframes. Cycles represent natural market rhythms (sessions, 90-minute institutional windows, true daily periods) that better align with institutional trading patterns than arbitrary timeframe bars.
Example: During the London session, NQ makes a new high but ES fails to follow = Bearish SMT divergence within the London cycle
UNDERLYING METHODOLOGY
This indicator combines four analytical layers:
1. AUTOMATIC CORRELATION MAPPING
Built-in correlation intelligence for 40+ pairs (identical to SMT Custom):
- Futures: NQ, ES, YM cross-correlation | GC/SI | 6E/6B
- Forex: EURUSD/GBPUSD/DXY(inverse) | AUDUSD/NZDUSD
- Stocks: MAG7 (META, NVDA, MSFT, etc.) vs NDX
- Crypto: BTCUSD/ETHUSD
Algorithm automatically mirrors contract types and exchange prefixes using regex-based parsing for futures contracts and micro variants.
2. CYCLE-BASED PERIOD DETECTION
Unlike standard timeframe analysis, this indicator uses market structure cycles:
SWING CYCLES (Position Trading):
- Yearly: 12-month institutional rebalancing periods
- Quarterly: 3-month earnings and fund rotation cycles
- Monthly: Calendar month institutional flows
- Weekly: 7-day swing trading cycles
- Daily: Standard 18:00-18:00 EST bars
- TrueDay: 00:00-00:00 EST for 24-hour markets (futures, forex, crypto)
INTRADAY CYCLES (Day Trading):
- Session: Asia (18:00-02:00), London (02:00-08:30), NY AM (08:30-12:00), NY PM (12:00-17:00) EST
- 90m: Three 90-minute windows per trading day (02:00-03:30, 03:30-05:00, etc.)
- 30m: 30-minute institutional order flow windows
- 10m, 3m, 1m: Scalping cycles for precise entry timing
Technical implementation:
- TrueDay calculation: Detects candle closes at exactly 00:00 EST using time modulo arithmetic on 24-hour markets. Differs from standard Daily bars which use futures settlement times (18:00 EST).
- Session detection: Regex pattern matching on hour/minute timestamps to identify cycle boundaries (e.g., h==2 and m==0 triggers Asia session end)
- 90m hierarchy: Groups sub-90m cycles (30m, 10m, 3m, 1m) under their parent 90m window using group timestamp tracking (gx field)
- Intermediate accumulation: For multi-bar cycles (TrueDay, Sessions, 90m), maintains running high/low (nh1, nl1) across constituent bars until cycle completion
3. MULTI-TIMEFRAME CYCLE ANALYSIS
Proprietary cycle synchronization:
- Tracks price structure across up to 11 configurable cycles simultaneously
- Maintains independent high/low tracking for each symbol pair using request.security()
- Compares previous cycle extremes (high , low ) across correlated pairs
- Timestamps divergence formations at chart timeframe precision
- Implements adaptive purge logic (1min to 12M) based on cycle type
4. DIVERGENCE CLASSIFICATION SYSTEM
Bullish SMT: Chart symbol makes lower low within cycle, correlated pair does NOT = Institutional buying pressure
Bearish SMT: Chart symbol makes higher high within cycle, correlated pair does NOT = Institutional selling pressure
Advanced features include level tracking (monitors when extremes are revisited), automatic extension until both levels violated, 90m hierarchy overlap filtering (hides sub-90m SMT within parent 90m window), and inverse correlation support for DXY relationships.
WHY CLOSED-SOURCE?
This script protects proprietary algorithms:
- Cycle boundary detection: Custom logic for TrueDay calculation (00:00 EST candle close detection using modulo arithmetic on 24h markets), Session identification (time-based regex for Asia/London/NY periods), and 90m window calculation (minute offset from 02:00 EST baseline)
- Intermediate cycle accumulation: Complex state management for multi-bar cycles (Sessions, 90m, TrueDay) that build complete cycle values across constituent bars before finalizing
- 90m hierarchy system: Proprietary grouping algorithm (gtype, gca, gx fields) that links sub-90m cycles to parent windows for intelligent overlap filtering
- Automatic symbol mapping: Custom logic for 40+ correlation pairs including futures contract recognition and exchange inheritance
- Adaptive purge system: Cycle-specific memory management (1S to 12M) optimized through backtesting
- Multi-level tracking: Simultaneous monitoring of multiple active divergences across different cycle types with state management for "taken" levels
Standard SMT indicators use fixed timeframes. This script analyzes institutional cycles that don't align with standard bar periods, requiring complex time arithmetic and multi-bar aggregation logic.
TECHNICAL COMPONENTS
Core structures:
- Cycle Object: Tracks high/low/time for each cycle type with intermediate values (nh1, nl1) for multi-bar cycles and complete cycle values (h1, l1, t1) upon cycle completion
- CycleType Enum: Defines 11 cycle types (year, quarter, month, week, day, trueday, session, m90, m30, m10, m3, m1) with associated period strings and purge thresholds
- Point Object: Stores divergence formation data for chart symbol level and correlated symbol level with "taken" status tracking
- SMT Object: Visual representation with line extension, tooltip showing formation time (EST), and optional 90m group timestamp (gx) for hierarchy filtering
Cycle detection logic:
- TrueDay: Tests if hour==0, minute==0 at candle close OR day-of-week changes (with Monday exception for markets closed weekends)
- Session: Matches specific hour:minute combinations (16:30=Void, 02:00=Asia end, 06:30=London end, 11:00=NY AM end, 15:30=NY PM end)
- 90m: Calculates (hour*60 + minute - 120) % 90 == 0 to detect 90-minute boundaries from 02:00 EST baseline
HOW TO USE
Setup (Automatic Mode - Recommended):
1. Apply to chart of supported pair (see correlation list above)
2. Indicator automatically detects optimal comparison symbols
3. Enable/disable specific cycle categories (Swing or Intraday) in settings
4. Enable/disable individual cycles within each category
5. Adjust visual preferences (colors, line styles, labels)
Setup (Manual Mode):
1. Uncheck "Automatic Symbol Mode" in settings
2. Enter "Manual Symbol #1" (e.g., ES1! when chart shows NQ1!)
3. Optional: Enter "Manual Symbol #2" for three-way comparison
4. Check "Invert" if symbol is inversely correlated (e.g., DXY vs EURUSD)
Chart Timeframe Requirements:
- Swing cycles: Chart TF must be <= cycle period (e.g., Daily cycle requires 1H or lower chart)
- Intraday cycles: Chart TF must divide evenly into cycle (e.g., 90m cycle requires 30m, 15m, 10m, 5m, or lower chart)
- TrueDay: Automatically selected for 1H and below chart TF on 24-hour markets (futures, forex, crypto)
Interpretation:
- Blue lines = Bullish SMT (chart made lower low within cycle, correlated pair held higher). Potential reversal up.
- Red lines = Bearish SMT (chart made higher high within cycle, correlated pair stayed lower). Potential reversal down.
- Dots in labels = Multiple SMT signals overlap. Hover to see all cycles showing divergence.
SETTINGS EXPLAINED
Symbols:
- Automatic Symbol Mode: Uses built-in correlation intelligence (recommended)
- Manual Symbol #1/2: Override automatic selection
- Invert: For inverse correlations (DXY vs majors)
- Hide Exact Overlap: Removes duplicate signals with identical start/end times
- Hide 90m Hierarchy Overlap: Hides sub-90m SMT (30m, 10m, 3m, 1m) when contained within parent 90m window
- Hide All Overlap: Hides lower precedence SMT when start/end points overlap higher precedence SMT
Intraday Cycles (Enable/Disable per symbol):
- Session: Asia (18:00-02:00), London (02:00-08:30), NY AM (08:30-12:00), NY PM (12:00-17:00) EST
- 90m: Three 90-minute institutional windows per day
- 30m: 30-minute cycles
- 10m, 3m, 1m: Scalping cycles
- Each cycle has two checkboxes: left for Symbol #1, right for Symbol #2
Swing Cycles (Enable/Disable per symbol):
- Yearly: 12-month cycles
- Quarterly: 3-month cycles
- Monthly: Calendar month cycles
- Weekly: 7-day cycles
- Daily: Standard daily bars (18:00-18:00 EST) OR TrueDay (00:00-00:00 EST on 1H and below chart TF for 24h markets)
- Each cycle has two checkboxes: left for Symbol #1, right for Symbol #2
Display:
- Bull/Bear: Enable/disable directional signals
- Line colors, styles (solid/dashed/dotted), widths
- Label: Show/hide text labels with color and size options
- SMT formation time: Displays timestamp in tooltip (New York time)
UPDATES
This script is actively maintained. Updates released through TradingView's native update system. For technical questions, use the comment section below.
SMT Custom by AlgoKingsSMT Custom by AlgoKings
RISK DISCLAIMER: This indicator is an analytical tool for educational purposes only, not financial advice. Trading carries substantial risk of loss. This tool does not guarantee profitable trades. Always use proper risk management and never risk more than you can afford to lose.
WHAT IS SMART MONEY TECHNIQUE (SMT)?
SMT identifies divergences between correlated market pairs when one asset makes a new high/low but its correlated counterpart fails to do so. These divergences often signal institutional repositioning and potential reversal points.
Example: NQ makes a new high at 15,200 but ES fails to exceed its previous high = Bearish SMT divergence
UNDERLYING METHODOLOGY
This indicator combines three analytical layers:
1. AUTOMATIC CORRELATION MAPPING
Built-in correlation intelligence for 40+ pairs:
- Futures: NQ, ES, YM cross-correlation | GC/SI | 6E/6B
- Forex: EURUSD/GBPUSD/DXY(inverse) | AUDUSD/NZDUSD
- Stocks: MAG7 (META, NVDA, MSFT, etc.) vs NDX
- Crypto: BTCUSD/ETHUSD
Algorithm automatically mirrors contract types (perpetual/quarterly futures) and exchange prefixes using regex-based parsing. Recognizes quarterly contracts (NQU2025), micro contracts (MNQ, MES), and perpetual syntax (NQ1!).
2. MULTI-TIMEFRAME CYCLE ANALYSIS
Proprietary cycle detection algorithm:
- Tracks price structure across 9 configurable timeframes simultaneously
- Maintains independent high/low tracking for each symbol pair using request.security()
- Identifies cycle completions with time-synchronized bar analysis
- Implements adaptive purge logic (1min to Monthly) to balance historical context vs performance
Technical implementation compares previous period extremes (high , low ) across correlated pairs and timestamps divergence formations at chart timeframe precision.
3. DIVERGENCE CLASSIFICATION SYSTEM
Bullish SMT: Chart symbol makes lower low, correlated pair does NOT = Institutional buying pressure
Bearish SMT: Chart symbol makes higher high, correlated pair does NOT = Institutional selling pressure
Advanced features include level tracking (monitors when extremes are revisited), automatic extension until both levels violated, overlap filtering to remove redundant signals, and inverse correlation support for DXY relationships.
WHY CLOSED-SOURCE?
This script protects proprietary algorithms:
- Automatic symbol mapping: Custom logic for 40+ correlation pairs including futures contract recognition (expiration codes, micro contracts) and exchange inheritance
- Cycle synchronization engine: Complex timestamp matching ensures divergences only flagged when both symbols' cycle periods align perfectly (prevents false signals from data lag)
- Adaptive purge system: Timeframe-specific memory management (1S to 12M) optimized through backtesting
- Multi-level tracking: Simultaneous monitoring of multiple active divergences with state management for "taken" levels
- Overlap intelligence: Algorithm determines when to hide/combine signals from different timeframes while preserving information in tooltips
Standard divergence indicators simply compare two moving averages. This script performs real-time institutional flow analysis across correlated instruments.
HOW TO USE
Setup (Automatic Mode - Recommended):
1. Apply to chart of supported pair (see correlation list above)
2. Indicator automatically detects optimal comparison symbols
3. Enable/disable specific timeframes in settings
4. Adjust visual preferences (colors, line styles, labels)
Setup (Manual Mode):
1. Uncheck "Automatic Symbol Mode" in settings
2. Enter "Manual Symbol #1" (e.g., ES1! when chart shows NQ1!)
3. Optional: Enter "Manual Symbol #2" for three-way comparison
4. Check "Invert" if symbol is inversely correlated (e.g., DXY vs EURUSD)
Interpretation:
- Blue lines = Bullish SMT (chart made lower low, correlated pair held higher). Potential reversal up.
- Red lines = Bearish SMT (chart made higher high, correlated pair stayed lower). Potential reversal down.
- Dots in labels = Multiple SMT signals overlap. Hover to see all timeframes.
SETTINGS EXPLAINED
Symbols:
- Automatic Symbol Mode: Uses built-in correlation intelligence (recommended)
- Manual Symbol #1/2: Override automatic selection
- Invert: For inverse correlations (DXY vs majors)
- Hide Exact Overlap: Removes duplicate signals with identical start/end times
- Hide All Overlap: Hides lower timeframe SMT within higher timeframe ranges
Timeframes:
- 9 configurable timeframe rows
- Toggle each symbol independently (Sym #1, Sym #2 checkboxes)
- Default: Chart TF, 1m, 5m, 15m, 1H, 4H, Daily, Weekly, Monthly
Display:
- Bull/Bear: Enable/disable directional signals
- Line colors, styles (solid/dashed/dotted), widths
- Label: Show/hide text labels with color and size options
- SMT formation time: Displays timestamp in tooltip (New York time)
UPDATES
This script is actively maintained. Updates released through TradingView's native update system. For technical questions, use the comment section below.
Titan Distance & Momentum [Professional Suite]Are you tired of "whipsaws" and false breakouts?
The Titan Distance & Momentum is not just another oscillator. It is a specialized quantitative tool designed to solve the two biggest problems in day trading: Market Exhaustion and Trend Filters.
While standard indicators (like RSI or MACD) generate noisy signals, the Titan Distance algorithm focuses on Clarity and Mean Reversion logic.
🚀 KEY FEATURES:
1. Real-Time Distance Dashboard (The "Elastic" Effect) Most traders lose money by buying tops or selling bottoms. This indicator calculates the exact distance (in points) between the current price and the 200-period Moving Average.
Visual Alert: The background automatically turns RED or GREEN when the price is statistically "overstretched" (too far from the mean).
The Logic: When the background lights up, the "elastic" is stretched. STOP following the trend and prepare for a reversion or pullback.
2. "Quantum" Smoothed Momentum We replaced the jagged, hard-to-read lines of traditional oscillators with a triple-smoothed exponential wave.
Green Wave: Positive clean momentum (Safe to buy).
Red Wave: Negative clean momentum (Safe to sell).
Zero Lag: Designed to react faster than standard MACD but smoother than raw RSI.
🎯 HOW TO USE IT:
Trend Following: Only take BUY trades when the Wave is Green and rising above the Zero Line.
The Filter: If your strategy gives a signal, LOOK DOWN. Is the background colored (Red/Green)? If yes, the market is overextended. Do not enter. Wait for the price to return to the average.
Dashboard: Check the label on the right side. It tells you exactly how many points away the price is from the 200 EMA (e.g., "+500 pts").
⚙️ SETTINGS:
Momentum Length: Adjust the sensitivity of the wave.
Distance Alert: Set the threshold (in points) to trigger the background color alert (Default: 1000 points for Indices).
Designed for precision. Built for professionals.
Turtle Trading Indicator with Stats TableThis indicator is based on the classic Turtle Trading strategy, enhanced with ATR‑based stop lines and a built‑in performance statistics table. It helps traders visualize breakout entries, exits, volatility stops, and track real‑time trade outcomes directly on the chart.
🔧 Key Features
Entry Breakout Levels (20‑bar High/Low):
Plots the highest high and lowest low over the last 20 bars. A close above the 20‑bar high signals a potential long entry; a close below the 20‑bar low signals a potential short entry.
Exit Channel Levels (10‑bar High/Low):
Plots the highest high and lowest low over the last 10 bars. These serve as exit triggers — closing below the 10‑bar low exits a long, closing above the 10‑bar high exits a short.
ATR Stop Lines (2N):
Uses the Average True Range (ATR) to calculate volatility bands (close ± 2 × ATR). These bands act as dynamic stop levels, showing where volatility‑based exits would occur.
Position Sizing (ATR‑based):
Calculates a suggested position size based on account equity, risk percentage, and ATR. This ensures trades are scaled to volatility, keeping risk consistent.
Signal Labels:
Displays labels on the chart for long entries, short entries, and exits. Each entry label includes the calculated position size.
Performance Stats Table:
A table in the corner of the chart shows real‑time trade statistics:
Win Rate % – percentage of trades closed profitably.
Gain % – cumulative percentage return from winning trades.
Loss % – cumulative percentage return from losing trades.
Average Risk‑Reward (RR) – ratio of total gains to total losses.
Average Return % – average return per trade.
Trades (W|L) – total trades taken, broken down into wins and losses.
🎯 How to Use
Watch for breakouts above/below the 20‑bar channel to identify entry signals.
Use the 10‑bar channel or ATR stop lines to manage exits.
Position sizing adapts to volatility, helping maintain consistent risk.
Monitor the stats table to evaluate performance in real time while testing or refining the strategy.
This indicator combines visual trade signals with quantitative feedback, making it a practical tool for learning, testing, and applying the Turtle Trading methodology.
The Automatic Channel Revolution [8 Levels + Slicing]Stop wasting time manually drawing lines and start trading.
I present to the community Fimathe Master Pro, a unique tool designed to completely automate the Fimathe technique, eliminating subjectivity and human error when drawing channels.
Many traders miss entry timing while adjusting rectangles or manually calculating the 50% (slicing) levels. This script solves that instantly, creating a visual structure that is clean, professional, and objective for Day Trading (Indices, Forex, and Crypto).
🚀 WHAT MAKES THIS SCRIPT UNIQUE?
Unlike other indicators that simply plot support and resistance lines, Fimathe Master Pro creates a Dynamic Block Structure:
Automatic Reference Channel: You define the time range (e.g., first 30 min or 1h), and the script automatically detects the High and Low, locking in the Reference Channel and Neutral Zone.
8-Level Expansion System (New): The indicator automatically projects 4 Levels Up and 4 Levels Down. You will never run out of targets during strong trend days again.
Visual Slicing (50%): The script automatically draws discrete dotted lines in the middle of each channel, allowing for precise "slicing" operations (sub-channel trading) without cluttering the chart.
Clean & Transparent Visuals: Developed with an intelligent transparency layer (92%), ensuring you can see the candles perfectly while identifying Buy and Sell zones.
⚙️ HOW TO CONFIGURE:
Session: Default is set to 0900-0930 (First 30 min). If you trade the Classic Fimathe (1 hour), simply change it in the settings to 0900-1000.
Slicing: Can be toggled on or off with a single click.
Colors: Fully customizable to fit your template (Dark or Light mode).
🎯 WHO IS THIS INDICATOR FOR?
Ideal for Price Action traders and students of the Fimathe technique who want to professionalize their screen and gain agility in decision-making.
If this script helped your market reading, please leave a BOOST (Like) and comment your suggestions below!
MagicMagic
This sophisticated indicator identifies and analyzes Smart Money Divergence patterns by systematically examining pivot point relationships between a primary asset and a secondary correlated instrument.
The indicator establishes divergence signals through precise algorithmic detection when pivot pairs exhibit opposing directional patterns between the primary and secondary assets. This sophisticated analysis reveals institutional positioning discrepancies that often precede significant market reversals.
Following divergence confirmation, the indicator provides comprehensive visualization tools and optional alert systems to capitalize on these high-probability trading opportunities. Advanced filtering capabilities allow traders to customize sensitivity levels, timeframe parameters, and styling to align with their specific trading methodology.
This powerful solution delivers unmatched functionality for traders seeking to identify and exploit Smart Money positioning through multi-asset divergence analysis. With its robust detection algorithms and granular customization options, it provides capabilities that surpass conventional divergence indicators by incorporating institutional flow analysis principles highly regarded in professional trading circles.
What is Smart Money Divergence?
Smart Money Divergence is another name for Smart Money Techniques (SMT). These patterns appear when comparing swing points, of adjustable strength, between correlated assets...
When an asset makes a higher high while the other makes a lower high.
TBS Signals v2.6
## TBS Signals – Trend Based System
**TBS Signals** is a non-repainting trading indicator designed to assist traders in identifying potential buy and sell opportunities aligned with prevailing market trends.
The indicator focuses on capturing directional moves while minimizing signals during uncertain or low-quality market conditions.
---
### Key Characteristics
* Works as a **trend-following system**
* Designed to avoid sideways and low-momentum markets
* Generates signals only after candle close (no repainting)
* Suitable for discretionary and systematic traders
* Clean visual presentation with minimal chart clutter
---
### What It Provides
TBS Signals visually highlights:
* Potential **Buy** and **Sell** zones
* Trend direction guidance
* Areas where traders may look for continuation entries
The internal logic and calculations are proprietary and intentionally not disclosed.
---
### Recommended Markets & Timeframes
TBS Signals can be applied to:
* Forex
* Gold
* Indices
* Crypto
Recommended timeframes:
* Intraday: M15, M30, H1
* Swing: H4, D1
---
### Usage Notes
* Designed to be used with proper risk management
* Best results are achieved when combined with higher timeframe trend bias
* Avoid trading during major news events or extremely low volatility sessions
---
### Disclaimer
TBS Signals is a technical analysis tool and does not guarantee profits.
All trading involves risk. Users are responsible for their trading decisions.
---
This version:
✅ Hides your logic
✅ Passes TradingView moderation
✅ Builds user trust
✅ Keeps your IP safe
If you want, I can also:
* Create a **short version** (for compact display)
* Suggest a **strong title & tags**
* Or write a **description for selling later** without violating TradingView rules.
7 Wonder Moving Average [DR Trade]Moving Averages are easy-to-learn indicators for beginners.
We provide seven moving average indicators that can be customized to suit each trader's needs. We also offer a selection of moving averages: the Simple Moving Average, the Exponential Moving Average, and the Hull Moving Average.
We provide the Hull Moving Average for traders to more accurately identify trends and potential reversals. The HMA is more responsive to recent price changes than the SMA or EMA, while still maintaining a smooth trendline. The HMA was first introduced by Alan Hull to address the lag and noise of traditional moving averages (MAs).
The best way to use the HMA indicator is to use a 100-period indicator on the H1 timeframe.
The other six indicators can be customized by each trader.
Thank you.
Intraday Toolkit1. Visual Components of the Indicator
Understanding the visual cues is essential for quick decision-making during fast-moving intraday sessions:
Trend Background: The background color represents the Primary Cycle (80-period) bias. Green indicates a bullish trend (price is above the primary cycle), and red indicates a bearish trend (price is below the primary cycle).
The Three Cycles:
Yellow Line: Short Cycle (20) – Used for momentum triggers.
Orange Line: Mid Cycle (40) – Represents the baseline for volatility envelopes.
Red Line: Primary Cycle (80) – Defines the overall trend direction.
Volatility Envelopes: Two green lines plotted at a distance (1.5x ATR) from the Mid Cycle. These act as exhaustion zones where price is likely to revert or consolidate.
Rule 3 Signals (Purple Circles): These appear when a specific 3-candle momentum breakout occurs.
2. Trading Strategy for 5m & 15m
This toolkit is most effective when you use the 15m chart for trend confirmation and the 5m chart for precise entries.
Long (Buy) Setup
Enter a long position when the following alignment occurs:
Bullish Bias: The background must be Green (Price > Primary Cycle).
Cycle Low: A pivot low must have been detected (the indicator identifies a local bottom).
Momentum Trigger: Price must close above the Yellow Short Cycle line while the previous candle was below it.
Rule 3 Confirmation: If a purple circle appears simultaneously, it confirms strong buying momentum.
Short (Sell) Setup
Enter a short position when the following alignment occurs:
Bearish Bias: The background must be Red (Price < Primary Cycle).
Cycle High: A pivot high must have been detected (the indicator identifies a local top).
Momentum Trigger: Price must close below the Yellow Short Cycle line while the previous candle was above it.
Rule 3 Confirmation: A purple circle above the price confirms a bearish momentum shift.
3. Exit and Take-Profit Logic
The script includes "State Control" to manage your exits effectively:
Targeting the Envelopes: The primary profit target is the Outer Green Envelope. If price touches the upper envelope (for longs) or lower envelope (for shorts), the trend may be exhausted.
Momentum Exit: If price crosses back over the Yellow Short Cycle line in the opposite direction of your trade, the toolkit considers the move over and signals an exit.
4. Specific Tips for Day Trading
Avoid "Counter-Trend" Signals: Do not take Buy signals if the background is Red, or Sell signals if the background is Green. The logic is built to filter these out for better win rates.
The "Rule 3" Advantage: Use the purple circles as a "second chance" entry. If you missed the initial Buy/Sell signal, a Rule 3 circle indicates momentum is still strong in that direction.
Timeframe Synergy: * 15m: Best for seeing the "Big Picture" and avoiding noise.
5m: Best for finding entries with smaller stop-losses near the Yellow Short Cycle line.
FED Net Liquidity (WALCL - TGA - RRP)a measure of FED net liquidity with color codes. What is FED Net Liquidity?
FED Net Liquidity is a proxy for how much usable US-dollar liquidity is actually available to financial markets.
It combines three balance-sheet items from the Federal Reserve and the US Treasury into one number:
FED Net Liquidity =
FED Balance Sheet (WALCL) − Treasury General Account (TGA) − Reverse Repo (RRP)
The goal is simple:
to estimate how much money is “in play” for risk assets, rather than parked or withdrawn.
Indian Equities Theme Tracker [EWT] - Sector Rotation HeatmapIdentify where the "Smart Money" is flowing in the Indian Markets.
The Indian Equities Theme Tracker is a powerful visual dashboard designed for NSE traders and investors to monitor sector rotation and relative strength in real-time. By tracking the most liquid Exchange Traded Funds (ETFs), this tool provides a birds-eye view of the Indian economy—from core benchmarks like Nifty 50 and Nifty 500 to high-growth themes like Defence, EV, Tourism, and Energy.
In modern markets, capital doesn't move into all stocks at once; it rotates between sectors. This script helps you spot the leaders and laggards across five different timeframes, ensuring you are always positioned in the strongest themes.
🚀 Key Features :
23+ Essential Themes: Tracks Broad Market, Market Caps (Mid/Small), Sectors (IT, Bank, Auto, Metal), and Narratives (Defence, Tourism, EV, Energy).
Dynamic Performance Sorting: Automatically reorders the table based on your selected lookback (1 Day, 1 Week, 1 Month, 3 Months, or YTD).
Heatmap Logic: Intuitive color coding helps you instantly identify extreme bullishness or bearishness across the board.
Liquidity Focused: Uses the most liquid NSE ETFs (BeES and equivalent) to ensure the data is accurate and reflects tradeable prices.
Pro UI Design: A clean, professional dashboard that can be positioned anywhere on your chart without cluttering your price action analysis.
📊 Themes Included :
Benchmarks: Nifty 500, Nifty 50, Nifty Next 50.
Market Caps: Midcap 150, Smallcap 250.
Sectors: Private & PSU Banks, IT, Pharma, Healthcare, FMCG, Auto, Metals, Infra, Realty.
Thematic/Narratives: Defence, Tourism, Energy, EV & New Age Automotive, Consumption.
Safe Havens: Gold & Silver.
🛠️ How to use :
Timeframe: Switch to the Daily (D) timeframe for the best results.
Settings: Use the inputs to change the table position (Top/Middle/Bottom) and the sorting criteria.
Strategy: Look for themes that are consistently at the top of the "1 Month" and "3 Month" lists—these are your structural leaders. Use "1 Day" to spot quick tactical bounces.
Disclaimer: This indicator is for educational and informational purposes only and does not constitute financial advice. Always perform your own due diligence.
MAG7 and VIXMAG7 and VIX is a institutional-grade market breadth and sentiment dashboard designed specifically for Nasdaq (NQ) traders. Instead of relying on a single price chart, this indicator provides a "look under the hood" of the market by tracking the volatility of the entire index and the individual performance of the seven stocks that drive over 40% of the Nasdaq 100's movement.
Core Components
1. The Fear Gauges (Volatility Monitoring)
This section tracks the VIX (S&P 500 Volatility) and VXN (Nasdaq Volatility).
The Logic: Volatility and price usually have an inverse relationship.
Risk-On: When these numbers are Green (negative %), volatility is dropping, which usually provides a "tailwind" for stocks to rise.
Risk-Off: When these numbers turn Red (positive %), fear is entering the market, often preceding a sharp sell-off or indicating that a rally is built on "shaky ground."
2. Tech Leaders (Market Breadth)
This monitors the Mag7 (NVDA, AAPL, MSFT, AMZN, GOOG, META, TSLA). The dashboard calculates a Weighted Average of these leaders to show the true strength of the "engines" behind the NQ.
Weights: NVDA, AAPL, and MSFT are given 1.5x weight because their market caps have the highest impact on the index.
Individual Heatmap: Each stock has its own cell that changes color based on its performance relative to the daily open.
Using the Dashboard for Divergence Trading
The primary value of this indicator is spotting Divergence, which occurs when the NQ price is lying to you but the internal data shows the truth.
Bearish Breadth Divergence: The NQ hits a new high, but the Tech Leaders Average is negative, and most individual cells (like NVDA or MSFT) are red. This indicates the move is "thin" and likely a bull trap.
Bullish Breadth Divergence: The NQ is flushing to new lows, but the Tech Leaders are starting to turn green or the Fear Gauges are rapidly dropping. This often signals that a bottom is being put in.
Dashboard Placement & Aesthetics
Top Center Positioning: Placed by default at the top-center of your chart to keep your eyes on the price action while maintaining peripheral awareness of the macro data.
Large UI: Designed for high-resolution screens so you can read the percentage shifts without squinting during fast-moving "Turbo" sessions.
Real-Time Updates: The data is fetched dynamically using request.security, ensuring the "Heatmap" reflects current intraday strength rather than just yesterday's close.
Macro 6-PackMacro 6-Pack dashboard: SPX momentum, VIX, HY credit spread, 10Y yield shifts, DXY trend, and 2s10s curve.
Blockcircle MRS - Macroeconomic Risk ScorecardOVERVIEW
This BLOCKCIRCLE MACROECONOMIC RISK SCORECARD (MRS) is a real-time economic analysis dashboard that tracks over 30 key metrics and proprietary indicators across GDP, employment, income, consumption, industrial production, yield curves, and credit markets. It consolidates data that would otherwise require monitoring dozens of separate sources into a single, actionable interface.
The core purpose is straightforward: know when conditions support risk-taking and when caution is warranted. Whether you lean aggressive or conservative, this tool gives you the data foundation to adjust your positioning across different timeframes. It delivers both daily short-term insights and a long-term perspective in one view.
WHAT MAKES IT ORIGINAL AND DIFFERENT
This indicator represents years of research into recession forecasting and macroeconomic analysis, distilled into a unified system that goes far beyond what standard economic dashboards provide.
Seven distinct recession risk methodologies run simultaneously: M1 Proprietary Composite, M2 GDP 2-Quarter Rule, M3 Yield Curve Inversion, M4 Sahm Rule, M5 Credit Stress Index, M6 Leading Indicators, and M7 Combined Method
The M1 model is a proprietary scoring system developed through extensive backtesting against historical recession data, weighting GDP, GDI, employment, income, consumption, industrial production, and delinquency data through a calibrated formula
Historical percentage changes span eight distinct lookback periods (1P through 50P), allowing you to see momentum shifts that single-period comparisons miss entirely
Quantitative ratios, including Employment/Population, GDP/GDI divergence, Income/Consumption, Monetary Velocity, Industrial Momentum, and Real Interest Rate, provide context that raw numbers alone cannot deliver
Credit stress monitoring tracks delinquency acceleration across seven loan categories, catching deterioration before it shows up in headline figures
The combined risk score synthesizes all methodologies into a single weighted output with color-coded severity levels
CORE FEATURES
Unified dashboard structure with consistent columns across all sections: VALUE, 1P%, 2P%, 3P%, 5P%, 10P%, 20P%, 30P%, 50P%, TF, STATUS, and SIG
Standardized STATUS classifications provide immediate interpretation without requiring deep economic knowledge
TF column displays data frequency for each metric (3M for quarterly, M for monthly, W for weekly, D for daily)
Compact view toggles let you hide the TF column or extended period columns when you need a cleaner display
NBER recession shading overlays historical recession periods directly on the chart with optional start/end labels
Five fully customizable moving averages with selectable sources from any risk model or economic metric
Configurable alert system with multi-condition triggers for risk threshold breaches across any methodology
Everything on the scorecard is configurable to your exact needs and wants
METRICS COVERAGE
Core Recession Metrics: Real GDP, Gross Domestic Income, Total Nonfarm Payrolls, Civilian Employment, Real Personal Income, Real Personal Consumption, Industrial Production
Key Economic Indicators: Unemployment Rate, Yield Curve (10Y-2Y), M2 Money Supply, Fed Balance Sheet, Consumer Sentiment, Leading Economic Index, ISM Manufacturing PMI, Building Permits, NY Fed Recession Probability
Financial Stress Metrics: Financial Conditions Index (NFCI), High-Yield Spread, TED Spread, Corporate Spread (BAA-AAA), VIX, Initial Jobless Claims
Delinquency Tracking: All Loans, Consumer Loans, Credit Card, Business Loans, Residential RE, Single Family Residential, Commercial RE
Quantitative Ratios: Employment/Population Ratio, GDP/GDI Ratio, Income/Consumption Ratio, Monetary Velocity, Industrial Momentum, Real Interest Rate
USE CASES
Assess economic and monetary policy impacts before making asset allocation decisions
Monitor recessionary risk through multiple independent methodologies and the unified composite score
Track credit stress as an early warning system before problems appear in broader markets
Validate or challenge economic narratives circulating in financial media against objective, sourced data
Time entries and exits in risk assets based on macro regime identification
Compare current conditions against historical precedents using the multi-period change analysis
TECHNICAL SPECIFICATIONS
Optimized data architecture reduced script complexity from 40+ request.security() calls to 38 highly efficient calls
Function-based table rendering dramatically improves execution speed and reduces loading times
Chart labels display full metric names with MA configuration details for immediate identification
Modular dashboard sections can be individually enabled or disabled based on your focus areas
Risk threshold levels are fully adjustable to match your personal risk tolerance
You can setup precise alerts to be notified when specific recessionary risk models are forecasting a potential recession in the horizon, this can be tailored to your customized needs
Theme TrackerTheme Tracker is a clean, at-a-glance theme rotation dashboard built to help you quickly identify where money is flowing—and where it’s leaving—across the market’s most important macro, sector, and industry themes.
Instead of bouncing between dozens of charts, Theme Tracker tracks a curated basket of 40 major theme ETFs and displays their relative performance across multiple timeframes, so you can instantly spot leadership, momentum shifts, and early rotation.
What it shows
For each theme ETF, the table displays performance over:
1 Day
1 Week
1 Month
3 Months
Year to Date (YTD)
Themes are ranked automatically by the timeframe you choose, allowing you to focus on what matters most in the current market regime—short-term momentum, intermediate rotation, or longer-term trend leadership.
Why it’s useful
Market leaders change. Rotation happens quietly at first, then suddenly.
Theme Tracker helps you:
Find the strongest themes fast (the “winners” attracting capital)
Spot weakening themes early (distribution and risk-off rotation)
Confirm market tone by comparing offensive vs defensive leadership
Generate trade ideas by focusing on the themes that are already being bid up
Avoid laggards by seeing what’s consistently underperforming across timeframes
When a theme is strong across multiple timeframes, that’s often where momentum traders and institutions are concentrating exposure. When it’s weak across timeframes, that’s often where capital is exiting.
How to use it
1) Choose your sort timeframe
Use the Sort setting (1D / 1W / 1M / 3M / YTD) to rank themes based on your trading horizon.
2) Look for alignment
Strong across all columns = sustained leadership
Strong short-term, weak long-term = potential bounce / rotation attempt
Weak short-term, strong long-term = possible pullback in a leader
Weak across the board = consistent capital outflow
3) Pair with your chartwork
Use the strongest themes as a shortlist for deeper chart analysis, setups, and relative strength confirmation.
Visual design
The table uses clear formatting and heat-style shading to make it easy to read quickly. Green tones highlight strength; red tones highlight weakness—so you can interpret rotation in seconds without overthinking.
If you trade momentum, relative strength, or market structure, Theme Tracker gives you one of the simplest edges available: knowing what’s leading right now. Track the best-performing themes, identify emerging rotation, and stay aligned with the areas of the market where capital is actually moving.
Blockcircle GLS - Global Liquidity ScorecardOVERVIEW
The BLOCKCIRCLE GLOBAL LIQUIDITY SCORECARD(GLS) is a professional-grade macro liquidity monitoring system built for traders who base positioning decisions on monetary conditions. The simplest application involves tracking the global M2 money supply forward projected 10 to 14 weeks, which provides a reasonably accurate forecast of risk asset price direction like BTC or leading Tier 1 stocks. This scorecard helps you identify whether monetary conditions support risk-on or risk-off positioning across short and long timeframes.
HOW TO USE IT
When net liquidity is positive and rising with green signals, when M2 is expanding, and when the majority of central banks are easing, consider long positional bias with expectations of rising asset prices.
When net liquidity is negative or falling with red signals, when M2 is contracting, and when central banks are tightening, consider defensive positioning or short bias with expectations of declining asset prices.
Use the forward projected M2 overlay to anticipate where Bitcoin and S&P 500 prices may trend in the coming weeks.
Monitor the funding rate section for stress signals that often precede major market moves.
Watch the automated regime detection status which classifies conditions as CRITICAL, TIGHT, NEUTRAL, or AMPLE based on rate relationships.
WHAT MAKES IT ORIGINAL AND DIFFERENT
This is not a simple M2 chart overlay. The GLS aggregates liquidity data from seven major economies, converts everything to USD using live FX rates, and calculates US Net Liquidity using the formula (Fed Balance Sheet minus RRP minus TGA). The scorecard normalizes all metrics across timeframes with multi-period percentage changes at 1P, 2P, 3P, 5P, 10P, 20P, and 50P intervals, giving you trend strength context that single-value displays cannot provide.
The proprietary Monetary Policy Scorecard evaluates each major central bank on a 0 to 100 scale based on balance sheet and money supply changes, then aggregates a global score. This lets you see at a glance whether worldwide policy is easing, neutral, or tightening.
The automated liquidity regime detection for short-term funding rates classifies conditions as CRITICAL, TIGHT, NEUTRAL, or AMPLE based on the relationship between SOFR, IORB, and Fed Funds boundaries.
The dashboard presents all data in a unified scorecard format with color-coded percentage changes, moving average comparisons, status classifications, and signal indicators for each metric. This consolidation eliminates the need to monitor multiple separate indicators or data sources.
CORE LIQUIDITY METRICS
Global M2 Money Supply aggregated from US, EU, Japan, China, UK, Canada, and Australia with live USD conversion.
Global Central Bank Balance Sheet tracking across all major economies.
US Net Liquidity calculation providing the critical liquidity measure that correlates with risk asset performance.
Reverse Repo (RRP) monitoring showing cash parked at the Fed and its drain rate.
Treasury General Account (TGA) tracking government spending and building patterns.
Multi-period percentage change columns showing momentum across 1P through 50P timeframes.
SHORT-TERM FUNDING RATE MONITORING
Overnight Lending Rate (SOFR) displayed as the white line on the chart with real-time values.
30-Day Lending Rate Average for smoothed trend analysis.
Bank Reserve Rate (IORB) serving as the Fed anchor rate shown in pink.
Fed Rate Ceiling and Floor boundaries visualized as the blue-filled corridor on the chart.
Actual Fed Rate (EFFR) showing where rates actually trade.
Automated regime classification displayed in the STATUS column based on rate relationships.
FED OPERATIONS TRACKING
Fed Emergency Lending (Standing Repo Facility) usage as a stress indicator with DORMANT, ACTIVE, ELEVATED, or HIGH STRESS classification.
Fed Treasury Holdings showing bond portfolio changes with ADDING or DRAINING status.
Fed Total Assets for overall balance sheet direction.
Dollar Strength Index with inverted signal logic for liquidity interpretation.
MONETARY POLICY SCORECARD
Individual country scores for US, Japan, EU, China, and UK on a 0 to 100 scale displayed in the VALUE column.
Scoring based on 3-period changes in both central bank balance sheets and M2 money supply.
Global aggregate score highlighted with EASING, NEUTRAL, or TIGHTENING classification.
Multi-period percentage changes for each country to identify acceleration or deceleration in policy stance.
MARKET AND RATIO ANALYSIS
Bitcoin, Total Crypto, and S&P 500 market cap tracking with BULLISH, BEARISH, or NEUTRAL trend classification.
BTC/M2 Ratio showing Bitcoin performance relative to money supply growth with OUTPERFORM or UNDERPERFORM status.
SP500/M2 Ratio for equity valuation against liquidity expansion.
Liquidity Velocity measuring how efficiently money supply translates to net liquidity with OVERHEATING, NORMAL, or SLUGGISH classification.
CONFIGURABLE ALERTS ENGINE
Net Liquidity vs MA alerts with customizable operators including crosses above, crosses below, and threshold comparisons.
Fed Balance Sheet consecutive increase or decrease alerts over configurable periods.
RRP threshold alerts for drain completion monitoring.
TGA change percentage alerts for spending or building events.
M2 growth acceleration or deceleration alerts.
SOFR above IORB alert for tight liquidity conditions.
SOFR above Fed Funds ceiling alert for critical stress conditions.
CHART PLOTTING OPTIONS
Toggle individual plots for all liquidity metrics, funding rates, market caps, and ratios.
Forward projected M2 overlay with configurable week offset from 0 to 52 weeks.
Fed Funds corridor visualization with filled area between ceiling and floor as shown in the blue shaded region.
Automatic end-of-chart labels showing current values for all active plots.
DASHBOARD CONFIGURATION
Adjustable table position with options for all corners and middle positions.
Text size options from tiny to large for different screen configurations.
Toggle visibility for each section independently, including Liquidity Metrics, Short-Term Funding, Fed Operations, Market Prices, Monetary Policies, Liquidity Ratios, and Summary.
Select which countries to include in global M2 and central bank balance sheet aggregations.
Choose between SMA and EMA for all moving average calculations with configurable length.
SUMMARY PANEL
The GLS Summary section at the bottom of the dashboard provides a consolidated view combining liquidity trend, funding conditions, policy stance, and market sentiment into a single status line. Below that, plain-language interpretations explain whether the Fed is adding or draining liquidity, whether cash is returning to or exiting markets via RRP, and whether Treasury is spending or building reserves.
LIMITATIONS AND CONSIDERATIONS
Economic data updates on varying schedules. M2 data is typically monthly, central bank balance sheets are weekly, and funding rates are daily. The indicator uses the most recent available data point.
FX conversion introduces some noise during periods of extreme currency volatility.
Forward M2 projection is a time-shifted overlay of historical data, not a predictive model. It works because liquidity changes tend to lead asset prices by several weeks, but this relationship is not guaranteed.
The Monetary Policy Score is a simplified heuristic. Actual central bank policy involves many factors beyond balance sheet and M2 changes.
Past correlations between liquidity and asset prices do not guarantee future results.
RECOMMENDED TIMEFRAMES
The scorecard is designed for macro analysis on daily, weekly, and monthly charts. Shorter timeframes are meant to track short-term funding rates daily, and the other fields will show the same underlying data but may not provide additional signal value given the update frequency of economic and quantitative data sources.
IPDA TimeWhat the indicator does
IPDA Time marks swing highs/lows that occur at specific “time windows” defined by a selectable time method. It’s designed as a context tool to help you visually study whether certain timestamp patterns tend to align with meaningful swing points on your market/instrument.
It does not generate trade signals and it does not predict direction. It simply annotates pivots that meet your chosen time filter.
Core concept (high level)
Swing detection
The script uses standard pivot logic (a swing length input) to identify confirmed swing highs and swing lows.
A pivot is only confirmed after the required number of bars have printed, meaning labels appear with the usual “pivot confirmation delay.”
Automatic mode by timeframe
The script automatically changes what it prints on the label depending on chart timeframe:
4H and higher: prints a date-style label (swing context)
Below 4H: prints a time-style label (intraday context)
Time filtering
You can switch the time logic from 369 to Goldbach:
Only swings that meet the currently selected method are labeled.
Label pairing
Each swing gets up to two labels:
Time/Date label
Value label (either 3/6/9 or “GB/GBxx”)
The script uses a clean spacing method so the two labels stay evenly separated.
Lifecycle management
Labels are removed if price later invalidates the swing (optional).
A safety cap limits how many labels are kept, preventing label-limit issues on TradingView.
Time methods
369 method
The “369” mode evaluates a simplified digit-reduction test on the relevant timestamp. If the reduced result matches the 3/6/9 family, that pivot is considered eligible and will be labeled.
This is applied in:
Intraday context (time-based view)
Higher timeframe context (date-based view)
Goldbach method
The “Goldbach” mode computes a single derived number from the timestamp (based on your chosen formula option), then checks whether it belongs to a predefined allowed set. If it matches, the swing is eligible.
You can describe it as:
“A timestamp-derived value is computed from the session time”
“That value is validated against a fixed inclusion list”
“If valid, it’s marked as Goldbach time (GB) or GBxx when enabled”
Neeson Crypto Cycle - Super Enhanced EditionThe "Neeson Crypto Cycle - Super Enhanced Edition": A Philosophical and Practical Framework for Market Analysis
Originality & Core Philosophy
Most trading indicators focus on a single domain: pure price action, a specific economic theory, or a handful of technical oscillators. The "Neeson Crypto Cycle" breaks this paradigm. Its fundamental originality lies not in inventing one new mathematical formula, but in architecting a multi-dimensional, multi-timeframe convergence framework. It operates on a core philosophical premise: financial markets are Complex Adaptive Systems (CAS) influenced by a symphony of concurrent cycles. These cycles range from mathematical and technical ones visible on the chart, to fundamental economic rhythms, down to collective human psychology and even speculative meta-patterns.
The script is built as a "dashboard of dashboards," attempting to quantify and visualize these disparate layers on a single pane. It does not claim predictive certainty but aims to provide a holistic situational awareness, allowing the trader to identify when multiple, unrelated cycles from different domains align (convergence) or conflict (divergence).
What It Does & How It Achieves It
The indicator functions as a comprehensive market-phase and sentiment analysis engine implemented directly on the TradingView chart. It is an overlay indicator that provides visual plots, background coloring, signal labels, and, most notably, extensive multi-table data panels.
Its implementation can be broken down into several operational layers:
1. The Core Technical Cycle Layer:
This is the foundational price-based engine. It simultaneously tracks multiple proprietary cyclical models derived from moving average crossovers with non-standard periods believed to capture crypto-specific rhythms.
CCT Pi Cycle: Uses the interaction between a 150-period EMA / 471-period SMA pair (for "bottom" identification) and a 111-period SMA / (350-period SMA * 2) pair (for "top" identification). It identifies golden/death crosses within these specific pairs.
Atlantean Signals: A variant using similar periods (471, 150, 350, 111) but with different multipliers (e.g., 0.745) and crossover logic to define "Market Bottom," "Bull Market Start," and "Market Top" events.
Bitcoin Cycle: Based on the interaction between a 116-period SMA and a doubled 365-period SMA.
Golden Pi Cycle: Another variant using SMAs of 111, 350, 150, and 471 periods.
These are not just four random moving average systems; they are distinct models targeting different aspects of the purported "Pi-based" and long-term cyclicality in Bitcoin's price history. The script visually plots these lines and labels their crossover events.
2. The Market Phase & Structural Context Layer:
Background Coloring: It dynamically colors the chart background (blue for "Bottom to Top" phase, orange for "Top to Bottom" phase) based on the sequential logic of Atlantean signals, providing immediate visual context for the perceived market regime.
Halving Event Annotations: It marks key historical and projected Bitcoin halving dates with vertical lines and labels, anchoring price action to this fundamental supply schedule.
3. The Quantitative Dashboard Layer (Technical & On-Chain):
This is where the script transitions from chart plotting to an information system. It renders multiple fixed tables on the chart (bottom-left, bottom-center, bottom-right) only on the last bar.
Technical Sentiment Dashboard (Right): A massive table aggregating over a dozen classic and advanced technical indicators (RSI, MACD, Bollinger Bands, Stochastic, ADX, Ichimoku, Parabolic SAR, Fibonacci levels, etc.). For each, it shows a calculated Status (e.g., "Overbought"), a numeric Value, and a concise Advice (e.g., "Sell"). It then groups these into "Cycle Indicators" (status of the core models above) and "Risk Management" metrics (Max Drawdown, Sharpe Ratio simulation, volatility).
Synthetic On-Chain Metrics Dashboard (Center): Since TradingView cannot pull real on-chain data, the script ingeniously simulates 80 different on-chain metrics (NVT, MVRV, Hash Rate, Exchange Flows, HODL Waves, S2F, etc.) by deriving them from price and volume data. Each metric displays a name, a simulated value, a signal ("Overvalued"), and a color code. This provides a proxy for the fundamental/network health narrative.
Multi-Cycle Systems Dashboard (Left): This table transcends traditional finance, cataloging the status of various long-wave cycles:
Economic Cycles: Kondratieff (50-60yr), Kuznets (15-25yr), Juglar (7-11yr), Kitchin (3-5yr), etc., each with a hardcoded current phase (e.g., "Recession (2020-2030)"), impact, and advice.
Speculative & Novel Cycles: Lunar, Seasonal, Commodity Super, Debt, and Innovation cycles.
Esoteric Systems: A full celestial (astrological) positioning of planets and a Four Pillars of Destiny (Bazi) reading, each with assigned market "impact" and "advice."
4. The Synthesis & Alert Layer:
Comprehensive Statistics: The right dashboard concludes with a tally of "Bullish vs. Bearish Signals" from across all technical and cycle indicators, generating an "Overall Sentiment" score.
Alert System: It creates TradingView alert conditions for every major crossover event from the core cycle models (CCT, Atlantean, Bitcoin, Golden Pi), allowing for automated notifications.
Underlying Calculation Logic & Rationale
The logic is built on convergence and weighted evidence. The creator's hypothesis appears to be that significant market turning points are rarely signaled by one indicator in isolation. Instead, they occur when:
Multiple Price-Based Cycle Models Align: When the CCT, Atlantean, and Bitcoin cycles all approach a "bottom" or "top" signal near the same time, the probability of a true phase change is considered higher.
Technical Conditions Match the Cycle Phase: A "Bull Market Start" signal is more credible if accompanied by oversold RSI/Stochastic, bullish MACD, and money flowing in (rising OBV).
The Macro Backdrop Supports the Narrative: The script hardcodes a specific macroeconomic worldview (e.g., "Tightening Credit Cycle," "AI Revolution Tech Cycle") to remind the user of the broader environment the price cycles are operating within.
Awareness of "Non-Rational" Drivers: By including astrological and Bazi elements, the script acknowledges that market narratives and crowd psychology can sometimes be influenced by or framed within these non-traditional systems. It doesn't necessarily predict with them but tracks them as potential sentiment catalysts.
The calculations for technical indicators are standard. The novelty is in their collective presentation and the synthetic creation of supporting data realms (on-chain, economic, esoteric) to form a complete, albeit highly speculative, "universe" of market-influencing factors.
How to Use It: A Practical Guide
This is not a "set and forget" system that generates simple buy/sell arrows. It is a decision-support and research tool.
Market Phase Identification: First, look at the background color and the status of the core cycle models in the right dashboard. Are you in a blue "Bottom to Top" phase? Check if the Atlantean "Bull Market Start" is active. This sets your primary bias.
Seeking Convergent Signals: Before acting on a cycle signal, cross-reference it with the Technical Sentiment dashboard. For example, an Atlantean "Market Top" signal is stronger if the RSI and Stochastic also show "Overbought," the MACD is "Bearish," and the Fear & Greed Index is in "Extreme Greed." Look for clusters of agreement.
Context from Other Dimensions: Check the On-Chain dashboard. Does the synthetic data suggest the network is "Overheated" or "Undervalued"? Check the Economic Cycle table. Does the perceived long-wave phase (e.g., "Kondratieff Recession") support a risk-on or risk-off stance? This provides narrative context for your trade thesis.
Risk Management Integration: Before sizing a position, check the Risk Management section. What is the current "Max Drawdown" and "Volatility Risk"? The dashboard suggests position sizing ("Light," "Medium," "Heavy") based on this.
Utilizing Alerts: Set alerts for the key cycle crossovers (CCT, Atlantean, etc.). When an alert triggers, it's your cue to open the chart and perform the full multi-dimensional convergence analysis described above, rather than acting on the alert alone.
In essence, the "Neeson Crypto Cycle" is a conceptual trading terminal. It posits that the modern trader, especially in crypto, must synthesize information from technicals, fundamentals, macroeconomics, and market psychology. By attempting to model all these facets in one place—even through estimation and simulation—it aims to give the user a structured framework for asking the right questions about the current state of the market, rather than providing simplistic, one-dimensional answers. Its value is in the breadth of its perspective and the discipline of multi-factor confirmation it encourages.
Hodrick-Prescott Structural CycleThis script is about solving one specific problem: Decomposition.
In any market, you have two things happening at once: the underlying "Trend" (the structural value) and the "Cycle" (the noise or volatility around that value). The Hodrick-Prescott (HP) filter is the standard econometric tool to separate them.
1. The Separation Logic (HP Filter)
Most moving averages lag. The HP filter attempts to find a smooth curve that represents the long-term path of the asset, minimizing the variance of the cycle.
In the code, the "stiffness" of this curve is controlled by Lambda ().
get_auto_lambda() =>
timeframe.isintraday ? 6250000 :
timeframe.isdaily ? 129600 :
1600
1600 is the standard used by economists for quarterly data. If the timeframe changes (daily or intraday), it automatically scales Lambda up to maintain that same "quarterly" smoothness on a faster chart.
2. The Mechanics (2-Pole Recursion)
The classic HP filter looks at future data, which is impossible for live trading. We uses a 2-Pole Super Smoother to approximate that curve using only past data.
hp_filter_2pole(src, period) =>
// ... coefficients calculated ...
var float filt = 0.0
filt := c1 * (src + nz(src )) / 2 + c2 * nz(filt ) + c3 * nz(filt )
See the filt and filt -> that's recursion. The filter references its own previous output. This creates memory, allowing the line to resist sudden spikes in price (noise) while slowly adapting to the true direction.
3. The Four Market Regimes
This script splits the market into four distinct quadrants based on where the Z-Score is and where it is going.
bool is_expansion = z_score > 0 and z_score > z_score
bool is_downturn = z_score > 0 and z_score < z_score
bool is_recovery = z_score < 0 and z_score > z_score
bool is_recession = z_score < 0 and z_score < z_score
1. Expansion (Green): We are above the trend, and momentum is accelerating.
2. Downturn (Orange): We are above the trend, but momentum is slowing (topping out).
3. Recession (Red): We are below the trend, and price is collapsing.
4. Recovery (Blue): We are below the trend, but price has stopped falling and is turning up.
The Background Zones: Statistical Extremes
This script monitors the Z-Score (the normalized cycle). When this score moves beyond 1.0 standard deviation from the mean (zero), the background lights up.
Red Background (Recession Zone): The Z-Score is < -1.0. Price is significantly below its structural trend. This is where fear is highest, and the asset is statistically "underwater."
Green Background (Overheating Zone): The Z-Score is > 1.0. Price is stretching far above the trend.
Why it matters: Markets rarely stay beyond 2.0 standard deviations for long. When you see the background colored, you are in an outlier event. (The rubber band is stretched)
Divergences: The "Check Engine" Light
It also scans for discrepancies between Price Action and the Cycle Momentum (Z-Score).
Bullish Divergence: Price makes a Lower Low, but the Cycle makes a Higher Low. The sellers are pushing price down, but with less conviction than before.
Bearish Divergence: Price makes a Higher High, but the Cycle makes a Lower High. Buyers are exhausted.
How to use this:
Do not treat a divergence tag as an entry signal.
A divergence is a state of discrepancy, not a timing trigger. It tells you that the prevailing trend is running out of steam.






















