Liquidity Trail Matrix [WillyAlgoTrader]📊 Liquidity Trail Matrix (LTM) is an overlay trend-following system that combines a four-band proportional ATR trailing stack, a 5-factor retest quality score (0–100), a non-repainting higher-timeframe bias filter, a range-distributed volume profile of the current trend segment (POC / Value Area / HVN / LVN), and a full trade engine with wick-anchored stops, three R-multiple targets, break-even automation and honest session statistics — all in one indicator.
The core insight: a single trailing stop line gives you a binary answer — "in trend" or "flipped". But price interacts with the liquidity zone around the trail in layers: shallow pullbacks, deep sweeps, and full reversals all look different. LTM replaces the single line with a graded four-band matrix, scores every pullback-and-reclaim by depth, candle quality, volume, higher-timeframe alignment and trend maturity, and overlays where volume actually accumulated during the current trend leg — so you can see whether a retest is landing on real acceptance (HVN / POC) or falling into a volume vacuum (LVN).
Works on all markets (crypto, forex, stocks, indices, commodities) and all timeframes. On zero-volume symbols the profile automatically switches to a range-weighted proxy.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A trailing stop alone tells you the trend direction but nothing about entry quality — every touch of the line looks the same. A volume profile alone shows you where volume traded but has no concept of trend regime or entry timing. A retest signal alone fires on any bounce, whether it happens in a mature trend with higher-timeframe support or in the dying bars of an exhausted move. Used separately, these tools leave you guessing.
LTM chains them into one pipeline:
ATR band stack → trend flip detection → pullback depth measurement → 5-factor quality scoring → HTF bias confirmation → trade engine (entry / SL / TP / BE) → segment volume profile context → session outcome tracking
The band stack defines the trend and, critically, grades how deep each pullback penetrates (Band 1 = shallow, Band 4 = extreme). That depth becomes the largest single component of the retest score. The score is then adjusted by the reclaim candle's close location, relative volume, trend age, and the higher-timeframe EMA-50 bias — five independent dimensions that a plain trailing stop cannot see. Every confirmed signal is handed to the trade engine, which places a structure-aware stop, three risk-multiple targets and manages break-even. Meanwhile the volume profile is rebuilt from the exact flip bar of the current trend, so POC, Value Area and LVN levels always describe this leg — telling you whether your entry sits on volume acceptance or in a vacuum. Finally, every closed trade feeds the on-chart statistics, so the dashboard shows how this exact configuration has behaved on this exact chart.
Remove any link and the chain breaks: without band depth there is no meaningful score; without the score every bounce is a signal; without the segment-anchored profile the volume context is stale; without the trade engine the signals have no defined risk; without stats you never learn whether the settings fit the instrument.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Proportional four-band trail geometry — spacing that scales with width.
Most multi-line trails use fixed offsets (base, base+1, base+2 ATR). LTM computes every band as a proportion of the base multiplier:
Band K distance = base × (1 + K_offset × step), giving four multipliers:
— m1 = base
— m2 = base × (1 + step)
— m3 = base × (1 + 2 × step)
— m4 = base × (1 + 3 × step)
With the default Balanced preset (base 4.0, step 0.25) that yields 4.0 / 5.0 / 6.0 / 7.0 ATR. Because spacing is proportional, the geometry of the stack stays visually and behaviorally consistent whether you run tight Scalping bands (2.5 × ATR, step 0.20) or wide Deep Trend bands (6.0 × ATR, step 0.30). Each band ratchets independently (max-lock in uptrends, min-lock in downtrends) and never loosens.
Why this matters: fixed +1/+2/+3 offsets make the stack proportionally "fat" at small base values and "thin" at large ones — proportional spacing keeps pullback depth grading meaningful at any width.
2️⃣ Selectable flip depth — you choose which band defines a reversal.
The trend flips only when price closes beyond a user-chosen band from the previous bar: Fast (Band 2), Balanced (Band 3, default) or Deep (Band 4). Comparing against the previous bar's band value prevents same-bar feedback between the flip and the band update. A warm-up guard (max(3 × ATR length, 60) bars) suppresses all signals until the ATR stack is statistically stable.
Why this matters: flip sensitivity becomes an explicit, single-purpose setting instead of an accidental side effect of band width.
3️⃣ 5-factor retest quality score (0–100) — every signal explains itself.
When price touches any band and then reclaims Band 1 with a directional candle inside the retest window (default 8 bars), LTM computes:
— 📐 Pullback depth (max 25) : Band 2 touch = 25, Band 3 = 18, Band 1 = 15, Band 4 = 10. The maximum touched depth during the pending window is used. Note the deliberate non-linearity: Band 2 scores highest — deep enough to reset liquidity, not deep enough to threaten the trend. Band 4 sweeps score lowest because they often precede full reversals.
— 🕯️ Reclaim candle (max 20) : close location value CLV = (close − low) / (high − low) for longs (mirrored for shorts). CLV > 0.7 → 20 points, > 0.5 → 12, else 5. A reclaim that closes near its extreme shows commitment.
— 📊 Volume (max 20) : current volume vs. the previous bar's 20-period SMA — the spike must not dampen itself by inflating its own average. Volume > 1.2 × baseline → 20, > 1.0 × → 12, else 5. Symbols without volume data receive a neutral 12.
— 🧭 HTF bias (max 20) : aligned with the higher-timeframe EMA-50 direction → 20, no HTF data → 10, against bias → 0.
— ⏳ Trend age (max 15) : 10–150 bars into the trend → 15 (mature, established), under 10 bars → 8 (unproven), over 150 → 5 (aging).
Signals print only when the total meets the Min Retest Score (default 80) and the shared anti-whipsaw cooldown (default 5 bars, deliberately shared across both directions) has elapsed. Every diamond label shows the score, and its tooltip breaks down all five components — no black-box signals.
4️⃣ Non-repainting higher-timeframe bias.
HTF bias compares the higher timeframe's previous closed bar close against its EMA-50, requested with confirmed-bar indexing so the value never changes retroactively. Bias is a soft score component (0/10/20 points), not a hard filter — counter-bias signals can still print if the other four factors are strong enough.
5️⃣ Segment volume profile — range-distributed, anchored to the live trend leg.
The profile is rebuilt on the last bar from the exact flip bar of the current trend (capped by Max Profile Bars, default 500) — no arbitrary lookback padding. Accumulation is range-distributed: each bar's volume is split across every price bin its high–low range overlaps, weighted by overlap fraction:
bin_volume += bar_volume × overlap(bin, bar_range) / (bar_high − bar_low)
This shows where volume actually traded, not where bars happened to close. From the histogram LTM derives:
— 🟡 POC — the highest-volume bin of the segment, drawn with price and volume label. The strongest magnet / defense level of this leg.
— 📦 Value Area (70%) — expanded symmetrically from POC by always adding the larger neighboring bin until 70% of segment volume is enclosed. VAH / VAL edges act as dynamic S/R.
— 📈 HVN — local volume peaks ≥ 0.55 × POC volume (configurable): acceptance shelves where price tends to stall.
— 🕳️ LVN — local troughs ≤ 0.30 × POC volume inside the Value Area (configurable): volume vacuums that price tends to travel through quickly. Each LVN is labeled and feeds a dedicated break alert.
On symbols with no volume feed (forex, some CFDs) the engine substitutes a true-range proxy per bar, so the profile stays structurally meaningful instead of failing.
6️⃣ Trade engine with strict signal-trade parity.
Every confirmed signal (scored retest or trend flip) acts, with unambiguous rules:
— flat → open a position in the signal direction
— opposite position → reverse (close and enter the new direction on the same bar)
— same-direction position → ignored (no pyramiding, no stop tampering)
There are exactly four closure paths: SL hit, break-even stop-out, TP3 touch, or reversal by an opposite signal. Hit detection uses three safety guards: an entry-bar guard (SL/TP are never evaluated on the entry bar itself), a pessimistic same-bar rule (if a bar touches both SL and a TP, the SL wins — statistics never get the benefit of the doubt), and a break-even latency rule (a stop moved to break-even mid-bar cannot trigger on that same bar — the engine checks against the bar-start stop value).
7️⃣ Wick-anchored stop-loss mode.
Two SL modes at entry:
— Wick-Anchored (default) : SL = signal bar's wick extreme ± 0.25 × ATR buffer, with a minimum distance of 0.5 × ATR enforced. The stop hides behind the structure that produced the signal instead of floating at an arbitrary distance.
— ATR : classic fixed SL Multiplier × ATR from entry.
TP1 / TP2 / TP3 are pure risk multiples of the actual SL distance (defaults 1R / 2R / 3R), so the reward structure automatically adapts to how much room the stop needed. Four risk presets (Conservative 2.5 × ATR SL, TP 1/2/4R; Balanced 1.5, TP 1/2/3R; Aggressive 1.0, TP 1.5/2.5/4R; Scalping 0.8, TP 0.8/1.5/2R) plus full Custom control. Optional break-even moves the stop to entry after TP1.
8️⃣ Honest session statistics with a fixed win definition.
A closed trade counts as a win only if TP1 was touched before closure — including break-even stop-outs after TP1 (you banked at least 1R or protected the position). Everything else is a loss, including reversals that never reached TP1. The dashboard shows closed trades, W/L, win rate with a ▰▱ gauge, and a "Form" strip of the last 10 outcomes. Stats are session-scoped and reset on chart reload — this is transparent live tracking of the current settings on the current chart, not a backtest report.
9️⃣ Trend P&L tracker and theme-aware visual system.
An optional floating label follows price in real time and shows the directional % move since the current trend flip (a falling bear trend shows positive %), anchored by a dotted baseline at the trend start price. The label turns red when the trend is under water. The entire visual layer — band transparencies, heatmap fills, dashboard, profile, SL/TP palette — has separate Dark and Light calibrations (Auto-detected from the chart background), because bright hues that look right on dark charts wash out on white ones. TP lines recolor to solid teal with a ✓ when touched; the SL line dims and the entry label annotates "→ SL (BE)" when break-even activates. SL/TP lines persist after the trade closes as a visual record until the next entry replaces them.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Band geometry: The preset (or Custom inputs) resolves the base multiplier and proportional step; four multipliers m1–m4 are derived and multiplied by ATR (default length 13).
Step 2 — Ratcheting trail: In an uptrend each band only rises (max-lock); in a downtrend only falls (min-lock). On a flip the whole stack re-seeds on the opposite side of price.
Step 3 — Flip detection: A close beyond the previous bar's value of the chosen flip band (2/3/4) reverses the trend state. Flip labels print on confirmed bars after the warm-up period.
Step 4 — Pullback tracking: Any touch of Band 1–4 against the trend arms a pending retest with its maximum depth, valid for the retest window; pendings decay each bar and are voided on a flip.
Step 5 — Reclaim and scoring: A directional close back beyond Band 1 triggers scoring: depth (25) + candle (20) + volume (20) + HTF bias (20) + trend age (15). Score ≥ threshold and cooldown elapsed → confirmed signal on bar close.
Step 6 — Trade engine: The signal opens or reverses a position; SL is placed (wick-anchored or ATR), TP1–TP3 are projected as risk multiples; break-even, TP recolors and the four closure paths are managed bar by bar with pessimistic resolution.
Step 7 — Segment profile: On the last bar the profile is rebuilt from the flip bar: range-distributed accumulation → POC → 70% Value Area expansion → HVN/LVN detection → drawing.
Step 8 — Reporting: The dashboard updates trend state, signal state, profile levels, live trade card and session statistics; alerts fire on bar close in within-bar chronological order (management → closures → reversal → entries → info).
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to your chart and pick a Band Width Preset: Scalping for 1–15M, Balanced for most timeframes, Deep Trend for D–W position trading.
2. Set the Higher Timeframe Bias one or two steps above your chart (e.g. 1H while trading 15M).
3. Choose a Risk Preset that matches your style, or leave Balanced.
4. Watch the dashboard: Trend + HTF Bias aligned means you only consider signals in that direction with full conviction; the retest diamonds do the timing.
5. After 15–20 closed trades, read the Stats section and tune Min Retest Score up (fewer, cleaner signals) or down (more signals) for your instrument.
👁️ Reading the chart:
— 🟢 / 🔴 Band stack + heatmap = the liquidity trail zone; the deeper the fill, the closer price is to a trend flip.
— ◆ diamond with a number = confirmed scored retest entry (the number is the 0–100 quality score; hover the tooltip for the full component breakdown).
— ▲ / ▼ FLIP = confirmed trend reversal through the chosen flip band.
— Long ▲ / Short ▼ = trade entry taken by the engine on a flip (printed when there is no retest diamond on the same bar, so every entry is visibly marked).
— ENTRY / SL / TP1–TP3 lines = the live trade card; TP lines turn solid teal with ✓ when touched; a dimmed SL with "→ SL (BE)" on the entry label means the stop sits at break-even.
— 🟡 POC line = highest-volume price of the current trend leg; dashed VAH/VAL = Value Area edges; LVN labels = volume vacuums inside the Value Area.
— ▲ +X.XX% floating label (optional) = real-time directional P&L of the current trend since the flip.
📊 Dashboard fields:
— Trend / Age : direction of the band stack and bars since the last flip.
— HTF Bias : higher-timeframe EMA-50 direction (soft score component).
— Signal : current engine position — LONG, SHORT or Wait.
— Last signal : most recent event, its score, and bars elapsed.
— POC / VA High / VA Low : live segment profile levels.
— Entry / SL / TP1–TP3 / R:R / SL Dist % : the open trade card ("BE @" marks a break-even stop; ✓ marks touched targets); collapses to one row when flat.
— Trades / W-L / Win rate / Form : session statistics; ▰ = win, ▱ = loss, newest on the right.
🔧 Tuning guide:
— Too many weak signals: raise Min Retest Score toward 85–90, or increase Signal Cooldown.
— Too few signals: lower Min Retest Score toward 55–65, or widen the Retest Window to 10.
— Whipsaw flips on a choppy symbol: switch Flip Band to Deep (Band 4) or move to the Deep Trend preset.
— Flips lag too far behind on fast moves: Flip Band → Fast (Band 2) or the Scalping preset.
— Stops feel too tight / too wide: switch SL Mode between Wick-Anchored and ATR, or change the Risk Preset; on volatile symbols prefer Conservative.
— Profile looks coarse on long trends: raise Profile Rows to 50+ and Max Profile Bars toward 800.
— Counter-trend retests keep printing: set an explicit Higher Timeframe Bias — counter-bias signals lose 20 points and rarely clear a high threshold.
⚙️ KEY SETTINGS
⚙️ Trend Engine:
— Band Width Preset (default Balanced): Scalping 2.5 × ATR / step 0.20, Balanced 4.0 / 0.25, Deep Trend 6.0 / 0.30, or Custom.
— Base Multiplier (default 5.0) and Band Spacing (default 0.25): manual geometry, active in Custom preset only.
— ATR Length (default 13): lookback for band-width ATR.
— Source (default close): price series for trailing and flips.
— Flip Band (default Balanced / Band 3): which band a close must breach to flip the trend.
— Higher Timeframe Bias (default empty = chart TF): HTF for EMA-50 bias scoring.
🎯 Signals:
— Min Retest Score (default 80): 0–100 quality threshold for retest diamonds.
— Retest Window (default 8 bars): how long a band touch stays armed for a reclaim.
— Signal Cooldown (default 5 bars): minimum spacing between signals, shared across directions.
📦 Volume Profile:
— Show Segment Volume Profile (on), Profile Rows (30), Profile Width (34 bars), Max Profile Bars (500).
— Show POC (on), Show Value Area 70% (on), Show HVN / LVN Levels (on), Profile Label Size (Small).
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— SL Mode (default Wick-Anchored): structure-aware wick stop vs. fixed ATR distance.
— ATR Length (Risk) (14), SL Multiplier (1.5), TP1 / TP2 / TP3 Multipliers (1.0 / 2.0 / 3.0 × risk) — Custom preset.
— Break-Even After TP1 (on): stop moves to entry once TP1 is touched.
— Show SL/TP Lines / Labels / % Distance and per-line style controls (Entry dotted, SL solid, TP dashed by default).
🎨 Visual:
— Theme (Auto / Dark / Light), Show Trail Bands , Show Band Heatmap Fill , Show Retest Signals , Show Flip Labels , Show Trend P&L Tracker (off by default), label size controls, watermark toggle, Bull / Bear color pickers.
📊 Dashboard:
— Show Dashboard (on), position (5 anchors), font size, and independent toggles for the Market, Profile, Trade and Stats sections.
🔧 Advanced:
— HVN Threshold (default 0.55 × POC volume): minimum relative volume for an acceptance node.
— LVN Threshold (default 0.30 × POC volume): maximum relative volume for a vacuum node.
🔔 ALERTS
— 🟢 LONG ENTRY / 🔴 SHORT ENTRY — ticker, timeframe, price, signal score, SL, TP1–TP3, R:R. Plain text or JSON webhook format ({"action":"buy"...}) for bot integrations.
— 🎯 TP1 / TP2 / TP3 HIT — target touches with prices (optional).
— 🛡️ BREAK-EVEN — stop moved to entry after TP1 (optional).
— 🛑 SL HIT / BE STOP-OUT — stop-loss trigger with direction, entry and stop prices; a distinct BE variant when the stop was at break-even.
— 🔄 REVERSAL — position reversed by an opposite signal, with the closed trade's outcome (after / before TP1).
— ▲ / ▼ TREND FLIP — informational flips that did not open or reverse a trade.
— ⚡ LVN BREAK — a close crossing a Low Volume Node of the live segment profile (price entering a volume vacuum often accelerates).
All alerts fire once per bar close. Alerts are ordered by within-bar chronology: trade management → closures → reversal → new entries → informational.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals, entries and alerts are confirmed on bar close (barstate.isconfirmed). The trend flip compares against the previous bar's band value. The HTF bias uses the higher timeframe's previous closed bar, so its value never changes retroactively. A warm-up guard suppresses signals for the first max(3 × ATR length, 60) bars.
— 📐 The segment volume profile is a live construct. It is redrawn on the last bar for the current trend leg and evolves as the leg grows — this is by design (it describes the present segment), and historical profile states are not preserved.
— 📊 Session statistics reset on chart reload. They are transparent live tracking of the current settings on the current symbol and timeframe — not a backtest, and past performance does not guarantee future results.
— ⚖️ Same-bar ambiguity is resolved pessimistically. If one bar touches both a stop and a target, the stop wins in the statistics. Intrabar sequence cannot be known from OHLC data, so the engine never gives itself the benefit of the doubt.
— 🕳️ Zero-volume symbols use a range-weighted proxy for the profile, and the volume score component defaults to a neutral value — profile shapes on such symbols reflect price dwell time, not traded volume.
— 🛠️ This is an analysis and trade-planning tool, not an automated trading bot. It detects trend state, scores retests, projects stops and targets, and tracks outcomes — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Gösterge

