ICT Asian & London Range + First Presented FVGIndicator: ICT Sessions + First Presented FVG
What it does: This tool automates the markup of key ICT (Inner Circle Trader) timeframes and entry signals. It allows you to trade on higher timeframes (like the 5m or 15m) while the script automatically "looks inside" the 1-minute chart to find specific setups for you.
Key Features:
Session Ranges (Asian & London)
Automatically highlights the Asian Session (8 PM - Midnight NY) and London Open (2 AM - 5 AM NY).
Draws a shaded box for the session's High and Low.
New: Extends the High and Low lines to 4:00 PM NY (end of the trading day) so you can use them as liquidity targets.
The "First Presented" FVG (Sniper Logic)
It detects the very first Fair Value Gap (FVG) that forms on the 1-minute chart immediately after a session starts.
It draws this 1-minute gap on your current chart, regardless of what timeframe you are viewing.
The FVG box automatically extends to the end of the trading day (4 PM NY), showing you where price might return to "mitigate" or react later in the day.
Ict
Range Deviations PRO | Trade SymmetryRange Deviations PRO — Extended Session Levels
An enhanced version of the original Range Deviations by @joshuuu, retaining the full core logic while adding a key upgrade:
🔹 All session ranges, midlines, and deviation levels now extend into the next trading session, giving seamless multi-session context.
Supports Asia, CBDR, Flout, ONS, and Custom Sessions — with options for half/full standard deviations, equilibrium, and range boxes exactly as in the original.
Extending these levels helps identify:
• Liquidity sweeps
• Trap moves / false breaks
• Daily high/low projections
• Premium–discount behavior across sessions
Ideal for traders using ICT concepts who want clearer continuation of session structure into the next day.
Credit: Original logic by @joshuuu — enhancements by TradeSymmetry.
Disclaimer: Educational use only. Not financial advice.
Obsidian Flux Matrix# Obsidian Flux Matrix | JackOfAllTrades
Made with my Senior Level AI Pine Script v6 coding bot for the community!
Narrative Overview
Obsidian Flux Matrix (OFM) is an open-source Pine Script v6 study that fuses social sentiment, higher timeframe trend bias, fair-value-gap detection, liquidity raids, VWAP gravitation, session profiling, and a diagnostic HUD. The layout keeps the obsidian palette so critical overlays stay readable without overwhelming a price chart.
Purpose & Scope
OFM focuses on actionable structure rather than marketing claims. It documents every driver that powers its confluence engine so reviewers understand what triggers each visual.
Core Analytical Pillars
1. Social Pulse Engine
Sentiment Webhook Feed: Accepts normalized scores (-1 to +1). Signals only arm when the EMA-smoothed value exceeds the `sentimentMin` input (0.35 by default).
Volume Confirmation: Requires local volume > 30-bar average × `volSpikeMult` (default 2.0) before sentiment flags.
EMA Cross Validation: Fast EMA 8 crossing above/below slow EMA 21 keeps momentum aligned with flow.
Momentum Alignment: Multi-timeframe momentum composite must agree (positive for longs, negative for shorts).
2. Peer Momentum Heatmap
Multi-Timeframe Blend: RSI + Stoch RSI fetched via request.security() on 1H/4H/1D by default.
Composite Scoring: Each timeframe votes +1/-1/0; totals are clamped between -3 and +3.
Intraday Readability: Configurable band thickness (1-5) so scalpers see context without losing space.
Dynamic Opacity: Stronger agreement boosts column opacity for quick bias checks.
3. Trend & Displacement Framework
Dual EMA Ribbon: Cyan/magenta ribbon highlights immediate posture.
HTF Bias: A higher-timeframe EMA (default 55 on 4H) sets macro direction.
Displacement Score: Body-to-ATR ratio (>1.4 default) detects impulses that seed FVGs or VWAP raids.
ATR Normalization: All thresholds float with volatility so the study adapts to assets and regimes.
4. Intelligent Fair Value Gap (FVG) System
Gap Detection: Three-candle logic (bullish: low > high ; bearish: high < low ) with ATR-sized minimums (0.15 × ATR default).
Overlap Prevention: Price-range checks stop redundant boxes.
Spacing Control: `fvgMinSpacing` (default 5) avoids stacking from the same impulse.
Storage Caps: Max three FVGs per side unless the user widens the limit.
Session Awareness: Kill zone filters keep taps focused on London/NY if desired.
Auto Cleanup: Boxes delete when price closes beyond their invalidation level.
5. VWAP Magnet + Liquidity Raid Engine
Session or Rolling VWAP: Toggle resets to match intraday or rolling preferences.
Equal High/Low Scanner: Looks back 20 bars by default for liquidity pools.
Displacement Filter: ATR multiplier ensures raids represent genuine liquidity sweeps.
Mean Reversion Focus: Signals fire when price displaces back toward VWAP following a raid.
6. Session Range Breakout System
Initial Balance Tracking: First N bars (15 default) define the session box.
Breakout Logic: Requires simultaneous liquidity spikes, nearby FVG activity, and supportive momentum.
Z-Score Volume Filter: >1.5σ by default to filter noisy moves.
7. Lifestyle Liquidity Scanner
Volume Z-Scores: 50-bar baseline highlights statistically significant spikes.
Smart Money Footprints: Bottom-of-chart squares color-code buy vs sell participation.
Panel Memory: HUD logs the last five raid timestamps, direction, and normalized size.
8. Risk Matrix & Diagnostic HUD
HUD Structure: Table in the top-right summarizes HTF bias, sentiment, momentum, range state, liquidity memory, and current risk references.
Signal Tags: Aggregates SPS, FVG, VWAP, Range, and Liquidity states into a compact string.
Risk Metrics: Swing-based stops (5-bar lookback) + ATR targets (1.5× default) keep risk transparent.
Signal Families & Alerts
Social Pulse (SPS): Volume-confirmed sentiment alignment; triangle markers with “SPS”.
Kill-Zone FVG: Session + HTF alignment + FVG tap; arrow markers plus SL/TP labels.
Local FVG: Captures local reversals when HTF bias has not flipped yet.
VWAP Raid: Equal-high/low raids that snap toward VWAP; “VWAP” label markers.
Range Breakout: Initial balance violations with liquidity and imbalance confirmation; circle markers.
Liquidity Spike: Z-score spikes ≥ threshold; square markers along the baseline.
Visual Design & Customization
Theme Palette: Primary background RGB (12,6,24). Accent shading RGB (26,10,48). Long accents RGB (88,174,255). Short accents RGB (219,109,255).
Stylized Candles: Optional overlay using theme colors.
Signal Toggles: Independently enable markers, heatmap, and diagnostics.
Label Spacing: Auto-spacing enforces ≥4-bar gaps to prevent text overlap.
Customization & Workflow Notes
Adjust ATR/FVG thresholds when volatility shifts.
Re-anchor sentiment to your webhook cadence; EMA smoothing (default 5) dampens noise.
Reposition the HUD by editing the `table.new` coordinates.
Use multiples of the chart timeframe for HTF requests to minimize load.
Session inputs accept exchange-local time; align them to your market.
Performance & Compliance
Pure Pine v6: Single-line statements, no `lookahead_on`.
Resource Safe: Arrays trimmed, boxes limited, `request.security` cached.
Repaint Awareness: Signals confirm on close; alerts mirror on-chart logic.
Runtime Safety: Arrays/loops guard against `na`.
Use Cases
Measure when social sentiment aligns with structure.
Plan ICT-style intraday rebalances around session-specific FVG taps.
Fade VWAP raids when displacement shows exhaustion.
Watch initial balance breaks backed by statistical volume.
Keep risk/target references anchored in ATR logic.
Signal Logic Snapshot
Social Pulse Long/Short: `sentimentEMA` gated by `sentimentMin`, `volSpike`, EMA 8/21 cross, and `momoComposite` sign agreement. Keeps hype tied to structural follow-through.
Kill-Zone FVG Long/Short: Requires session filter, HTF EMA bias alignment, and an active FVG tap (`bullFvgTap` / `bearFvgTap`). Labels include swing stops + ATR targets pulled from `swingLookback` and `liqTargetMultiple`.
Local FVG Long/Short: Uses `localBullish` / `localBearish` heuristics (EMA slope, displacement, sequential closes) to surface intraday reversals even when HTF bias has not flipped.
VWAP Raids: Detect equal-high/equal-low sweeps (`raidHigh`, `raidLow`) that revert toward `sessionVwap` or rolling VWAP when displacement exceeds `vwapAlertDisplace`.
Range Breakouts: Combine `rangeComplete`, breakout confirmation, liquidity spikes, and nearby FVG activity for statistically backed initial balance breaks.
Liquidity Spikes: Volume Z-score > `zScoreThreshold` logs direction, size, and timestamp for the HUD and optional review workflows.
Session Logic & VWAP Handling
Kill zone + NY session inputs use TradingView’s session strings; `f_inSession()` drives both visual shading and whether FVG taps are tradeable when `killZoneOnly` is true.
Session VWAP resets using cumulative price × volume sums that restart when the daily timestamp changes; rolling VWAP falls back to `ta.vwap(hlc3)` for instruments where daily resets are less relevant.
Initial balance box (`rangeBars` input) locks once complete, extends forward, and stays on chart to contextualize later liquidity raids or breakouts.
Parameter Reference
Trend: `emaFastLen`, `emaSlowLen`, `htfResolution`, `htfEmaLen`, `showEmaRibbon`, `showHtfBiasLine`.
Momentum: `tf1`, `tf2`, `tf3`, `rsiLen`, `stochLen`, `stochSmooth`, `heatmapHeight`.
Volume/Liquidity: `volLookback`, `volSpikeMult`, `zScoreLen`, `zScoreThreshold`, `equalLookback`.
VWAP & Sessions: `vwapMode`, `showVwapLine`, `vwapAlertDisplace`, `killSession`, `nySession`, `showSessionShade`, `rangeBars`.
FVG/Risk: `fvgMinTicks`, `fvgLookback`, `fvgMinSpacing`, `killZoneOnly`, `liqTargetMultiple`, `swingLookback`.
Visualization Toggles: `showSignalMarkers`, `showHeatmapBand`, `showInfoPanel`, `showStylizedCandles`.
Workflow Recipes
Kill-Zone Continuation: During the defined kill session, look for `killFvgLong` or `killFvgShort` arrows that line up with `sentimentValid` and positive `momoComposite`. Use the HUD’s risk readout to confirm SL/TP distances before entering.
VWAP Raid Fade: Outside kill zone, track `raidToVwapLong/Short`. Confirm the candle body exceeds the displacement multiplier, and price crosses back toward VWAP before considering reversions.
Range Break Monitor: After the initial balance locks, mark `rangeBreakLong/Short` circles only when the momentum band is >0 or <0 respectively and a fresh FVG box sits near price.
Liquidity Spike Review: When the HUD shows “Liquidity” timestamps, hover the plotted squares at chart bottom to see whether spikes were buy/sell oriented and if local FVGs formed immediately after.
Metadata
Author: officialjackofalltrades
Platform: TradingView (Pine Script v6)
Category: Sentiment + Liquidity Intelligence
Hope you Enjoy!
5min ORB - HenryJ5min ORB, for ICT trading
Strategy Implementation: The main goal is to identify and visually mark the trading range established during the first 5 minutes of the regular trading session.
Time Definition: It measures the Highest High and Lowest Low recorded from the session open (minute 0) up to the close of the 5th minute.
Visual Marking: It draws two distinct horizontal line segments on the chart:
One line marks the High of the 5-minute Opening Range.
One line marks the Low of the 5-minute Opening Range.
Drawing Window: The lines are intentionally drawn starting from the 6th minute (after the range is fully established) and extend up to the 60th minute of the trading session. This ensures the lines are available to guide trades for the first hour after the opening volatility subsides.
Labeling: It includes a "5min ORB" text label placed near the high line, clearly identifying the range.
BY Henry J
Position Size Calculator + Live R/R Panel — SMC/ICT (@PueblaATH)Position Size + Live R/R Panel — SMC/ICT (@PueblaATH)
Position Size + Live R/R Panel — SMC/ICT (@PueblaATH) is a professional-grade risk management and execution module built for Smart Money Concepts (SMC) and ICT Traders who require accurate, repeatable, institution-style trade planning.
This tool delivers precise position sizing, R:R modeling, leverage and margin projections, fee-adjusted PnL outcomes, and real-time execution metrics—all directly on the chart. Optimized for crypto, forex, and futures, it provides scalpers, day traders, and swing traders with the clarity needed to execute high-quality trades with confidence and consistency.
What the Indicator Does
Institutional Position Sizing Engine
Calculates position size based on account balance, % risk, and SL distance.
Supports custom minimum lot size rounding across crypto, FX, indices, and derivatives.
Intelligent direction logic (Auto / Long / Short) based on SMC/ICT structure.
Advanced Risk/Reward & Profit Modeling
Real-time R:R ratio using actual rounded position size.
Live PnL readout that updates with price movements.
Gross & net profit projections with full fee deduction.
Execution Planning with Draggable Levels
Entry, SL, and TP levels fully draggable for fast scenario modeling.
Automatic projected lines backward/forward with clean label alignment.
TP and SL tags include % movement from Entry, ideal for SMC/ICT journaling.
Precise modeling of real exchange fee structures
Maker fee per side
Taker fee per side
Mixed fee modes (Maker entry, Taker exit, Average, etc.)
Leverage & Margin Forecasting
Margin requirements displayed for 3 customizable leverage settings.
Helps traders understand capital commitment before executing the trade.
Useful for futures, crypto perps, and CFD setups.
Clean HUD Panel for Rapid Decision-Making
A full professional trading panel displays:
Target & actual risk
Position size
Entry / SL / TP
TP/SL percentage distance
Gross profit
Net profit (after fees)
Fees @ TP and @ SL
Live PnL
Margin requirements
Optimized for SMC & ICT Workflows
Perfect for traders using:
Breakers, FVGs, OBs
Liquidity sweeps
Session models
Precision entries (OTE, Displacement, Rebalancing)
Leverage-based execution (crypto perps, futures)
How to Use It
Attach the indicator to your chart.
Set account balance, risk %, fee model, and leverage presets.
Drag Entry, SL, and TP to shape the setup.
View instant calculations of: Position size; R:R; Net PnL after fees; Margin required
Use it as your pre-trade checklist & execution model.
Originality & Credits
This script is an original creation by @PueblaATH, released under the MPL 2.0 license.
It does not copy, modify, or repackage any existing TradingView code.
All logic—including the fee engine, margin calculator, responsive HUD, dynamic risk model, and visual execution system—is authored specifically for this indicator.
NYMO Fib Levels - RGNYMO is a single-session tool built around Fibonacci projections from the New York morning move. It automatically marks the NYMO session, measures its high–low range and projects your custom fib multiples above and below price, with every level drawn and labelled so you always know exactly which multiple you are trading around.
The core of the script is the 12:00–12:30 opening window. That first 30 minutes is treated as the price-discovery phase of the session: it captures the initial burst of liquidity, the repricing of overnight positions and the first real directional push. The high and low of 12:00–12:30 form the opening range, and all fib projections are anchored to that move, turning the very first half-hour into a structured map for the rest of the session.
On top of the fib framework, NYMO can show the NYMO session box, compare the current range to recent NYMO statistics, and trigger alerts when price breaks the NYMO high or low or trades through key fib areas. It is built for traders who only care about the New York morning and want all of their structure, targets and alerts driven by fibs from that one defined opening window.
Volumetric Inverse Fair Value Gap (IFVG) [Kodexius]The Volumetric Inverse Fair Value Gap (IFVG) indicator detects and visualizes inverse fair value gaps (IFVGs) zones where previous inefficiencies in price (fair value gaps) are later invalidated or “inverted.”
Unlike traditional FVG indicators, this tool integrates volume-based analysis to quantify the bullish, bearish, and overall strength of each inversion. It visually represents these metrics within a dynamically updating box on the chart, giving traders deeper insight into market reactions when liquidity imbalances are filled and reversed.
Features
Inverse fair value gap detection
The script identifies bullish and bearish fair value gaps, stores them as pending zones, and turns them into inverse fair value gaps when price trades back through the gap in the opposite direction. Each valid inversion becomes an active IFVG zone on the chart.
Sensitivity control with ATR filter and strict mode
A minimum gap size based on ATR is used to filter out small and noisy gaps. Strict mode can be enabled so that any wick contact between the relevant candles prevents the gap from being accepted as a fair value gap. This lets you decide how clean and selective the zones should be.
Show Last N Boxes control
The indicator can keep only the most recent N IFVG zones visible. Older zones are removed from the chart once the number of active objects exceeds the user setting. This prevents clutter on higher timeframes or long histories and keeps attention on the most relevant recent zones.
Ghost box for the original gap
When the ghost option is enabled, the script draws a faint box that marks the original fair value gap from which the inverse zone came. This makes it easy to see where the initial imbalance appeared and how price later inverted that area.
Volumetric bull, bear and strength metrics
For each IFVG, the script estimates how much of the bar volume is associated with buying and how much with selling, then computes bull percentage, bear percentage and a strength score that uses a percentile rank of volume. These values are stored with the IFVG object and drive the visualization inside the zone.
Three band visual layout inside each IFVG
Each active IFVG is drawn as a container with three horizontal sections. The top band represents the bull percentage, the middle band the bear percentage and the bottom band the strength metric. The width of each bar reflects its respective value so you can read the structure of the zone at a glance.
Customizable colors and label text
Colors for bull, bear, strength, the empty background area, the ghost box and label text can be adjusted in the inputs. This allows you to match the indicator to different chart themes or highlight specific aspects such as strength or direction.
Automatic invalidation and cleanup
When price clearly closes beyond the IFVG in a way that breaks the logic of that zone, the script marks it as inactive and deletes all boxes and labels linked to it. Only valid and active IFVGs remain on the chart, which keeps the display clean and focused.
Calculations
1. Detecting Fair Value Gaps (FVGs)
A fair value gap is identified when price action leaves an imbalance between candle wicks. Depending on the mode:
Bullish FVG: When low > high
Bearish FVG: When high < low
Optionally, the strict mode ensures wicks do not touch.
The gap’s significance is filtered using the ATR multiplier input to exclude minor noise.
Once detected, FVGs are stored as pending zones until inverted by opposite movement (price crossing through).
bool bull_cond = strict_mode ? (low > high ) : (close > high )
bool bear_cond = strict_mode ? (high < low ) : (close < low )
float gap_size = 0.0
if bull_cond and close > open
gap_size := low - high
if bear_cond and close < open
gap_size := low - high
2. Creating IFVGs (Inversions)
When price later moves through a previous FVG in the opposite direction, an Inverse FVG (IFVG) is created.
For example:
A previous bearish FVG becomes bullish IFVG if price moves upward through it.
A previous bullish FVG becomes bearish IFVG if price moves downward through it.
The IFVG is initialized with structural boundaries (top, bottom) and timestamp metadata to anchor visualization.
if not p.is_bull_gap and close > p.top
inverted := true
to_bull := true
if p.is_bull_gap and close < p.btm
inverted := true
to_bull := false
3. Volume Metrics (Bull, Bear, Strength)
Each IFVG calculates buy and sell volumes from the current bar’s price spread and total volume.
Bull % = proportion of upward (buy) volume
Bear % = proportion of downward (sell) volume
Strength % = normalized percentile rank of total volume
These are obtained through a custom function that estimates directional volume contribution:
calc_metrics(float o, float h, float l, float c, float v) =>
float rng = h - l
float buy_v = 0.0
if rng == 0
buy_v := v * 0.5
else
if c >= o
buy_v := v * ((math.abs(c - o) + (math.min(o, c) - l)) / rng)
else
buy_v := v * ((h - math.max(o, c)) / rng)
float sell_v = v - buy_v
float total = buy_v + sell_v
float p_bull = total > 0 ? buy_v / total : 0
float p_bear = total > 0 ? sell_v / total : 0
float p_str = ta.percentrank(v, 100) / 100.0
DWM HLOC, Mid & WicksSimple, yet effective.
1. Automatically calculate and projects key price levels from a previous period (Yesterday, OR Last Week / Month) onto the current trading session. It acts as an immediate Support & Resistance map based on historical price action.
2. Multi-Timeframe Logic
Modes --
Daily Mode: Projects yesterday's data onto today.
Weekly Mode: Projects last week's data onto the current week.
3. Key Levels Visualized The script calculates seven distinct price levels:
OHLC: Previous Open, High, Low, and Close.
Equilibrium (Mid): The exact 50% mark between the previous High and Low.
Wick Midpoints (New):
Upper Wick 50%: The midpoint between the High and the top of the body.
Lower Wick 50%: The midpoint between the Low and the bottom of the body.
4. Smart "Gap" Visualization The script uses unique starting points to help traders visualize market gaps:
Standard Levels (High, Low, Open, Mids): These lines originate from the Previous Period's Open, showing the full context of the level relative to time.
Close Level: This line originates from the Current Period's Open. This visually highlights the "Gap" (the jump in price between where the market closed previously and where it opened today).
5. Full Customization
Aesthetics: Every line can be individually toggled on/off.
Styling: Users can independently change the color, line style (Solid, Dotted, Dashed), and thickness for every specific level.
AssetCorrelationLibraryLibrary "AssetCorrelationLibrary™"
detectIndicesFutures(ticker)
Detects Index Futures (NQ/ES/YM/RTY + micro variants)
Parameters:
ticker (string) : The ticker string to check (typically syminfo.ticker)
Returns: AssetPairing with secondary and tertiary assets configured
detectMetalsFutures(ticker)
Detects Metal Futures (GC/SI/HG + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectForexFutures(ticker)
Detects Forex Futures (6E/6B + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectEnergyFutures(ticker)
Detects Energy Futures (CL/RB/HO + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectTreasuryFutures(ticker)
Detects Treasury Futures (ZB/ZF/ZN)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectForexCFD(ticker, tickerId)
Detects Forex CFD pairs (EUR/GBP/DXY, USD/JPY/CHF triads)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID (syminfo.tickerid) for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectCrypto(ticker, tickerId)
Detects major Crypto assets (BTC, ETH, SOL, XRP, alts)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectMetalsCFD(ticker, tickerId)
Detects Metals CFD (XAU/XAG/Copper)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectIndicesCFD(ticker, tickerId)
Detects Indices CFD (NAS100/SP500/DJ30)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectEUStocks(ticker, tickerId)
Detects EU Stock Indices (GER40/EU50) - Dyad only
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary asset configured (tertiary empty for dyad)
getDefaultFallback(tickerId)
Returns default fallback assets (chart ticker only, no correlation)
Parameters:
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with chart ticker as primary, empty secondary/tertiary (no correlation)
applySessionModifierWithBackadjust(tickerStr, sessionType)
Applies futures session modifier to ticker WITH back adjustment
Parameters:
tickerStr (string) : The ticker to modify
sessionType (string) : The session type (syminfo.session)
Returns: Modified ticker string with session and backadjustment.on applied
applySessionModifierNoBackadjust(tickerStr, sessionType)
Applies futures session modifier to ticker WITHOUT back adjustment
Parameters:
tickerStr (string) : The ticker to modify
sessionType (string) : The session type (syminfo.session)
Returns: Modified ticker string with session and backadjustment.off applied
isTriadMode(pairing)
Checks if a pairing represents a valid triad (3 assets)
Parameters:
pairing (AssetPairing) : The AssetPairing to check
Returns: True if tertiary is non-empty (triad mode), false for dyad
getAssetTicker(tickerId)
Extracts clean ticker string from full ticker ID
Parameters:
tickerId (string) : The full ticker ID (e.g., "BITGET:BTCUSDT.P")
Returns: Clean ticker string (e.g., "BTCUSDT.P")
resolveTriad(chartTickerId, pairing)
Resolves triad asset assignments with proper inversion flags
Parameters:
chartTickerId (string) : The current chart's ticker ID (syminfo.tickerid)
pairing (AssetPairing) : The detected AssetPairing
Returns: Tuple
resolveDyad(chartTickerId, pairing)
Resolves dyad asset assignment with proper inversion flag
Parameters:
chartTickerId (string) : The current chart's ticker ID
pairing (AssetPairing) : The detected AssetPairing (dyad: tertiary is empty)
Returns: Tuple
resolveAssets(ticker, tickerId, assetType, sessionType, useBackadjust)
Main auto-detection entry point. Detects asset category and returns fully resolved config.
Parameters:
ticker (string) : The ticker string to check (typically syminfo.ticker)
tickerId (string) : The full ticker ID (typically syminfo.tickerid)
assetType (string) : The asset type (typically syminfo.type)
sessionType (string) : The session type for futures (typically syminfo.session)
useBackadjust (bool) : Whether to apply back adjustment for futures session alignment
Returns: AssetConfig with fully resolved assets, inversion flags, and detection status
resolveCurrentChart()
Simplified auto-detection using current chart's syminfo values
Returns: AssetConfig with fully resolved assets, inversion flags, and detection status
AssetPairing
Core asset pairing structure for triad/dyad configurations
Fields:
primary (series string) : The primary (chart) asset ticker ID
secondary (series string) : The secondary correlated asset ticker ID
tertiary (series string) : The tertiary correlated asset ticker ID (empty for dyad)
invertSecondary (series bool) : Whether secondary asset should be inverted for divergence calc
invertTertiary (series bool) : Whether tertiary asset should be inverted for divergence calc
AssetConfig
Full asset resolution result with mode detection and computed values
Fields:
detected (series bool) : Whether auto-detection succeeded
isTriadMode (series bool) : True if triad (3 assets), false if dyad (2 assets)
primary (series string) : The resolved primary asset ticker ID
secondary (series string) : The resolved secondary asset ticker ID
tertiary (series string) : The resolved tertiary asset ticker ID (empty for dyad)
invertSecondary (series bool) : Computed inversion flag for secondary asset
invertTertiary (series bool) : Computed inversion flag for tertiary asset
assetCategory (series string) : String describing the detected asset category
Note to potential users.
I did not really intend to make this public but i have to in order to avoid any potential compliance issues with the TradingView Moderation Team and the House Rules.
However if you are to use this library, you cannot make your code closed source / invite only as it is intellectual property. The only exception to this is if I am credited in the header of your code and i explicitly give permission to do so.
As per the TradingView house rules, you are completely FREE to do with this as you like, provided the script stays private.
Use the @fstarcapital tag to give credits
❤️ from cephxs
Smart Money Setup 08 [TradingFinder] Binary Options Gold Scalper🔵 Introduction
In the Smart Money methodology, the market is understood as a structure driven by liquidity flow. This structure forms through the movement of large orders, the accumulation of liquidity, and the reactions that occur around key price zones. The logic of Smart Money is based on the idea that price movement is not random and usually evolves with the intention of collecting liquidity and creating price inefficiencies known as imbalances.
Within this framework, several important stages including the liquidity sweep, the formation of a point of interest, the appearance of an imbalance and the transition of market structure play major roles and collectively define the broader direction of price.
In many bullish scenarios, the market begins by sweeping sell side liquidity and targeting important lows in order to collect the liquidity resting below them. This liquidity collection often becomes the starting point for creating a point of interest which usually marks the area where Smart Money begins to enter the market.
After price moves away from this point, it breaks a structural high and forms a change of character. This shift marks a transition in the balance of power between buyers and sellers and is considered the first clear signal that the market structure is changing.
After the change of character, new institutional order flow often creates a strong and rapid movement that leaves behind an imbalance. This imbalance is one of the most important elements in Smart Money analysis because price tends to return to this area in order to complete structure and restore balance.
The return into the imbalance becomes meaningful when it occurs together with the liquidity sweep, the presence of a validated point of interest and a confirmed structural transition. These conditions frequently mark the beginning of powerful movements within the Smart Money cycle.
Understanding the sequence of liquidity, point of interest, imbalance, change of character and market structure builds the foundation of Smart Money analysis and provides a clear view of the true direction of institutional strength.
Bullish Setup :
Bearish Setup :
🔵 How to Use
To use this framework effectively, the trader must analyze the market through the principles of Smart Money and observe how liquidity drives price. A trade becomes valid only when several essential components appear together in a clear and consistent order.
These components include the liquidity sweep, the formation of a point of interest, the confirmation of a change of character, the transition of market structure and the return of price into an imbalance. The method is built on the understanding that the market first collects liquidity, then shifts order flow and finally provides an entry opportunity inside an inefficient area or inside a point of interest.
For this reason, the trader must follow the path of liquidity from the moment the sweep occurs, through the point of interest and the change of character and finally into the return of price toward the imbalance. When applied correctly, this approach creates entries that are more precise, more structural and more aligned with the real behavior of the market rather than with superficial signals.
🟣 Long Position
A bullish setup in Smart Money structure begins with a liquidity sweep on the sell side. The market first targets the areas where sell side liquidity is located and collects the stops and resting liquidity under previous lows. This collection is the condition that Smart Money requires to begin creating a new order flow. After this liquidity has been taken, a point of interest forms which is usually the last bearish candle or the effective demand zone that initiated the upward movement.
Price then moves away from the point of interest and breaks a structural high which creates a change of character. This event confirms that the market structure has moved from a bearish state to a bullish one and that buying pressure has taken control of the order flow. Following this shift, a strong upward movement often occurs and creates an imbalance between candles. This imbalance reflects the entrance of strong Smart Money orders and is seen as an important confirmation of bullish strength.
When price returns to this imbalance after the displacement, the market enters a phase where Smart Money aims to complete the corrective movement and continue the upward direction. The reaction inside the imbalance when combined with the liquidity sweep, the confirmed point of interest and the change of character completes the bullish setup and forms a structure that often leads to a continuation of the bullish trend.
🟣 Short Position
A bearish setup follows the same Smart Money logic but in the opposite direction. The market begins by collecting buy side liquidity and targets the highs where buy side liquidity and resting stops are located. This liquidity sweep on the buy side becomes the starting phase for Smart Money to initiate a downward order flow. After the liquidity is collected, a bearish point of interest forms which is usually the last bullish candle or the supply zone that created the initial drop.
Price then moves away from this point and breaks the first structural low. This creates a change of character to the downside which confirms that the market structure has transitioned from bullish to bearish and that selling pressure has gained control. After this shift, a strong downward displacement appears and leaves behind a bearish imbalance that clearly shows the dominance of sellers.
As price returns to this imbalance and corrects the inefficient movement, the bearish setup becomes complete as long as the market structure remains bearish. The combination of the buy side liquidity sweep, the bearish point of interest, the change of character, the imbalance and the corrective return creates the ideal structure that Smart Money uses to continue the downward movement and develop a reliable selling opportunity.
🔵 Settings
🟣 Logic Settings
Pivot Period : Defines how many bars are analyzed to identify swing highs and lows. Higher values detect larger, slower structures, while lower values respond to faster patterns. The default value of 5 offers a balanced sensitivity.
🟣 Alert Settings
Alert : Enables alerts for SMS08.
Message Frequency : Determines the frequency of alerts. Options include 'All' (every function call), 'Once Per Bar' (first call within the bar), and 'Once Per Bar Close' (final script execution of the real-time bar). Default is 'Once per Bar'.
Show Alert Time by Time Zone : Configures the time zone for alert messages. Default is 'UTC'.
🔵 Conclusion
The Smart Money approach demonstrates that price movement is not random or based on surface level patterns. Instead, it develops through a clear cycle of liquidity collection, structural transition and corrective movement toward key price zones. By recognizing events such as the liquidity sweep, the formation of the point of interest, the change of character and the return into the imbalance, the trader gains the ability to understand order flow more accurately and identify the true direction of market structure.
Both bullish and bearish setups show that the alignment of these elements creates a transparent view of institutional behavior and reveals the source of strong movements in the market. When the trader correctly identifies this sequence, entry points become more reliable and more aligned with liquidity flow. The combination of liquidity, structure and imbalance provides a consistent framework that removes guesswork and guides decisions through the real logic of the market.
Smart Money Concepts [Modern Neon V2]This is a visually overhauled version of the popular Smart Money Concepts (SMC) indicator, designed specifically for traders who prefer Dark Mode, High Contrast, and Maximum Visibility.
While the underlying logic preserves the robust structure detection of the original LuxAlgo script, the visual presentation has been completely modernized. The default "dull" colors have been replaced with a vibrant Cyberpunk Neon palette, and text labels have been significantly upscaled to ensure market structure is readable at a glance, even on high-resolution monitors.
🎨 Visual & Style Enhancements:
Neon Palette:
Bullish: Electric Cyan (#00F5FF)
Bearish: Neon Hot Pink (#FF007F)
Neutral/Levels: Bright Gold (#FFD700)
High Visibility Text: Market Structure labels (BOS, CHoCH, HH/LL) have been upgraded from "Tiny" to Normal size. Key Swing Points (Strong High/Low) are set to Large.
Modern "Solid" Blocks: Order Blocks and FVGs feature reduced transparency (60%) for a bolder, solid look that doesn't get washed out on dark backgrounds.
Decluttered: Removed unnecessary "Small" elements and dotted lines to focus on price action.
🛠 Key Features:
Real-Time Structure: Automatic detection of Internal and Swing structure (BOS & CHoCH) with trend coloring.
Order Blocks: Highlights Bullish and Bearish Order Blocks with new mitigation logic.
Fair Value Gaps (FVG): Auto-threshold detection for high-probability gaps.
Premium & Discount Zones: Automatically plots equilibrium zones for better entry targeting.
Multi-Timeframe Levels: Display Daily, Weekly, and Monthly highs/lows.
Trend Dashboard: (If you added the dashboard code) A clean panel displaying the current Internal and Swing trend bias.
CREDITS & LICENSE: This script is a modification of the "Smart Money Concepts " indicator.
Original Author: © LuxAlgo
License: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
creativecommons.org
Trendshift [CHE]Trendshift — First-Shift Regime Turns with Premium/Discount Context
Summary
Trendshift highlights the first confirmed directional structure shift in price and overlays a premium or discount context based on the most recent structural range. It identifies the major swing levels, detects a regime transition when price closes beyond these levels with optional ATR-based conviction, and marks only the first shift per direction to reduce repetition and noise. The indicator then establishes a premium or discount band around the break and tints the background when price operates in either region. This produces a clean regime-aware view that emphasizes only the earliest actionable turn while maintaining contextual bias information.
Motivation: Why this design?
Conventional swing-based structure tools often fire repeated signals after each minor break, especially in volatile environments. This leads to cluttered charts and little informational value. Trendshift focuses on the core trading need: isolating the first confirmed change in directional structure and providing a premium or discount context after the break. By limiting signals to the initial flip and suppressing further markers until direction reverses again, the script reduces noise and highlights only the structural event that materially matters. The band logic further addresses the challenge of distinguishing contextual extremes and avoiding trades taken too late after a shift.
What’s different vs. standard approaches?
Baseline reference: Most structure indicators repeatedly plot every new break of a swing high or swing low.
Differences:
Only the first confirmed bullish or bearish shift is plotted until the opposite direction occurs.
ATR-filtered breakout validation to reduce false breaks during volatility spikes.
A reduced premium and discount band derived from the breakout candle and prior swing structure.
Tinted background for contextual positioning rather than explicit entry signals.
Practical effect:
Fewer but more meaningful shift markers.
Clear visual context of where price operates relative to the structural band.
Cleaner regime transitions and less chart clutter.
How it works (technical)
The indicator continuously evaluates major swing highs and lows using a symmetric window length. When a swing is confirmed, the script stores its price and bar index. A structure shift occurs when price closes beyond the most recent major swing in the opposite direction. Optional ATR filtering requires the breakout distance to exceed an ATR-scaled threshold.
Upon a confirmed shift, the script sets a regime state that remains active until a new shift or an optional timeout. It also establishes a structural band anchored between the breakout candle extremum and the prior opposite swing. The band informs the premium and discount boundaries, each representing a quarter subdivision.
Only the first shift event per direction generates a visual triangle marker. The band is validated by comparing its height to ATR to avoid extremely narrow structures. Background tinting activates whenever price resides within the premium or discount zones. Persistent variables maintain previous structural states and prevent re-triggering until direction reverses.
Parameter Guide
Swing length (default 5): Controls the number of bars used on each side of a swing. Smaller values are more reactive; larger values reduce noise.
Use ATR filter (default true): Requires breakout strength beyond the swing to exceed an ATR-scaled threshold. Disabling increases signal frequency.
ATR length (default 14): Controls volatility estimation for breakout filtering and band validation.
Break ATR multiplier (default 1.0): Higher values require stronger breakouts, reducing false shifts.
Enable framework (default true): Activates the premium and discount context logic.
Persist band on timeout (default true): Retains the current band after a regime timeout.
Min band size ATR mult (default 0.5): Rejects extremely small bands and prevents unrealistic tinting.
Regime timeout bars (default 500): Resets the regime after extended inactivity.
Invert colors (default false): Swaps premium and discount tint color assignments.
Show zone tint (default true): Toggles background shading.
Show shift markers (default true): Enables or disables the first-shift triangles.
Reading & Interpretation
A green or red tint signals that price is operating in the discount or premium region of the most recent structural band. These regions are derived from the breakout event and the prior swing. A green triangle below a bar indicates the first bullish structure shift after a bearish regime. A red triangle above a bar indicates the first bearish shift after a bullish regime. No further markers appear until direction reverses. When tint is active, price location within the band offers simple contextual bias without providing explicit entries.
Practical Workflows & Combinations
Trend following: Treat the first bullish marker as the earliest confirmation of a potential up-regime and the first bearish marker for a potential down-regime. Use price location relative to the premium and discount zones as context for continuation or mean-reversion setups.
Structure-based execution: Combine with simple swing highs and lows to refine entry points within discount after a bullish shift or within premium after a bearish shift.
Higher-timeframe overlays: Apply the indicator on higher timeframes to define macro structure, then trade on lower timeframes using the band as a contextual anchor.
Risk management: When price stays in premium during a bearish regime or in discount during a bullish regime, consider protective actions or position management adjustments.
Behavior, Constraints & Performance
The script uses only confirmed swing points and closed-bar conditions, so repainting from future bars does not occur except the inherent delay of pivot confirmation. No higher-timeframe security calls are used, avoiding HTF repaint paths.
Performance impact is minimal because the script uses no loops or arrays and relies on persistent variables. The maximum bars back setting is five-thousand, required for swing lookback. Known limitations include quiet behavior during long consolidations, occasional delayed recognition of shifts due to swing confirmation, and limited effectiveness during large market gaps where extremum logic may be distorted.
Sensible Defaults & Quick Tunin g
Increase the swing length for smoother trend shifts and fewer signals.
Decrease the swing length for more sensitivity.
Raise the ATR breakout multiplier to reduce noise in volatile markets.
Lower the band size requirement to make premium and discount zones more active on slower markets.
Extend the regime timeout for slow-moving assets.
What this indicator is—and isn’t
This tool is a structural regime-shift detector with contextual premium and discount shading. It is not a complete trading system and does not include entries, exits, or risk models. It does not predict future price movement. It should be combined with broader structure analysis, liquidity considerations, and risk management practices.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
ICT Fair Value Gap (FVG) Detector │ Auto-Mitigated │ 2025Accurate ICT / Smart Money Concepts Fair Value Gap (FVG) detector
Features:
• Detects both Bullish (-FVG) and Bearish (+FVG) using strict 3-candle rule
• Boxes automatically extend right until price mitigates them
• Boxes auto-delete when price closes inside the gap (true mitigation)
• No repainting – 100% reliable
• Clean, lightweight, and works on all markets & timeframes
• Fully customizable colors and transparency
How to use:
– Bullish FVG (green) = potential support / buy zone in uptrend
– Bearish FVG (red) = potential resistance / sell zone in downtrend
Exactly matches The Inner Circle Trader (ICT) methodology used by thousands of SMC traders in 2024–2025.
Enjoy and trade safe!
BOS and CHoCHThe market never moves in a straight line. It moves in waves.
It makes a High, comes down a bit (Low), then breaks the previous High to make a new High.
Similarly, It makes a Low, goes up a bit (High), then breaks the previous Low to make a new Low.
BOS (Break Of Structure) - Trend Continuation
BOS means the market is continuing its current trend. If the market is in an Uptrend and breaks the old "High" -> Bullish BOS. If the market is in a Downtrend and breaks the old "Low" -> Bearish BOS.
3. CHOCH (Change Of Character) - Trend Reversal
CHOCH means the mood of the market has changed. For the first time, the trend has shifted its nature.
Bullish to Bearish CHOCH: The market was making Higher Highs, but suddenly it broke its previous "Low". Now the market can fall.
Bearish to Bullish CHOCH: The market was falling (Lower Lows), but suddenly it broke its previous "High". Now the market can rise.
BOS: Confirms the trend (Breaking the ceiling to go higher).
CHOCH: Signals a trend change (Slipping and falling below the previous floor).
Smart Money COTThis indicator implements the method of analysing COT data as defined by Michael Huddleston (I.E. The Inner Circle Trader). It removes all superfluous information contained in the standard COT reports and focusses only on Commercial speculators using the overall Long-Short positions.
Features
The unique feature of this indicator is its ability to look back over time and provide the following information:
Calculation of the range high and low of the specified lookback range.
Calculation of equilibrium of that range.
Automatic colour coding of net long and net short positions when the Long-Short COT calculation is above or below equilibrium of the lookback range.
Instructions
Use the Daily Timeframe only. You may get unexpected results on other timeframes.
Ensure the asset has COT data available. Script is mainly focused on commodity futures, such as ES, NQ, YM. It has not been tested against Forex.
You will need to define the "Lookback" setting in the script settings. Use the total number of trading days required for your analysis. E.g. if you want a 6 month COT analysis, use the measurement tool to count the quantity of daily candles between now and 6 months ago - use this as your Lookback setting. Adjust as needed for other lookback periods, e.g. 3 months, 12 months etc.
Other Info
The script provides the ability to customise colours in its settings.
Range High and Range Low plots can be disabled in settings.
(CRT) MTF Candle Range Theory Model# 🚀 **CASH Pro MTF – Candle Range Theory (CRT) Indicator**
**The Smart Money ICT Setup Detector** 🔥
Hey Traders!
Here is the **ultimate Pine Script indicator** that automatically detects one of the most powerful Smart Money / ICT setups: **Candle Range Theory (CRT)**
---
### What is Candle Range Theory – CRT?
**CRT** is a high-probability price action model based on **liquidity grabs** and **range expansion**.
Price loves to:
1️⃣ Raid the low/high of the previous candle (take stop-losses)
2️⃣ Then reverse and run to the opposite side of the range (or beyond)
When this happens near a **key higher-timeframe level**, magic happens!
### Bullish CRT Model
- Price touches a **strong HTF support**
- Previous candle closes near that support
- Next candle **sweeps the low** (grabs liquidity)
- Current candle **closes above the raided low AND breaks the high** of the sweep candle
**Result → Aggressive bullish move expected!**
**Entry:** On close above the high (or on retest + MSS)
**Stop Loss:** Below the swept low
**Take Profit:** CRT High or next liquidity pool
### Bearish CRT Model
- Price touches a **strong HTF resistance**
- Previous candle closes near resistance
- Next candle **sweeps the high** (grabs buy stops)
- Current candle **closes below the raided high AND breaks the low** of the sweep candle
**Result → Strong bearish expansion!**
**Entry:** On close below the low
**Stop Loss:** Above the swept high
**Take Profit:** CRT Low or next downside liquidity
This whole setup can form in **just 3 candles**… or sometimes more if price consolidates after the sweep.
---
### Why This Indicator is Special
This is **NOT** a simple 3-candle pattern scanner!
This is a **true CRT + MTF confluence beast** with:
- **Multi-Timeframe Confirmation** (default 4H – fully customizable)
- **Built-in RSI Filter** (avoid fake moves in overbought/oversold)
- **Day-2 High/Low Levels** automatically drawn (the exact CRT range!)
- **Clean “LONG” / “SHORT” labels** right on the candle (no ugly arrows or offset)
- **Background highlight** on signal
- **Fully grouped inputs** – super clean settings panel
---
### Features at a Glance
| Feature | Included |
|--------------------------------|----------|
| Higher Timeframe Confirmation | Yes |
| RSI Overbought/Oversold Filter | Yes |
| Day-2 High/Low Lines + Labels | Yes |
| Clean Text Signals (no offset) | Yes |
| Background Highlight | Yes |
| Fully Customizable Colors & Text| Yes |
| Works on All Markets & TFs | Yes |
---
### How to Use
1. Add the indicator to your chart
2. Wait for a **LONG** or **SHORT** label to appear
3. Confirm price is near a **key HTF level** (order block, FVG, etc.)
4. Enter on close or retest (your choice)
5. Manage risk with the drawn Day-2 levels
**Pro Tip:** Combine with ICT Market Structure Shift (MSS) or Fair Value Gaps for even higher accuracy!
Đại Ka 3 ATR BandsĐại Ka 3 ATR Bands – The ultimate single-slot indicator that replaces three separate ATR plots.
Designed specifically for ICT/SMC traders in 2025:
• Light red band (±0.5 ATR) → fake moves, Judas Swing, Turtle Soup zone
• Gray band (±1.0 ATR) → normal price action
• Light green band (±2.0 ATR) → real displacement zone → Silver Bullet, SFT, high-probability entries
How to use:
– Price stuck inside red band → expect reversal/fakeout
– Price breaks and closes outside green band + volume spike → enter aggressively in that direction (85%+ win-rate inside Killzones)
Default ATR(14), subtle fills for instant visual filtering of real vs fake moves.
Perfect companion for Order Blocks, FVG, Breaker Blocks and NY/London Killzones.
Free forever – coded with love by Đại Ka & Vietnamese ICT crew.
Change in State of Delivery CISD [AlgoAlpha]🟠 OVERVIEW
This script tracks how price “changes delivery” after failed attempts to push in one direction. It builds swing levels from pivots, watches for those levels to be wicked, and then checks if price delivers cleanly in the opposite direction. When the pattern meets the script’s tolerance rules, it marks a Change in State of Delivery (CISD). These CISD levels are drawn as origin lines and are used to spot shifts in intent, failed pushes, and continuation attempts. A CISD becomes stronger when it forms after opposing liquidity is swept within a defined lookback.
🟠 CONCEPTS
The script first defines structure using swing highs/lows. These levels act as potential liquidity points. When price wicks through a swing, the script registers a mitigation event. After this, it looks for a reversal-style candle sequence: a failed push, followed by a counter-move strong enough to pass a tolerance ratio. This ratio compares how far price expanded away from the failed attempt versus the counter-move that followed. If the ratio is high enough, this becomes a CISD. The idea is simple: liquidity interaction sets context , and the tolerance logic identifies actual intent . CISD levels and sweep markers combine these two ideas into a clean map of where delivery flipped.
🟠 FEATURES
Liquidity tracking: marks swing highs/lows and updates them until expiry
Liquidity sweep confirmation when CISD aligns with recent mitigations
Alert conditions for all key events: mitigations, CISDs, and strong CISDs
🟠 USAGE
Setup : Add the script to your chart. Use it on any timeframe where swing behavior matters. Set the Swing Period for how wide a pivot must be. Set Noise Filter to control how strict the CISD detection is. Liquidity Lookback defines how recent a wick must be to confirm a sweep.
Read the chart : Origin lines mark where the CISD began. A green line signals bullish intent; a red line signals bearish intent. ▲ and ▼ shapes show CISDs that form after liquidity is swept, these mark strong signals for potential entry. Swing dots show recent swing highs/lows. Candle colors follow the latest CISD trend.
Settings that matter : Increasing Swing Period produces fewer but stronger swings. Raising Noise Filter requires cleaner counter-moves and reduces false CISDs. Liquidity Lookback controls how strict the sweep confirmation is. Expiry Bars decides how long swing levels remain active.
Sessions High & Low LevelsAutomatically plots high & low levels for multiple sessions. Clear session structure for intraday traders using price action, liquidity concepts, or session-based strategies.
Automatically plots the High & Low, for sessions such as London, New York, and Asia, with full customization for any custom session or timezone. These levels extend forward and adapt in real time, giving you a clear view of session-based structure and liquidity behavior.
Perfect for traders using ICT concepts, session narratives, or intraday market structure. Session ranges often act as key liquidity pools, breakout zones, and directional guides, this tool makes them easy to see at a glance.
Features:
Auto-plots High & Low for NY, London, and Asia sessions (customizable)
Fully customizable session times, colors, labels, and visibility options
Works across any assets
ICT Sessions Ranges [SwissAlgo]ICT Session Ranges - ICT Liquidity Zones & Market Structure
OVERVIEW
This indicator identifies and visualizes key intraday trading sessions and liquidity zones based on Inner Circle Trader (ICT) methodology (AM, NY Lunch Raid, PM Session, London Raid). It tracks 'higher high' and 'lower low' price levels during specific time periods that may represent areas where market participants have placed orders (liquidity).
PURPOSE
The indicator helps traders observe:
Session-based price ranges during different market hours
Opening range gaps between market close and next day's open
Potential areas where liquidity may be concentrated and trigger price action
SESSIONS TRACKED
1. London Session (02:00-05:00 ET): Tracks price range during early London trading hours
2. AM Session (09:30-12:00 ET): Tracks price range during the morning New York session
3. NY Lunch Session (12:00-13:30 ET): Tracks price range during typical low-volume lunch period
4. PM Session (13:30-16:00 ET): Tracks price range during the afternoon New York session
CALCULATIONS
Session High/Low: The highest high and lowest low recorded during each active session period
Opening Range Gap: Calculated as the difference between the previous day's 16:00 close and the current day's 09:30 open
Gap Mitigation: A gap is considered mitigated when the price reaches 50% of the gap range
All times are based on America/New_York timezone (ET)
BACKGROUND INDICATORS
NY Trading Hours (09:30-16:00 ET): Optional gray background overlay
Asian Session (20:00-23:59 ET): Optional purple background overlay
VISUAL ELEMENTS
Horizontal lines mark session highs and lows
Subtle background boxes highlight each session range
Labels identify each session type
Orange shaded boxes indicate unmitigated opening range gaps
Dotted line at 50% gap level shows mitigation threshold
FEATURES
Toggle visibility for each session independently
Customizable colors for each session type
Automatic removal of mitigated gaps
All drawing objects use transparent backgrounds for chart clarity
ICT CONCEPTS
This tool relates to concepts discussed by Inner Circle Trader regarding liquidity pools, session-based analysis, and gap theory. The indicator assumes that session highs and lows may represent areas where liquidity is concentrated, and that opening range gaps may attract price until mitigated.
USAGE NOTES
Best used on intraday timeframes (1-15 minute charts)
All sessions are calculated based on actual price movement during specified time periods
Historical session data is preserved as new sessions develop
Gap detection only triggers at 09:30 ET market open
DISCLAIMER
This indicator is for educational and informational purposes only. It displays historical price levels and time-based calculations. Past performance of price levels is not indicative of future results. The identification of "liquidity zones" is a theoretical concept and does not guarantee that orders exist at these levels or that prices will react to them. Trading involves substantial risk of loss. Users should conduct their own analysis and risk assessment before making any trading decisions.
TIME ZONE
Set your timezone to: America/New_York (UTC-5)
Realtime Squeeze Box [CHE] Realtime Squeeze Box — Detects lowvolatility consolidation periods and draws trimmed price range boxes in realtime to highlight potential breakout setups without clutter from outliers.
Summary
This indicator identifies "squeeze" phases where recent price volatility falls below a dynamic baseline threshold, signaling potential energy buildup for directional moves. By requiring a minimum number of consecutive bars in squeeze, it reduces noise from fleeting dips, making signals more reliable than simple threshold crosses. The core innovation is realtime box visualization: during active squeezes, it builds and updates a box capturing the price range while ignoring extreme values via quantile trimming, providing a cleaner view of consolidation bounds. This differs from static volatility bands by focusing on trimmed ranges and suppressing overlapping boxes, which helps traders spot genuine setups amid choppy markets. Overall, it aids in anticipating breakouts by combining volatility filtering with visual containment of price action.
Motivation: Why this design?
Traders often face whipsaws during brief volatility lulls that mimic true consolidations, leading to premature entries, or miss setups because standard volatility measures lag in adapting to changing market regimes. This design addresses that by using a hold requirement on consecutive lowvolatility bars to denoise signals, ensuring only sustained squeezes trigger visuals. The core idea—comparing rolling standard deviation to a smoothed baseline—creates a responsive yet stable filter for lowenergy periods, while the trimmed box approach isolates the core price cluster, making it easier to gauge breakout potential without distortion from spikes.
What’s different vs. standard approaches?
Reference baseline: Traditional squeeze indicators like the Bollinger Band Squeeze or TTM Squeeze rely on fixed multiples of bands or momentum oscillators crossing zero, which can fire on isolated bars or ignore range compression nuances.
Architecture differences:
Realtime box construction that updates barbybar during squeezes, using arrays to track and trim price values.
Quantilebased outlier rejection to define box bounds, focusing on the bulk of prices rather than full range.
Overlap suppression logic that skips redundant boxes if the new range intersects heavily with the prior one.
Hold counter for consecutive bar validation, adding persistence before signaling.
Practical effect: Charts show fewer, more defined orange boxes encapsulating tight price action, with a horizontal line extension marking the midpoint postsqueeze—visibly reducing clutter in sideways markets and highlighting "coiled" ranges that standard plots might blur with full highs/lows. This matters for quicker visual scanning of multitimeframe setups, as boxes selflimit to recent history and avoid piling up.
How it works (technical)
The indicator starts by computing a rolling average and standard deviation over a userdefined length on the chosen source price series. This deviation measure is then smoothed into a baseline using either a simple or exponential average over a longer window, serving as a reference for normal volatility. A squeeze triggers when the current deviation dips below this baseline scaled by a multiplier less than one, but only after a minimum number of consecutive bars confirm it, which resets the counter on breaks.
Upon squeeze start, it clears a buffer and begins collecting source prices barbybar, limited to the first few bars to keep computation light. For visualization, if enabled, it sorts the buffer and finds a quantile threshold, then identifies the minimum value at or below that threshold to set upper and lower box bounds—effectively clamping the range to exclude tails above the quantile. The box draws from the start bar to the current one, updating its right edge and levels dynamically; if the new bounds overlap significantly with the last completed box, it suppresses drawing to avoid redundancy.
Once the hold limit or squeeze ends, the box freezes: its final bounds become the last reference, a midpoint line extends rightward from the end, and a tiny circle label marks the point. Buffers and states reset on new squeezes, with historical boxes and lines capped to prevent overload. All logic runs on every bar but uses confirmed historical data for calculations, with realtime updates only affecting the active box's position—no future peeking occurs. Initialization seeds with null values, building states progressively from the first bars.
Parameter Guide
Source: Selects the price series (e.g., close, hl2) for deviation and box building; influences sensitivity to wicks or bodies. Default: close. Tradeoffs/Tips: Use hl2 for balanced range view in volatile assets; stick to close for pure directional focus—test on your timeframe to avoid oversmoothing trends.
Length (Mean/SD): Sets window for average and deviation calculation; shorter values make detection quicker but noisier. Default: 20. Tradeoffs/Tips: Increase to 30+ for stability in higher timeframes, reducing false starts; below 10 risks overreacting to singlebar noise.
Baseline Length: Defines smoothing window for the deviation baseline; longer periods create a steadier reference, filtering regime shifts. Default: 50. Tradeoffs/Tips: Pair with Length at 1:2 ratio for calm markets; shorten to 30 if baselines lag during fast volatility drops, but watch for added whips.
Squeeze Multiplier (<1.0): Scales the baseline downward to set the squeeze threshold; lower values tighten criteria for rarer, stronger signals. Default: 0.8. Tradeoffs/Tips: Tighten to 0.6 for highvol assets like crypto to cut noise; loosen to 0.9 in forex for more frequent but shallower setups—balances hit rate vs. depth.
Baseline via EMA (instead of SMA): Switches baseline smoothing to exponential for faster adaptation to recent changes vs. equalweighted simple average. Default: false. Tradeoffs/Tips: Enable in trending markets for quicker baseline drops; disable for uniform history weighting in rangebound conditions to avoid overreacting.
SD: Sample (len1) instead of Population (len): Adjusts deviation formula to divide by length minus one for smallsample bias correction, slightly inflating values. Default: false. Tradeoffs/Tips: Use sample in short windows (<20) for more conservative thresholds; population suits long looks where bias is negligible, keeping signals tighter.
Min. Hold Bars in Squeeze: Requires this many consecutive squeeze bars before confirming; higher denoise but may clip early setups. Default: 1. Tradeoffs/Tips: Bump to 35 for intraday to filter ticks; keep at 1 for swings where quick consolidations matter—trades off timeliness for reliability.
Debug: Plot SD & Threshold: Toggles lines showing raw deviation and threshold for visual backtesting of squeeze logic. Default: false. Tradeoffs/Tips: Enable during tuning to eyeball crossovers; disable live to declutter—great for verifying multiplier impact without alerts.
Tint Bars when Squeeze Active: Overlays semitransparent color on bars during open box phases for quick squeeze spotting. Default: false. Tradeoffs/Tips: Pair with low opacity for subtlety; turn off if using boxes alone, as tint can obscure candlesticks in dense charts.
Tint Opacity (0..100): Controls background tint strength during active squeezes; higher values darken for emphasis. Default: 85. Tradeoffs/Tips: Dial to 60 for light touch; max at 100 risks hiding price action—adjust per chart theme for visibility.
Stored Price (during Squeeze): Price series captured in the buffer for box bounds; defaults to source but allows customization. Default: close. Tradeoffs/Tips: Switch to high/low for wider boxes in gappy markets; keep close for midline focus—impacts trim effectiveness on outliers.
Quantile q (0..1): Fraction of sorted prices below which tails are cut; higher q keeps more data but risks including spikes. Default: 0.718. Tradeoffs/Tips: Lower to 0.5 for aggressive trim in noisy assets; raise to 0.8 for fuller ranges—tune via debug to match your consolidation depth.
Box Fill Color: Sets interior shade of squeeze boxes; semitransparent for layering. Default: orange (80% trans.). Tradeoffs/Tips: Soften with more transparency in multiindicator setups; bold for standalone use—ensures boxes pop without overwhelming.
Box Border Color: Defines outline hue and solidity for box edges. Default: orange (0% trans.). Tradeoffs/Tips: Match fill for cohesion or contrast for edges; thin width keeps it clean—helps delineate bounds in zoomed views.
Keep Last N Boxes: Limits historical boxes/lines/labels to this count, deleting oldest for performance. Default: 10. Tradeoffs/Tips: Increase to 50 for weekly reviews; set to 0 for unlimited (risks lag)—balances history vs. speed on long charts.
Draw Box in Realtime (build/update): Enables live extension of boxes during squeezes vs. waiting for end. Default: true. Tradeoffs/Tips: Disable for confirmedonly views to mimic backtests; enable for proactive trading—adds minor repaint on live bars.
Box: Max First N Bars: Caps buffer collection to initial squeeze bars, freezing after for efficiency. Default: 15. Tradeoffs/Tips: Shorten to 510 for fast intraday; extend to 20 in dailies—prevents bloated arrays but may truncate long squeezes.
Reading & Interpretation
Squeeze phases appear as orange boxes encapsulating the trimmed price cluster during lowvolatility holds—narrow boxes signal tight consolidations, while wider ones indicate looser ranges within the threshold. The box's top and bottom represent the quantilecapped high and low of collected prices, with the interior fill shading the containment zone; ignore extremes outside for "true" bounds. Postsqueeze, a solid horizontal line extends right from the box's midpoint, acting as a reference level for potential breakout tests—drifting prices toward or away from it can hint at building momentum. Tiny orange circles at the line's start mark completion points for easy scanning. Debug lines (if on) show deviation hugging or crossing the threshold, confirming hold logic; a persistent hug below suggests prolonged calm, while spikes above reset counters.
Practical Workflows & Combinations
Trend following: Enter long on squeezeend close above the box top (or midpoint line) confirmed by higher high in structure; filter with rising 50period average to avoid countertrend traps. Use boxes as support/resistance proxies—short below bottom in downtrends.
Exits/Stops: Trail stops to the box midpoint during postsqueeze runs for conservative holds; go aggressive by exiting on retest of opposite box side. If debug shows repeated threshold grazes, tighten stops to curb drawdowns in ranging followups.
Multiasset/MultiTF: Defaults work across stocks, forex, and crypto on 15min+ frames; scale Length proportionally (e.g., x2 on hourly). Layer with highertimeframe boxes for confluence—e.g., daily squeeze + 1H box for entry timing. (Unknown/Optional: Specific multiTF scaling recipes beyond proportional adjustment.)
Behavior, Constraints & Performance
Repaint/confirmation: Core calculations use historical closes, confirming on bar close; active boxes repaint their right edge and levels live during squeezes if enabled, but freeze irrevocably on hold limit or end—mitigates via barbybar buffer adds without future leaks. No lookahead indexes.
security()/HTF: None used, so no external timeframe repaints; all native to chart resolution.
Resources: Caps at 300 boxes/lines/labels total; small arrays (up to 20 elements) and short loops in sorting/minfinding keep it light—suitable for 10k+ bar charts without throttling. Persistent variables track state across bars efficiently.
Known limits: May lag on ultrasharp volatility spikes due to baseline smoothing; gaps or thin markets can skew trims if buffer hits cap early; overlaps suppress visuals but might hide chained squeezes—(Unknown/Optional: Edge cases in nonstandard sessions).
Sensible Defaults & Quick Tuning
Start with defaults for most liquid assets on 1Hdaily: Length 20, Multiplier 0.8, Hold 1, Quantile 0.718—yields balanced detection without excess noise. For too many false starts (choppy charts), increase Hold to 3 and Baseline Length to 70 for stricter confirmation, reducing signals by 3050%. If squeezes feel sluggish or miss quick coils, shorten Length to 14 and enable EMA baseline for snappier adaptation, but monitor for added flips. In highvol environments like options, tighten Multiplier to 0.6 and Quantile to 0.6 to focus on core ranges; reverse for calm pairs by loosening to 0.95. Always backtest tweaks on your asset's history.
What this indicator is—and isn’t
This is a volatilityfiltered visualization tool for spotting and bounding consolidation phases, best as a signal layer atop price action and trend filters—not a standalone predictor of direction or strength. It highlights setups but ignores volume, momentum, or news context, so pair with discreteness rules like higher highs/lows. Never use it alone for entries; always layer risk management, such as 12% stops beyond box extremes, and position sizing based on account drawdown tolerance.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on HeikinAshi, Renko, Kagi, PointandFigure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Deyler IndicatorMerge indicators:
Nwog
ICT Killzones and Pivots
BTC Keylevels
9h30 First FVG
Round Number






