AI Regime DetectionAI Regime Detection
Markov Regime Switching · 4-State Hidden Markov Model · Online Learning · Pine Script v6
This indicator uses a genuine machine learning model — a 4-state Hidden Markov Model with online learning — to classify the market into one of four regimes in real time: Bull Trend, Bear Trend, Ranging, and High Volatility. Instead of a binary “trend/no-trend” signal, it outputs a full probability distribution over all four regimes every bar, together with a confidence score, a live statistics dashboard, and the learned transition matrix.
Knowing the current regime is arguably the most important context in trading: trend-following systems bleed in ranging markets, mean-reversion systems get destroyed in strong trends, and position sizing should shrink when volatility explodes. This tool answers the question “what kind of market am I in right now — and how sure can I be?” using a probabilistic framework rather than fixed thresholds.
How It Works
The engine is a Markov Regime Switching model processed with Bayesian forward filtering (Hamilton filter) on every bar:
Four bounded, scale-free features are extracted each bar: trend correlation (price vs. time, −1 to +1), RSI-based momentum, volatility percentile rank, and Sharpe-normalized drift. Because all features are bounded and scale-free, the model behaves consistently across any symbol and timeframe — no re-tuning needed between a large-cap stock and a crypto pair.
Each regime is defined by an emission template describing what its features typically look like (e.g. Bull Trend expects positive trend correlation and positive drift; High Volatility expects a top-decile volatility percentile).
Every bar, the model computes the likelihood of the observed features under each regime using a Lorentzian kernel (fat-tailed, robust to outliers — the same distance philosophy popularized by Lorentzian Classification) or a Gaussian kernel, then updates the posterior probabilities through the Markov transition matrix.
Online learning (approximate online EM): the transition matrix and the emission means are continuously updated from the data itself, with a learning-rate control. The model adapts to the statistical personality of each symbol instead of staying frozen at its priors. Regularization (diagonal cap, off-diagonal floor, template anchoring) prevents the two classic HMM failure modes: regime lock-in and label switching.
The regime with the highest posterior probability becomes the detected regime; its probability is the confidence score. The filtering is strictly causal — only past and current bars are used, and regime-change labels are drawn on confirmed bars only, so the tool does not repaint.
The model was validated on Monte Carlo simulations with known ground-truth regimes (drift processes for trends, mean-reverting Ornstein–Uhlenbeck processes for ranges and volatility shocks) before release.
Features
Real-time regime classification: Bull Trend ▲, Bear Trend ▼, Ranging ◆, High Volatility ⚡
Full posterior probability for all four regimes every bar, not just a single label
Confidence score (0–100%) with visual probability bars
Chart background tinted by regime, opacity scaled by confidence
Non-repainting regime-change labels printed on the price chart
Confidence & probability oscillator pane with reference levels (uniform prior 25%, high-confidence 80%)
Statistics dashboard: current volatility & its percentile, trend correlation, regime age, average regime duration, average return per bar inside the current regime, total regime switches, time distribution across regimes
Live learned transition matrix (4×4) — see the actual switching probabilities the model has learned for your symbol
Next likely regime — the most probable transition out of the current regime
Long-run π — the stationary distribution: the share of time each regime is expected to occupy in the long run
Choice of Lorentzian (robust) or Gaussian emission kernel
5 built-in alerts: any regime change + one per specific regime
Settings
Model — Markov Regime Switching
Regime persistence (prior): initial probability of staying in the same regime bar-to-bar. Higher = smoother, fewer switches; lower = more reactive.
Learning rate — transition matrix: how fast the switching probabilities adapt to the symbol. 0 disables adaptation.
Learning rate — emission: how fast regime feature profiles adapt. 0 disables adaptation.
Online learning (adaptive): master switch for all learning; off = fixed prior model.
Emission kernel: Lorentzian (robust, default) or Gaussian.
Features
Trend correlation length: window for the price-vs-time correlation trend measure.
RSI momentum length: period of the momentum feature.
Realized volatility length: window for realized volatility.
Volatility percentile window: lookback used to rank current volatility (also the warm-up length).
Drift smoothing length: smoothing window for the normalized drift feature.
Appearance
Toggles for background coloring, dashboard, regime-change labels, and transition matrix rows.
Dashboard position & text size.
Custom colors for each of the four regimes.
Usage
When the model detects a Bull Trend regime with high confidence, the background turns green and a label marks the transition bar. This is the environment where trend-following entries, pyramiding, and letting winners run have a statistical tailwind. The confidence reading matters: an 85% Bull reading and a 45% Bull reading are very different market states — the dashboard’s probability bars show how much weight the competing regimes still hold.
In a Ranging regime, the probability pane typically shows the blue Ranging line dominating while trend probabilities stay suppressed. This is where breakout trades fail most often and mean-reversion (fading moves back toward the middle of the range) performs best. A falling confidence during a mature trend regime often precedes the transition into Ranging — watch the oscillator pane for the crossover of probability lines.
The High Volatility regime fires when volatility jumps into its top percentiles regardless of direction. This regime is a risk filter first and foremost: reduce position size, widen stops, or stand aside. High Vol regimes frequently appear at capitulation lows and blow-off tops, so their resolution (which regime follows) is informative — the “NEXT LIKELY” row of the dashboard shows the model’s learned expectation.
The dashboard is the statistical summary of everything the model knows. The transition matrix rows read left-to-right as “from the row’s regime, probability of moving to ▲ ▼ ◆ ⚡”. A learned matrix with strong diagonals means the symbol has persistent, tradable regimes; weak diagonals mean choppy regime behavior — itself useful information for strategy selection. LONG-RUN π tells you the personality of the instrument (e.g. an index that spends 60% of its time trending vs. a pair that ranges 70% of the time). Ø RET/BAR shows the realized average return per bar inside the current regime on this chart — a quick sanity check that the regime labels align with actual profitability.
The lower pane plots confidence as a colored area (colored by the ruling regime) plus all four probability lines. Regime transitions appear as probability crossovers, and the 80% dotted line marks the high-confidence zone. Time spent below ~45% confidence indicates a contested, transitional market — a reasonable filter for standing aside.
Details for the Curious
The Hamilton filter recursion is αₜ(j) ∝ bⱼ(oₜ) · Σᵢ αₜ₋₁(i) · A , normalized each bar, where bⱼ is the emission likelihood and A the transition matrix.
Transition-matrix learning uses an exponentially weighted update toward the per-bar posterior transition distribution, weighted by the previous state probability — an O(1) approximation of online Baum–Welch.
Emission means are updated toward observed features weighted by the state posterior, with an anchor term pulling back toward the initial templates to keep regime identities stable.
The warm-up period equals the volatility percentile window (default 300 bars). On symbols with short history, reduce this input.
Limitations & Honest Notes
Per-bar classification of noisy financial data has an information-theoretic ceiling; expect occasional flicker near regime boundaries and during genuinely ambiguous markets. The persistence prior and confidence threshold are the tools to manage this.
Probabilities are model outputs, not guarantees. A regime model describes the statistical character of recent price action; it does not predict news, gaps, or structural breaks.
This is a context / filter tool, not a standalone entry-exit system. It is designed to tell you which strategy the current market rewards, not to replace one.
Conclusion
AI Regime Detection brings a real, transparent machine learning pipeline — Hidden Markov Model, Bayesian filtering, Lorentzian likelihoods, and online EM adaptation — natively into Pine Script, with every internal state (probabilities, transition matrix, stationary distribution) exposed on the chart instead of hidden behind a black box. Use it to align your strategy with the market’s current regime and to size risk with the model’s own confidence.
Gösterge

Gaussian RSI | NAL1. Overview
Gaussian RSI | NAL is a smoothed momentum-regime indicator built around an RSI engine filtered through a Gaussian weighting model. Instead of plotting raw RSI, the indicator applies Gaussian smoothing to reduce noise and create a cleaner momentum line.
The signal is then refined with an optional Gaussian confluence filter. This adds a second smoothing layer that acts as a directional confirmation structure, helping separate stronger momentum regimes from weaker internal fluctuations.
2. Calculation
The indicator starts by calculating RSI from the selected source. This creates the base momentum reading used by the rest of the model.
The RSI is then passed through a Gaussian filter. The Gaussian filter weights the lookback window using a bell-curve style distribution, creating a smoother momentum line while still preserving directional movement.
A second Gaussian filter can also be applied as a confluence line. This creates a slower reference layer for the Gaussian RSI, allowing the indicator to judge whether the current RSI structure is aligned with its own smoothed trend.
The bullish condition requires the Gaussian RSI to move above the upper threshold. When confluence is enabled, the Gaussian RSI must also be above the Gaussian confluence line.
The bearish condition requires the Gaussian RSI to move below the lower threshold. When confluence is enabled, the Gaussian RSI must also be below the Gaussian confluence line.
The final state holds its previous direction when neither condition is active. This creates a cleaner regime output instead of constantly flipping to neutral between threshold zones.
3. Key Features
Gaussian-smoothed RSI momentum engine.
Optional Gaussian confluence filter.
Upper and lower threshold-based regime detection.
State-based candle coloring and RSI coloring.
Glow-style RSI plot, regime fills, confluence line, and transition labels.
Designed to reduce raw RSI noise while preserving momentum structure.
4. Use
Gaussian RSI is designed to identify when momentum begins shifting into a stronger bullish or bearish regime. A move above the upper threshold reflects bullish momentum pressure, while a move below the lower threshold reflects bearish momentum pressure.
The confluence filter adds an additional layer of structure by requiring the Gaussian RSI to align with its own smoother reference line. This can help separate cleaner momentum expansions from weaker internal movement.
This indicator is best used as a specialized momentum module within a complete strategy framework. Its role is to isolate a refined RSI-based momentum layer, where the full value comes from how the signal is integrated into a broader process for regime, timing, and execution.
Gösterge

Adpative Dual Cloud | NAL1. Overview
Adaptive Dual Cloud | NAL is a dual-baseline trend cloud built from two separate smoothing structures: a Kijun-style midpoint baseline and an ALMA baseline. Instead of relying on a single moving average or one volatility model, the indicator builds an adaptive cloud around both baselines and only confirms direction when price escapes the full combined structure.
The purpose of the indicator is to create a stricter trend envelope. The Kijun side captures broader structural balance, while the ALMA side adds a smoother adaptive layer. The final upper and lower cloud boundaries are selected from both systems, forcing price to clear the stronger side of the cloud before a bullish or bearish state is confirmed.
2. Calculation
The indicator starts by creating two independent baselines. The first baseline is a Kijun-style midpoint calculated from the highest and lowest values over the selected lookback. This represents a structural equilibrium zone.
kijun_sen = math.avg(ta.lowest(cloudLen1), ta.highest(cloudLen1))
The second baseline uses ALMA, giving the cloud a smoother weighted-average component with adjustable sigma and offset. This adds a more refined smoothing layer beside the Kijun structure.
alma_base = ta.alma(srcSeries, cloudLen2, cloud2Off, cloud2Sig)
The indicator then calculates volatility using a selectable deviation engine. The volatility source can be price, the residual between price and the cloud average, or the cloud structure itself. This allows the band width to be built from different layers of market behavior.
VolSrc = switch devSrc
"Price" => srcSeries
"Residuals" => srcSeries - math.avg(alma_base, kijun_sen)
"Cloud" => math.avg(alma_base, kijun_sen)
The volatility engine supports multiple deviation types, including standard deviation, mean absolute deviation, median absolute deviation, exponential deviation, ATR, linear regression deviation, Hull deviation, FRAMA deviation, Kauffman adaptive deviation, Gaussian deviation, and quantile deviation.
After volatility is calculated, adaptive upper and lower bands are created around both baselines.
upper_kijun = kijun_sen + vol * multi_u
lower_kijun = kijun_sen - vol * multi_l
upper_alma = alma_base + vol * multi_u
lower_alma = alma_base - vol * multi_l
The final cloud uses the highest upper boundary and the lowest lower boundary. This makes the signal more selective because price must break beyond the combined cloud, not just one individual baseline.
upper = math.max(upper_kijun, upper_alma)
lower = math.min(lower_kijun, lower_alma)
A bullish state triggers when price closes above the final upper cloud. A bearish state triggers when price closes below the final lower cloud. When price remains inside the cloud, the previous state is held.
3. Key Features
Dual-baseline cloud using Kijun structure and ALMA smoothing.
Adaptive upper and lower bands built from selectable volatility models.
Multiple deviation engines for different volatility interpretations.
Selectable volatility source: price, residuals, or cloud structure.
Final cloud requires price to clear the combined upper or lower boundary.
State-based candle coloring, cloud coloring, glow effect, and directional fills.
4. Use
Adaptive Dual Cloud is designed to identify when price escapes a combined structural and smoothed volatility envelope. A close above the upper cloud reflects bullish expansion beyond both baseline systems, while a close below the lower cloud reflects bearish expansion below the combined structure.
The indicator is intentionally stricter than a single-baseline channel. By combining a Kijun-style midpoint with an ALMA baseline, it creates a cloud that filters more of the internal noise before confirming a directional regime.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a cloud-based volatility and structure layer, where price must prove strength or weakness against more than one adaptive baseline. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and execution.
Gösterge

Median Gaussian Trend | NAL1. Overview
Median Gaussian Trend | NAL is an adaptive trend-band indicator built from a median price baseline, Gaussian smoothing, and Gaussian-weighted volatility bands.
The indicator is designed to filter raw price movement into a smoother directional structure. Instead of using a simple moving average or standard deviation channel, it first compresses price through a median calculation, then applies Gaussian smoothing to create a cleaner baseline. Around that baseline, it builds adaptive upper and lower bands using Gaussian-weighted deviation.
The result is a robust, smooth trend regime tool that identifies when price breaks outside its filtered volatility structure.
2. Calculation
The indicator starts by calculating a median of the selected source. This helps reduce noise by focusing on the central value of recent price action instead of reacting directly to every candle.
That median value is then passed through a Gaussian filter. The Gaussian filter gives more structured weighting to the lookback window, producing a smoother baseline while still preserving directional movement.
The indicator then calculates a Gaussian-weighted deviation around the smoothed median baseline. This creates a custom volatility measurement that is more aligned with the filtered baseline rather than raw price alone.
The upper and lower bands are then built around the Gaussian-smoothed median. The script allows separate upper and lower multipliers, which lets the band structure be asymmetric if needed.
upper = median_base + sd_range * sd_mul
lower = median_base - sd_range * sd_mulb
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous regime is held.
3. Key Features
Median-based price filtering.
Gaussian-smoothed baseline.
Gaussian-weighted volatility deviation.
Adaptive upper and lower trend bands.
Separate upper and lower band multipliers.
State-based candle coloring, band coloring, glow effect, and directional fills.
4. Use
Median Gaussian Trend is designed to identify when price escapes its smoothed median-volatility structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The median component helps reduce noisy price behavior, while the Gaussian smoothing and deviation engine create a more refined trend envelope. This makes the indicator useful for reading directional structure without relying on a raw moving average channel.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a filtered volatility-trend layer of price behavior, where the real value comes from how the signal is integrated into a broader process for regime, timing, and execution.
Gösterge

G-Score | NAL1. Overview
G-Score | NAL is a volatility-adjusted Z-Score regime indicator built from two main components: a smoothed price Z-Score and an adaptive GARCH-based volatility Z-Score.
The indicator does not use fixed overbought or oversold levels. Instead, it builds dynamic thresholds from the current volatility structure of the market. Price is then measured against those volatility-derived boundaries to determine whether the market is entering a bullish or bearish statistical regime.
2. Calculation
The indicator starts by estimating volatility through a GARCH-style process. It calculates log returns from the selected source, converts those returns into squared variance, and then compares short-term variance behavior against a realized variance baseline.
GARCH_LogReturn = math.log(src / src )
GARCH_SquaredLogReturn = math.pow(GARCH_LogReturn, 2.0)
GARCH_RealizedVariance = ta.sma(GARCH_SquaredLogReturn, GARCH_Lookback)
The model then searches through possible beta and gamma coefficients to find weights that better fit the recent variance environment. These optimized coefficients are used to build a GARCH variance estimate from three components: long-run variance, recent shock variance, and lagged variance.
GARCH_Variance =
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_SquaredLogReturn +
GARCH_Beta * GARCH_LaggedVariance
The final GARCH volatility value is created by taking the square root of the projected variance. This produces the volatility engine used later in the threshold system.
The indicator then calculates two separate Z-Scores. The first is a price Z-Score, measuring where price is relative to its own mean and deviation. The second is a volatility Z-Score, measuring where GARCH volatility is relative to its own historical distribution.
Both values are smoothed with a Jurik-style moving average to reduce noise while keeping the response relatively fast.
The volatility Z-Score is then mirrored into positive and negative boundaries. This creates dynamic upper and lower thresholds that expand and contract with the current volatility regime.
The final signal compares the smoothed price Z-Score against those adaptive volatility thresholds. A bullish state triggers when price strength expands above the upper volatility boundary. A bearish state triggers when price weakness falls below the lower volatility boundary. When price remains inside the volatility envelope, the previous regime is held.
3. Key Features
Adaptive GARCH-style volatility engine.
Price Z-Score measured against volatility-derived thresholds.
Dynamic upper and lower boundaries instead of fixed levels.
Jurik-style smoothing for both price and volatility components.
State-based candle coloring, background regime coloring, threshold fills, and transition labels.
Designed to capture statistical expansion when price moves outside its volatility-adjusted structure.
4. Use
G-Score is designed to identify when price begins separating from its normal statistical range after accounting for the current volatility environment. A move above the upper threshold reflects bullish statistical expansion, while a move below the lower threshold reflects bearish statistical expansion.
The strength of the indicator comes from the relationship between price displacement and volatility regime. Rather than treating every Z-Score reading the same, it lets volatility define the boundary that price must break.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a specific statistical layer of market behavior, where price expansion is evaluated through the lens of adaptive volatility. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and risk.
Gösterge

Volatility Halo | NAL1. Overview
Volatility Halo | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline, ATR band structure, and a recursive GARCH-style volatility regime multiplier.
The indicator does not use fixed-width bands. Instead, it starts with ATR-based bands and then adjusts their width using a projected volatility regime model. This allows the bands to respond differently when market volatility is expanding, contracting, or stabilizing.
2. Calculation
The indicator starts by calculating a Zero-Lag EMA baseline from the selected source. This baseline acts as the central trend reference, helping reduce lag compared to a standard EMA while still keeping the structure smooth.
float baseline = f_zlema(src, baseline_len)
float ATR_Value = ta.atr(ATR_Len)
The ATR value is then multiplied by the user-defined ATR multiple. This forms the base volatility distance used for the upper and lower bands.
The more advanced part of the indicator is the recursive GARCH-style regime multiplier. It begins by calculating log returns and converting them into shock variance. A long-run variance estimate is then built from recent shock variance.
GARCH_LogReturn = close > 0.0 and close > 0.0 ? math.log(close / close ) : 0.0
GARCH_ShockVariance = math.pow(GARCH_LogReturn, 2.0)
GARCH_LongRunVariance = ta.ema(GARCH_ShockVariance, GARCH_LongRunLen)
The model recursively updates conditional variance using three components: recent shock variance, long-run variance, and previous conditional variance. When adaptive coefficients are enabled, the script searches for coefficient weights that better fit recent variance behavior.
GARCH_ConditionalVariance :=
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_ShockVariance +
GARCH_Beta * GARCH_PreviousConditionalVariance
The conditional variance is then projected and converted into a volatility estimate. This volatility is compared against its own regime baseline to create a volatility regime multiplier. The multiplier is clamped between a minimum and maximum value, preventing the bands from becoming too narrow or too wide.
GARCH_Volatility = math.sqrt(math.max(GARCH_ProjectedVariance, 0.0))
GARCH_RegimeMultiplierRaw = GARCH_Volatility / GARCH_RegimeBase
GARCH_RegimeMultiplier = f_clamp(GARCH_RegimeMultiplierSmooth, GARCH_MinMult, GARCH_MaxMult)
The final band width is created by combining ATR with the GARCH regime multiplier. The upper and lower bands are placed around the Zero-Lag EMA baseline.
hybridBandWidth = ATR_Value * ATR_Mult * GARCH_RegimeMultiplier
upperBand = baseline + hybridBandWidth
lowerBand = baseline - hybridBandWidth
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous state is held.
3. Key Features
Zero-Lag EMA baseline for reduced-lag trend structure.
ATR-based volatility bands.
Recursive GARCH-style conditional variance model.
Adaptive volatility regime multiplier.
Bands expand or contract based on projected volatility conditions.
State-based candle coloring, band coloring, glow effect, and regime fills.
4. Use
Volatility Halo is designed to identify moments where price begins escaping its volatility-adjusted structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The adaptive volatility engine allows the bands to shift with the underlying market environment, making the signal more responsive to changes in pressure and regime.
This indicator is best used as a specialized module within a complete strategy framework. Its real strength appears when it is combined with a broader process for reading market behavior, timing, and risk. The full edge comes from how the signal is integrated, not from the signal existing in isolation.
Gösterge

Gösterge

Trend Bias Guide MATrend Bias Guide MA
OVERVIEW
Trend Bias Guide MA is a smoothed reference line that shows which side (bullish or bearish) has been dominating recent price action, and helps spot early signs of trend exhaustion through divergence between price and candle-body pressure.
Unlike a standard moving average, this line is not derived from price itself. It is derived from the net directional pressure of individual candles over a lookback window, then projected onto the chart at a visual offset from price using ATR, so it never overlaps the candles.
WHAT IT IS BUILT FROM
For every candle in the lookback window (default: 50 candles), the script measures (close − open). This value is positive for a bullish candle and negative for a bearish candle, and its magnitude reflects the size of that candle's body.
These values are summed across the whole lookback window into a single number, referred to here as the net bias:
net bias = Σ (close − open) over the last N candles
This sum captures two distinct effects at once:
1. Count imbalance: whether there were more bullish or more bearish candles in the window.
2. Size imbalance: whether the bullish or bearish candles had larger bodies on average.
Both effects move price in the same underlying way, and summing (close − open) candle by candle combines them automatically, without needing to calculate them separately. If the net bias is positive, bullish pressure has dominated the window; if negative, bearish pressure has dominated.
HOW THE LINE IS DRAWN
- If the net bias is negative (bearish), the line is plotted above price, at a distance of (ATR × multiplier) above the current high.
- If the net bias is positive (bullish), the line is plotted below price, at a distance of (ATR × multiplier) below the current low.
- ATR length and multiplier are both adjustable inputs (defaults: ATR length 14, multiplier 1.0), and control how far the line sits from price.
- The raw level is then smoothed with a simple moving average (default length: 10) to reduce short-term noise and produce a cleaner, more continuous line instead of a jagged one.
- The line changes color to match its current bias: green when below price (bullish), red when above price (bearish).
INPUTS
- Lookback Length (default 50): number of candles used to calculate the net bias.
- ATR Length (default 14): period used for the ATR calculation that sets the offset distance.
- ATR Multiplier (default 1.0): scales the offset distance from price.
- Smoothing Length (default 10): period of the moving average applied to the final line.
HOW TO INTERPRET IT
- Green line below price: bullish pressure has dominated over the lookback window.
- Red line above price: bearish pressure has dominated over the lookback window.
- This is a trailing, lookback-based measure. Like any indicator built on a moving window, it reacts with a delay relative to the current candle — it will not flip instantly at the exact start of a new trend, and generally needs enough new candles in the new direction to outweigh the older ones still inside the window.
HOW TO USE IT
This indicator is designed as a contextual reference, not as a standalone entry or exit signal. Two practical uses:
1. Trend context: at a glance, see whether recent price action has been dominated by bullish or bearish candles, without needing to eyeball candle sizes manually.
2. Divergence / exhaustion warning: watch for cases where price is trading above a rising average (e.g., an EMA, not included in this script) while this line is still red (or below a falling average while the line is still green). This mismatch between price direction and underlying candle pressure can flag weakening trend conviction. In backtesting on XAUUSD (17 years of hourly data), this type of divergence was associated with a meaningfully higher chance of the trend reversing within the following 24–72 hours compared to the general baseline, with the effect strongest in the 24-hour window and gradually fading over longer horizons.
LIMITATIONS
- This is a descriptive/contextual tool, not a predictive trading signal on its own. It shows what has already happened over the lookback window, and any forward-looking use (such as the divergence behavior described above) carries no guarantee of repeating in the same way in the future or on other symbols/timeframes.
- Being lookback-based, the line inherently lags price, in the same way any moving average or rolling calculation does.
- It does not include stop-loss, take-profit, or position-sizing logic of any kind. It is a visual reference only.
- Backtested divergence statistics referenced above were derived from historical XAUUSD data and should not be assumed to hold with the same magnitude across all instruments, timeframes, or market regimes. Users should validate behavior on their own instrument and timeframe before relying on it. Gösterge

Auto Support & Resistance [ForexCracked]🔷 OVERVIEW
Auto Support & Resistance finds the levels that matter and scores how strong they are. It builds zones from confirmed swing pivots, merges nearby pivots into one level, counts every touch, and rates each zone from one to five stars. Levels never repaint: a zone only appears once its swing is confirmed.
🔷 HOW IT WORKS
Confirmed pivot highs become resistance zones and confirmed pivot lows become support zones. Pivots that land within half an ATR of an existing zone merge into it, and each merge or retest adds a touch. More touches means a more solid fill on the chart and a higher star rating. When price closes through a zone, the level flips: broken resistance becomes support, and broken support becomes resistance, exactly as classic technical analysis describes. Zones that nothing has touched for a long time fade off the chart, and only the strongest levels per side are kept, so the chart stays clean.
🔷 THE DASHBOARD
A compact panel shows the nearest resistance and nearest support: the exact level, how far away it is in pips, and its strength in stars. Drop it in any corner.
🔷 HOW TO USE
Treat the zones as areas of interest, not automatic trades. Watch how price reacts at a strong level: rejections at four and five star zones in the direction of your higher timeframe bias are the classic play, and a clean break and retest of a flipped level is the second. Always confirm with your own analysis and use a stop.
🔷 SETTINGS
Pivot strength, merge distance and zone height (x ATR), max levels per side, break buffer, zone age, colours, and dashboard position.
🔷 ALERTS
Level broken (flip), and New confirmed level.
Free and open-source. Educational tool, not financial advice. Gösterge

Bryy's Context PanelBryy’s Context Panel is a compact multi-symbol market context panel built to help traders monitor broader market and sector alignment without leaving their main execution chart.
The indicator checks selected symbols against configurable moving averages and adaptive VWAP, then displays a simple visual status for each metric:
✓ = price is above the selected metric
✕ = price is below the selected metric
- = data is unavailable or the metric is not applicable
The default use case is staying on a futures execution chart while monitoring external ETF context such as SOXX, QQQ, and SPY. This can help traders quickly see whether semiconductor, Nasdaq, and broad-market context are aligned or conflicting.
Main Features:
• Monitor up to 5 custom symbols
• Default focus on SOXX / QQQ / SPY market context
• Configurable SMA or EMA
• Three customizable moving average slots
• Optional custom timeframe per moving average
• Adaptive VWAP logic:
- Intraday charts: RTH Daily VWAP
- Daily charts: Week-Open VWAP
- Weekly charts: Month-Open VWAP
- Monthly+ charts: VWAP hidden in Auto mode
• Horizontal or vertical panel layout
• Adjustable panel size and placement
• Dark, light, and custom color themes
• Designed to be lightweight, clean, and fast
Intended Use:
This indicator is designed as a context scanner, not a buy/sell signal system.
It is meant to help answer questions like:
• Is SOXX supporting or fighting the trade idea?
• Is QQQ aligned with the current futures move?
• Is SPY confirming broader market direction?
• Are key context symbols above or below their short-term, medium-term, and longer-term reference levels?
The goal is to provide quick external market context while keeping the main chart clean.
Important Notes:
For US ETF symbols, the scanner is designed around regular-session context. When used outside regular market hours, values may reflect the most recent regular-session data depending on TradingView’s symbol/session handling.
VWAP depends on volume, so ETF symbols are generally better suited than non-volume index symbols for this tool.
This script does not predict price movement, generate entries, or provide financial advice. It is intended to support discretionary analysis by showing clear market context in a compact panel. Gösterge

Gösterge

ICT Sessions & Killzones - Asia London NY + Liquidity[LunqFX]ICT Sessions & Killzones is a modern smart-money session indicator for TradingView that maps the three global trading sessions — Asia, London and New York — as clean, colour-coded ranges and, unlike most session tools, automatically detects liquidity sweeps: the exact moment price raids a previous session's high or low and rejects it. It turns the daily rhythm of the market — the ICT killzones, session opens, and the liquidity pools left behind — into a clear, actionable map. Works on forex, crypto, indices, futures and gold (XAUUSD), on any intraday timeframe. Built in Pine Script v6. Keywords: ICT, killzones, sessions, Asia session, London session, New York session, liquidity, liquidity sweep, stop hunt, smart money concepts, SMC, session high low, opening range, forex, crypto, day trading, scalping.
◆ WHY SESSIONS MATTER
Price does not move randomly — it moves in sessions. Asia sets the range, London expands it, New York reverses or continues it. The highs and lows each session leaves behind become liquidity pools — resting stop orders that smart money targets. Knowing where those levels are, which session is active, and when a level gets swept is the core of session-based and ICT trading. This tool puts all of that on your chart automatically.
◆ WHAT IT DRAWS
Session boxes — Asia (violet), London (teal) and New York (gold) ranges drawn automatically from each session's high and low, kept across history so you can study the pattern.
Previous-session liquidity levels — the last completed session's high and low extended forward as dashed lines. These are the magnets price hunts next.
Liquidity sweep markers — a compact, colour-coded arrow (▲/▼ with the session code A / L / NY) printed when price wicks beyond a prior session extreme and closes back inside — a real stop-raid / rejection. Hover any marker for the full detail.
Neon gradient candles — turquoise up / magenta down, intensity scaled by momentum.
◆ THE LIVE DASHBOARD
A clean, colour-railed panel that reads the sessions at a glance:
Active session — which session is open right now (● marks any that are live; London and New York overlap in real hours, so both can be active).
Range per session — each session's high–low.
Range in pips — how far each session actually moved.
★ Widest range — the session that dominated the day (the "power session").
Timezone readout, fully themeable, adjustable text size.
◆ HOW IT WORKS
Every bar is assigned to a session from its own timestamp (no repainting from higher-timeframe data). The session's running high and low build the box in real time. When a new session opens, the previous session's extremes are locked in as liquidity levels. A liquidity sweep is flagged only when price trades beyond a prior session's high/low and then closes back inside it — a genuine rejection — so a clean break straight through does not trigger a false signal. This keeps the chart clean and every sweep meaningful.
◆ HOW TO USE IT
Trade the killzones. The London and New York opens produce the biggest, cleanest moves — focus your entries there.
Use prior session highs/lows as targets. Untapped levels act as magnets; price often runs them before reversing.
Fade or follow sweeps. When a sweep prints, the raid has taken liquidity — fade it back into range, or trade the reversal in the opposite direction.
Read the dashboard for context. Know which session is active and which had the widest range before you commit.
Set your times/timezone. Adjust each session's hours and the timezone in the settings to match your market and broker.
Combine with your own market structure, order blocks or bias for higher-probability confluence.
◆ SETTINGS
Session times & colours (Asia / London / New York), timezone, session boxes (soft fill or outline), previous-session levels with adjustable extension, liquidity sweep markers, neon candles, and a dashboard (show/hide, position, text size, background).
◆ ALERTS
Liquidity sweep — fires when any previous-session high or low is swept.
◆ LIMITATIONS
Sessions are an intraday concept — use a 1m to 4h timeframe. On daily or higher the panel shows a reminder and no sessions are drawn.
Default session times are in GMT; set the timezone and hours to match your instrument and broker feed, as session boundaries vary by symbol.
A liquidity sweep shows that a level was raided and rejected — it is context and confluence, not a standalone buy/sell signal.
Session ranges reflect the data of your chart's feed; different brokers can differ slightly.
◆ ORIGINALITY & NON-REPAINTING
Original work — the session engine, the rejection-based liquidity-sweep detection, the previous-session liquidity levels and the dashboard are all my own implementation; no third-party code is used. Sessions and levels are built from each bar's own timestamp with no higher-timeframe lookahead, so a sweep printed on a closed bar stays.
Educational analysis tool, not financial advice. Trading involves risk. Always do your own research and manage risk. © LunqFX. Gösterge

Seasonality: Energy [invincible3]Seasonality: Energy Commodities
This indicator displays compact seasonal mini-charts for major energy markets directly on the price chart. It is designed to provide a quick visual reference for historical seasonal tendencies without disturbing the main candle scaling or chart zoom.
The dashboard includes four energy seasonality panels:
Gasoline | from 1985 to 2020
Crude Oil | from 1984 to 2020
Heating Oil | from 1980 to 2020
Natural Gas | from 1991 to 2020
Each panel contains two seasonal curves:
Blue Line — All Years Average
Shows the average historical seasonal path using all available years from the start year through 2020.
Yellow Line — Weighted Average
Shows a weighted seasonal curve that gives more importance to recent historical behavior while still preserving the broader long-term seasonal structure.
The indicator uses a fixed 365-day seasonal structure, allowing traders to observe how each energy market has historically behaved throughout the calendar year. The mini-charts are drawn as independent widgets using price-space positioning, so they do not interfere with the main price chart, candle scaling, or zoom behavior.
Key Features
Four energy commodity seasonality panels
Historical data from each market’s start year to 2020
All Years and Weighted Average seasonal curves
Compact dashboard-style layout
Auto dark/light theme support
Adjustable widget width, spacing, height, and position
Designed to avoid chart-scaling distortion
Useful for seasonal bias, timing context, and macro/commodity market analysis
How to Use
Use the blue and yellow curves as a seasonal reference, not as standalone buy or sell signals. When both curves point in the same direction during a specific part of the year, that period may represent a historically stronger seasonal tendency. The signal is more useful when combined with trend, support/resistance, volume, fundamentals, and broader market context.
Important Note
This indicator is based on historical seasonal data only. Seasonality does not guarantee future price movement. Market structure, supply-demand conditions, geopolitical events, interest rates, weather, and macroeconomic factors can override historical seasonal tendencies. Gösterge

Tomukas Elite SMCTomukas Elite SMC is a premium Smart Money Concepts strategy designed to focus on high-probability institutional setups instead of frequent signals.
The strategy combines three core concepts into a single trading framework:
Liquidity Sweeps
Market Structure Shift (MSS/BOS)
Fair Value Gap (FVG) Retracement
Rather than chasing price, the strategy waits for liquidity to be taken, confirms a genuine shift in market structure, and enters only after price retraces into an imbalance. This approach aims to filter out low-quality trades and improve overall consistency.
Key Features
Non-repainting signals
Higher-timeframe trend confirmation
Liquidity sweep detection
MSS/BOS confirmation using candle closes
Automatic Fair Value Gap detection
Session filter (London & New York)
ATR volatility filter
Built-in risk management
Break-even automation after TP1
Runner management for extended trends
Strategy Tester compatible
The strategy is designed for traders who value patience and precision over constant market participation. By waiting for multiple confirmations to align, it seeks to reduce false entries while maintaining favorable risk-to-reward opportunities.
Best suited for: Gold (XAUUSD), major Forex pairs, and indices on lower timeframes such as 1M, 3M, and 5M.
As with any trading strategy, no setup guarantees profits. Proper risk management, disciplined execution, and thorough testing are essential before using it with live capital. Strateji

DAX Universe Relative Strength & Volume Quality [JS]DAX Universe RS & Volume Quality is a relative strength and pullback quality indicator designed for German stocks from the DAX, MDAX, SDAX and TecDAX universe.
The indicator measures a stock’s weighted relative performance against an equal-weighted German equity benchmark made from DAX, MDAX, SDAX and TecDAX. The relative strength model is inspired by IBD / Minervini-style momentum analysis, giving more weight to recent performance while still considering the medium- and longer-term trend.
Relative Strength Model:
• 40% weight: approx. 3-month performance
• 20% weight: approx. 6-month performance
• 20% weight: approx. 9-month performance
• 20% weight: approx. 12-month performance
The result is displayed as a percentage relative to the German stock universe benchmark:
• RS above 0% = the stock is outperforming the benchmark
• RS below 0% = the stock is underperforming the benchmark
• RS above the user-defined strength threshold = RS STARK / strong relative strength
In addition to relative strength, the indicator includes a High-Volume Down-Day filter. This helps assess whether a pullback is still constructive or whether distribution pressure may be increasing. The user can define:
• Lookback period
• Minimum loss required for a down-day to count
• Volume moving average length
• High-volume factor
• Maximum allowed High-Volume Down-Days
The simplified status box highlights the current setup condition using color:
• Green = strong relative strength and acceptable volume quality
• Yellow = positive or improving relative strength, but not yet ideal
• Red = weak relative strength or too many High-Volume Down-Days
The textbox position, size, width and height can be adjusted in the indicator settings.
This indicator is designed as a decision-support and screening tool for relative strength, pullback quality and German stock leadership analysis. It is not an official IBD RS Rating and does not provide financial advice or automatic buy/sell recommendations. Always combine it with your own chart analysis, risk management and market context. Gösterge

Aquila Price Levels - Multi-Timeframe Institutional Levels 🦅 Aquila Price Levels - Multi-Timeframe Institutional Levels
The "Aquila Price Levels v1.1" script is a structural analysis tool developed to simultaneously map and visualize critical price levels across Daily (D), Weekly (W), and Monthly (M) timeframes directly on the operational chart.
The Importance of a Unified Visualization (Single Board):
Having a comprehensive overview of macro and micro levels in a single interface is critical for reading Order Flow and market structure. This centralized approach eliminates noise and the constant need to switch timeframes, allowing the user to:
Identify Confluences: Highlights zones where levels from different timeframes (e.g., Previous Week High and Current Daily Open) intersect, defining high-probability order blocks.
Map Liquidity: Makes external liquidity targets (PDH, PDL, weekly and monthly highs/lows) immediately visible. These are the primary targets exploited by algorithms and institutional players for positioning.
Define the Bias: Evaluating the real-time price position relative to macro Opens provides an objective reading of both short-term and long-term directional bias.
Manage Equilibrium Areas: Tracking the medians (H+L)/2 provides constant reference points for mean reversion setups.
Main Features:
Multi-Timeframe Tracking (Current & Previous): Automatic calculation and plotting of Open, High, Low, Close, and Median for the day, week, and month (both currently updating and previously consolidated).
Smart Label Management: The system dynamically groups labels on the horizontal axis if levels fall within a configurable tolerance threshold, preventing visual overlapping on the chart.
Summary Table (Dashboard): An integrated visual matrix (freely positionable) that summarizes the exact numerical values of all D/W/M levels, acting as an immediate control panel.
Operational Tooltips: Hovering over the price labels provides technical descriptions of the level's significance (e.g., directional watershed, macro wall, liquidity trap).
UI Customization: Total control over line thickness, styles, opacity for current periods, and label offsets.
Practical Application:
Particularly optimized for highly technical and volatile assets like XAUUSD (Gold), where millimeter precision on historical liquidity grabs and reactions to macro levels dictates the profitability of the operational setup.
🦅 Royal Eagles - Born to fly, born to dare. Gösterge

Linda Raschke MACD + Stochastic# Linda Raschke MACD + Stochastic
This indicator combines a fast **MACD (3,10,16)** with a **Stochastic Oscillator (7,10,3)**, inspired by trading concepts commonly associated with professional trader Linda Raschke.
Instead of relying on a standard MACD (12,26,9), this version uses a faster configuration to detect short-term momentum shifts and potential trend changes more quickly.
## Features
* MACD (3,10,16)
* Stochastic (7,10,3)
* Automatic BUY and SELL signals
* Momentum confirmation using both indicators
* Built-in alert conditions
* Designed for day trading and swing trading
## Buy Signal
A BUY signal is generated when:
* The MACD line crosses above the Signal line.
* The Stochastic forms a bullish Hook, indicating momentum is turning upward.
## Sell Signal
A SELL signal is generated when:
* The MACD line crosses below the Signal line.
* The Stochastic forms a bearish Hook, indicating momentum is turning downward.
Signals are displayed only when both conditions occur together, helping reduce false entries.
## Recommended Usage
This indicator is intended to be used as a momentum confirmation tool rather than a standalone trading system.
For better trade selection, consider combining it with:
* 3 EMA & 10 EMA
* ATR Trailing Stop
* Previous Day High / Low
* Support & Resistance
* Price Action Analysis
## Disclaimer
This indicator is provided for educational and informational purposes only. It does not guarantee profitable trades and should always be used alongside proper risk management and independent market analysis.
Gösterge

Price Acceleration Flow (PAF)Price Acceleration Flow (PAF)
Price Acceleration Flow (PAF) is an original momentum indicator designed to measure the rate at which price movement accelerates or decelerates. Instead of relying on traditional oscillators, PAF analyzes changes in price velocity, candle efficiency, and relative trading activity to identify developing market momentum.
By focusing on acceleration rather than absolute price movement, PAF helps traders recognize trend continuation, weakening momentum, and potential reversal zones before they become obvious on the chart.
Key Features
Original price acceleration algorithm
Measures momentum through changes in price velocity
Volume-adjusted flow calculation for stronger signal quality
Dynamic signal line for trend confirmation
Early identification of bullish and bearish momentum shifts
Built-in Buy and Sell alerts
Lightweight, non-repainting Pine Script v6 design
Compatible with Forex, Crypto, Stocks, Indices, and Commodities
How to Use
Bullish Signal: PAF crosses above the signal line, indicating increasing buying momentum.
Bearish Signal: PAF crosses below the signal line, suggesting strengthening selling pressure.
Strong Trends: Large positive or negative values indicate accelerating market participation.
Sideways Markets: Flat or low-amplitude readings suggest weak momentum and possible consolidation.
Price Acceleration Flow (PAF) is designed as a confirmation tool and performs best when combined with price action, market structure, and disciplined risk management. It helps traders focus on high-momentum opportunities while filtering out low-conviction market conditions. Gösterge

Gösterge

Best Sessions - New York, London & Asia - Xcelerate TradeXcelerate — Best Sessions: New York, London & Asia | Xcelerate Trade
A professional session-mapping overlay from the Xcelerate Trade team. It highlights the three major forex / index trading windows — Asia, London (Europe) and New York — plus a full daily range toolkit, all anchored to America/New_York (EST/EDT). Built for intraday traders who plan entries around session highs/lows, daily open/close and kill-zone timing.
What you get on the chart
Three session boxes (intraday only)
Each session draws a live box from session open to the current bar, then freezes it as history when the session ends:
Session Default window (EST) Color
Asia
20:00 → 05:00
Yellow
London
03:00 → 12:00
Blue
New York
09:30 → 16:00
Red
Live box — grows with price during the active session (high/low tracked in real time).
Historical boxes — completed sessions saved to chart history (FIFO cap per session).
Outline-only mode — optional per session: border highlight with transparent fill (“Daily Highlights” style).
Session times are fully editable via input.session — adapt them to your broker’s server time or personal kill-zone preferences.
Daily box (00:00 → 24:00 NY)
Current day — live lime box from midnight NY to midnight NY, expanding with the day’s high/low.
Historical days — completed daily ranges saved to history (default keep: 31 days).
Outline-only — optional transparent fill for a cleaner chart.
Daily high / low labels
D Hi and D Lo labels at the exact timestamp of the day’s extreme.
Separate toggles for historical and live labels.
Customizable colors, decimal precision and vertical offset (ticks).
Daily open / close lines
Horizontal Open line (purple by default) and Close/Last line (gray) spanning the full NY trading day.
Optional historical and live price labels on the lines.
Label placement by ticks or percentage offset from the daily range.
Global controls
Show Asia / Europe / New York — master toggles to hide entire sessions without digging into each group.
Per-session history — independent keep limits (default 31 sessions each).
Smart drawing guards — automatic FIFO caps scaled to your timeframe so you never hit TradingView’s object limits (boxes, lines, labels). Works from 1-second charts up to monthly.
Timezone accuracy
All session detection and daily rollover use America/New_York consistently:
Session time() checks use the NY timezone string.
Daily box boundaries use timestamp(TIMEZONE, …) at 00:00 NY.
Daily open pulled via request.security(..., "1D", open) for alignment with the daily candle.
This keeps Asia / London / NY boxes and the daily box synchronized — no drift between session logic and daily logic.
Suggested settings
Forex (EURUSD, GBPUSD, XAUUSD) on 1m–15m: all three sessions ON, daily box + D Hi/Lo labels ON, open/close lines ON.
US indices (SPX, NQ) on 1m–5m: focus on New York session; optionally hide Asia if your broker’s overnight session is quiet.
Cleaner chart: enable Outline only on sessions and/or daily box; turn off historical labels if you only care about today.
Higher timeframes (1H+): session boxes auto-disable on daily+ charts (isIntraday guard) — only the daily toolkit remains active.
Inputs overview
Group What you control
Session schedules
Asia / London / NY time windows
Colors
Fill + border per session and daily
Daily Box
Historical + live, outline mode
Daily Labels
Hi/Lo labels, colors, offsets
Asia / London / NY
Per-session historical + live toggles
GLOBAL
Master show/hide per session
Daily Lines
Open/Close lines + labels
Promo Banner
Flash timing (minutes hidden / seconds visible)
Notes & disclaimers
Session boxes appear on intraday timeframes only (below 1D). On daily/weekly charts the session engine is disabled automatically.
Session boxes track the high/low range inside the window, not volume or order flow — use them as a time + range reference, not as a signal generator.
Default session times follow common EST conventions; verify against your broker if you trade instruments with different session cuts (e.g. futures RTH vs ETH).
Pine Script v6.
Built and maintained by the Xcelerate Trade team. Asia, London and New York session boxes + daily range, Hi/Lo labels and open/close lines — all in one clean, NY-timezone-aware overlay.
Gösterge

Gösterge

Fix PIPS - 4 Sessions - FRA / LDN / NY / ASIA4 Sessions draws High/Low range boxes for the four major market sessions — Frankfurt, London, New York and Tokyo.
HOW IT WORKS
Each session is a translucent box that tracks the session's running High/Low as it develops. Session hours are defined in each market's home timezone (Europe/Berlin, Europe/London, America/New_York, Asia/Tokyo), so the boxes always land in the right place regardless of your chart's timezone, and DST transitions in every region are handled automatically — nothing to adjust twice a year.
DEFAULT HOURS (exchange hours, editable)
• Frankfurt — 08:00–09:00 (Xetra open, the hour before London)
• London — 08:00–16:30
• New York — 09:30–16:00 (NYSE)
• Tokyo — 09:00–15:00 (TSE)
SETTINGS
One row per session: enable toggle, color (set fill opacity right in the color picker) and hours. Weekdays only — no weekend boxes on 24/7 markets like crypto. Works on intraday timeframes. Optional on-chart info note with a UA/EN/RU language switch.
ALERTS
Alert conditions fire on each session open (Frankfurt, London, New York, Asia). Gösterge
