Candle Volume Architecture [JOAT]
Candle Volume Architecture
Introduction
Candle Volume Architecture is an overlay indicator that constructs a price-based volume distribution profile for each detected swing, identifies the Point of Control (the price level with the highest bar density within that swing), calculates a configurable Value Area (default 70% of distribution), and renders these findings as a visual volume architecture directly on the price chart. Unlike traditional Volume Profile tools that require fixed time periods or session boundaries, this indicator auto-detects swings from price action and builds its distribution profile dynamically around each structural move.
Volume Profile is a professional tool used to identify price levels with the highest historical trading interest. The Point of Control is the level within any period where the most trading occurred — it functions as a gravitational center that price tends to revisit. The Value Area contains the majority of trading activity and often provides support and resistance as price moves away from and returns to it. This indicator applies these concepts to auto-detected price swings rather than calendar periods, aligning the profile with actual market structure rather than arbitrary time divisions.
Core Concepts
1. Swing Detection
Swings are detected by tracking when price makes a new extreme and then retreats. An upper swing is confirmed when the prior bar's high matched the N-bar highest high, but the current bar fails to match — indicating the swing high has been set. The same logic applies to lower swings. This produces swing high and low markers that update as new extremes form.
2. Volume Distribution Profile
When a swing direction change is detected (bull to bear or bear to bull), the prior swing's price range is divided into a configurable number of bins (default 24). Each bin is populated by counting how many bars within the swing had their closing price fall within that bin's price range. The bin with the highest count becomes the Point of Control.
bin_size = (real_top - real_bot) / i_bins
for j = 0 to bars_in_range
idx = int((close - real_bot) / bin_size)
bins_count.set(idx, bins_count.get(idx) + 1)
3. Point of Control (POC)
The POC is the bin with the highest bar count. It is rendered as a dual-width line (thin solid + thick shadow) that extends forward in time, providing a live reference for where the most concentrated activity occurred in the last swing.
4. Value Area Calculation
Starting from the POC, the Value Area expands outward, adding the next highest-count bin on either side until the cumulative count reaches the configured percentage of total bars (default 70%). The Value Area is rendered as a transparent box covering the identified price range.
5. Profile Bin Visualization
Each bin is rendered as a box whose right edge extends proportionally to its bar count (wider = more activity). Opacity scales with count, so the POC bin is fully opaque and low-count bins are more transparent. This produces a horizontal bar chart appearance directly on the price chart.
Features
Auto-Detected Swing Profiles: Profile builds and renders at each swing direction change
Point of Control Line: Dual-width shadow line extending from each swing, updated to current bar
Value Area Box: Transparent zone covering the configurable percentage of swing volume
Opacity-Scaled Bin Bars: Visual profile bars with count-proportional width and transparency
Swing Range Outline: Dashed box delineating each swing's high-to-low range
Live Swing Direction Line: Current swing trend line drawn on the last bar
POC Proximity Detection: Dashboard highlights when price is within 0.3 ATR of the active POC
8-Row Dashboard: Swing trend, POC level, swing high/low, swing range, POC bias
Input Parameters
Swing Length: N-bar highest/lowest lookback for swing detection (default: 80)
Profile Bins: Number of price bins in the distribution (default: 24)
POC Line Width: Width of the POC rendering line (default: 2)
Value Area %: Percentage of distribution to include in the Value Area (default: 70%)
Show Profiles: Filter to bull only, bear only, both, or none
How to Use This Indicator
POC as Reference
The active POC line represents the most contested price level of the last swing. Price frequently revisits this level. When price is above the POC, the POC functions as potential support. When price is below, potential resistance.
Value Area as Context
Price outside the Value Area (above VAH or below VAL) represents a less-active price zone. Moves outside the Value Area that fail to hold can return toward the Value Area. Sustained acceptance outside the Value Area suggests a new distribution is forming.
Profile Shape for Sentiment
A profile that is skewed toward the top of its range (POC near the high) suggests the swing was dominated by higher-price acceptance — bullish distribution. A POC near the swing low suggests bearish distribution.
Limitations
The distribution is built from closing prices within the swing range, not from actual volume at price. This is a close approximation but differs from true Volume Profile tools that use tick data
The swing detection requires a minimum of swing-length bars before the first profile is generated
On very fast timeframes (1 minute or lower), the swing lengths may be too short to produce meaningful distributions
The maximum bars in range cap (500 bars) prevents the profile builder from analyzing excessively long swings that could cause performance issues
Originality Statement
Applying Volume Profile methodology to auto-detected price swings rather than fixed calendar periods produces profiles that are structurally relevant rather than time-arbitrary. The opacity-scaled bin rendering produces an intuitive visual representation where the most active levels are immediately obvious. The real-time POC proximity detection in the dashboard provides an active alert when price approaches the most significant level of the last swing.
Disclaimer
This indicator is for educational and informational purposes only. The distribution profiles are approximations built from close price counts, not true order flow data. Point of Control and Value Area levels are historical references and do not guarantee future price reactions. Always apply proper risk management.
-Made with passion by officialjackofalltrades
指标

指标

BTC MTF Engulfing Flip Strategy (1H, 2X)BTC Flip Bot V1 — MTF Engulfing + SL-Flip (BTCUSDT 1H 2×)
Author: Jagadeesh Manne
Version: V1 — first public release (April 2026)
A multi-timeframe trend-following strategy with SL-flip extension for BTC perpetual futures.
⚠️ IMPORTANT: This strategy is tested and validated ONLY on BTCUSDT perpetual futures | 1H timeframe | 2× leverage. Do not apply to other pairs, timeframes, or leverage settings without independent testing.
⚠️ TradingView's chart timeframe affects how this strategy calculates. A red banner appears if the chart is not set to 1H — set the top-left TF to "1h" explicitly for results to match the published backtest.
⚠️ TradingView free/basic accounts cache only a limited number of bars (5K–20K). The TV backtest you see will cover only the most recent window of the full 6.5-year test. See the "Full backtest" section below for the authoritative Python numbers.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
Three timeframes must align simultaneously on a single 1H bar before a trade is taken:
🔹 DAILY — Trend Regime
Close > 50-period EMA for longs (below for shorts). Macro trend safety gate — rejects ~50% of all signals that would trade against the dominant trend.
🔹 4H — Momentum Confirmation
RSI(14) > 50 for longs (below for shorts). Medium-term momentum alignment.
🔹 1H — Entry Trigger (all 5 must be true on the same bar)
• RSI(14) > 45 for longs / < 55 for shorts
• MACD(12,26,9) line above/below signal line
• Bullish or Bearish engulfing candle (body > prior body) — the core trigger
• ATR(14) above 50-period average (volatility expanding)
• Volume above 1.5× 20-period SMA (participation spike)
Only ~1% of all engulfing candles pass all 7 filters across a 5-year period. This extreme selectivity is the edge.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STOP LOSS & PARTIAL TP
Main SL: Pattern-based (min of entry bar low + prior bar low, with 0.1% buffer). Capped at 2.5% from entry. Whichever is tighter wins.
Partial TP (tuned April 2026):
• At +6R favorable move, 15% of position closes
• After partial TP, SL moves to entry + 0.1% (break-even + fee buffer)
• Remaining 85% continues running with BE stop — captures fat-tail winners while protecting locked-in profit
Why 15%@6R (not 30%@5R)? Grid-search on 5yr data showed this variant lifts CAGR +11 percentage points vs the previous 30%@5R partial, because a small partial lets the runner portion capture the full fat-tail move when a trend plays out.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SL-FLIP EXTENSION
When main SL hits, the strategy queues an opposite-direction flip trade:
• Waits 1 hour after SL hit (lets whipsaw settle)
• Opens opposite direction with TIGHT 1.5% SL (vs main 2.5%)
• SL placed at swing high/low from last 10 bars OR 1.5% cap from broken SL — whichever is tighter
• No flip-on-flip cascade (prevents revenge trading)
• 24-hour time-stop on flip positions
• Flips respect DD halt + generic post-exit cooldown
Flip trades add a meaningful contribution over the non-flip baseline while keeping max drawdown unchanged.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXIT RULES
• Stop Loss hit → close (triggers flip if not already a flip)
• Partial TP at +6R → close 15%, SL moves to BE+0.1%, rest runs
• Opposite direction signal → close only (no flip-open on signals, only on SL)
• Flip time-stop at 24h → close
• Drawdown circuit breaker: -25% from peak halts all trading for 7 days
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK MANAGEMENT
• 2× leverage (tested at this level only)
• Position sizing: notional = equity × leverage (deploys full leverage on each trade)
• 24h same-direction cooldown after SL hit
• 2h generic post-exit cooldown (any direction)
• -25% drawdown halt pauses trading for 7 days
• Flip trades use tighter SL (1.5%) + 24h time-stop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FULL BACKTEST (Python, Binance futures historical data)
Period: September 2019 — April 2026 (~6.5 years)
Starting capital: $5,000
Leverage: 2×
Results (V1 with latest tuning: 15%@6R partial + BE+0.1% + SL-flip):
Start → Final: $5,000 → $181,943 (+3,539%)
CAGR: +105.3%
Max DD: -19.7%
Profit Factor: 4.63
Win Rate: 41.9% (31W / 43L)
Total Trades: 74 (~15/yr) — 38 Long, 36 Short, 9 of which were flips
SL hits: 40
DD halts triggered: 0
Tuning history (each change validated on 5yr data):
• Baseline V5 (no flip): +89% CAGR, PF 4.24, 43 trades
• V6 + SL-flip: +97% CAGR, PF 4.20, 79 trades (flips add more trade opportunities)
• V6 + BE-move after partial TP: PF 4.20 → 4.29 (kills runner-giveback)
• V6 + 15%@6R partial: CAGR 97% → 105%, PF 4.29 → 4.63 (current)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY TRADINGVIEW RESULTS DIFFER FROM PUBLISHED NUMBERS
Two reasons:
1. Bar history limit — TradingView loads a finite number of bars for strategy calculation. Free and basic plans only cover ~6–14 months of 1H data. The chart date header shows the full visible range, but the strategy only computes on the loaded bars. Premium plans load more history but usually still less than 6.5 years.
2. Indicator warmup — the Daily EMA50 filter needs ~50 daily bars (~2 months) of warmup data before producing stable values. Python skips the first 100 bars explicitly; Pine Script does not.
For production-accurate numbers, use the Python backtest values above. For a feel of the strategy's pattern, the TV preview is fine as an indication.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT TO EXPECT
This is NOT a high-frequency strategy:
• ~15 trades per year including flip trades
• Median wait between main signals: 7–10 days
• Longest historical quiet gap: ~2 months
• ~55% of trades stopped out (by design — fat-tail capture)
• Average winner >> average loser (each win is ~5–8× an average loss)
• Requires patience — extended quiet periods are normal, not a malfunction
• Fat tails matter: a few mega-winners (10%+ single trades) drive most of the CAGR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS (all configurable with tooltips)
Risk Management:
• Leverage: 2× (tested only at this level)
• Risk per trade: 1% (used for dashboard display)
• DD halt: -25% for 168 hours (7 days)
Stop Loss:
• SL max: 2.5% cap
• SL buffer: 0.1%
Partial Take Profit:
• TP trigger: 6R (sweep-verified peak)
• TP close: 15% of position
• SL-to-BE buffer after partial: 0.1% (kills runner-giveback)
Entry Filters:
• RSI long/short zones: 45 / 55
• Engulf body multiplier: 1.0× (any-size engulfing)
• ATR MA length: 50
• Volume SMA length: 20
• Volume spike ratio: 1.5×
Cooldowns:
• Same-dir SL cooldown: 24h
• Generic post-exit cooldown: 2h
SL-Flip:
• Enabled by default
• Flip wait: 1h
• Flip SL cap: 1.5%
• Swing lookback: 10 bars
• Flip time-stop: 24h
Visuals:
• Clean view toggle (default ON — hides dashboard for publishing)
• Daily EMA50 line toggle
• Timeframe advisory banner (red warning if chart TF ≠ 1H)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
• Past performance does not guarantee future results. Backtests can overfit, especially after extensive parameter tuning.
• Live performance will differ from backtest due to real slippage, partial fills, exchange latency, and market regime shifts.
• TradingView free/basic accounts show a limited window; the authoritative full backtest is Python + Binance archives.
• This strategy is designed for experienced traders who understand leverage, futures trading, stop losses, drawdown risk, and position sizing.
• Small sample size (74 trades over 6.5 years) means regime changes could meaningfully degrade performance. A flat 3–6 month period is not a strategy failure.
• The strategy depends on fat-tail winners. Missing one or two large trends can halve expected CAGR.
• 2× leverage amplifies both gains AND drawdowns. Use capital you can afford to lose entirely.
• Not financial advice — use at your own risk.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHANGELOG
V1 (April 2026 — first public release):
• Multi-timeframe entry: Daily EMA50 + 4H RSI + 1H (RSI + MACD + Engulfing + ATR + Volume)
• Pattern-based SL with 2.5% cap
• Partial TP: 15% at +6R (small partial for maximum fat-tail capture)
• SL-to-BE move after partial TP (kills runner-giveback)
• SL-flip extension: opposite-direction entry after SL hit with tight 1.5% SL
• 24h same-direction cooldown + 2h generic cooldown
• -25% DD halt for 7 days
• Clean-view toggle for minimal chart display
• Timeframe-mismatch advisory banner
策略

Swing Fibonacci [BigBeluga]Swing Fibonacci is a high-precision geometric framework that merges traditional swing structure with parametric spiral projections. Unlike standard Fibonacci retracements that use static horizontal lines, this tool projects expanding harmonic spirals from major structural turning points to map out the "natural geometry" of the market.
By calculating the mathematical relationship between price volatility and time, the indicator identifies expansion shells where price is naturally inclined to react, stall, or reverse.
🔵 CONCEPTS
Macro Swing Detection: The engine utilizes a high-threshold lookback window (50–100 bars) to filter out market noise. It only identifies the most significant structural pivots, ensuring the spirals are anchored to "institutional" levels rather than minor retail fluctuations.
Anchor Points & Structural Mapping: At every confirmed trend reversal, the script anchors a ⦾ symbol. It then draws a solid "Swing Leg" connecting the current anchor to the previous one, providing a clear visual map of the market's structural transitions.
Parametric Fibonacci Spirals: The spirals are generated using a high-resolution 300-step parametric calculation. This ensures the curve remains perfectly smooth and mathematically accurate regardless of how many bars are on the screen.
Adaptive Price Normalization: To prevent the "squashed" look common in geometric tools, the spiral dynamically rescales itself based on the price range of the last 500 bars. This ensures the geometry stays proportional to current market volatility.
🔵 FEATURES
Institutional Data Dashboard: Located in the top-right corner, the dashboard provides real-time stats including the exact Anchor Price , the current Trend Status (BULLISH ▲ or BEARISH ▼), and the Swing % move from the low/high.
Real-Time Swing Tracking: A dynamic dashed line follows the current price, connecting it back to the active anchor point. This allows you to visualize the current "swing in progress" before it is finalized.
Parametric Control Suite:
• Radius: Adjusts the vertical "stretch" and overall size.
• Spiral Qty: Controls the number of rotations (up to 10) to project further into the future.
Color Flow Visualization: The spirals utilize a professional gradient transition from the bearish color (inner) to the bullish color (outer), visually representing the expansion of price energy.
🔵 HOW TO USE
Identify Reaction Zones: Price often treats the edges of the spiral curves as dynamic support and resistance. Look for "confluence" where a spiral curve intersects with a horizontal level or a previous swing point.
Forecasting Expansion:
• Bullish Spiral: Projects outward from a swing low, highlighting potential take-profit zones or areas where the trend might exhaust.
• Bearish Spiral: Projects from a swing high, identifying "expansion floors" for short positions.
Trend Confirmation: Use the Trend Squares at the bottom of the chart for a quick pulse on the current directional bias without cluttering the main price action.
Harmonic Timing: The spiral's horizontal reach provides a "time" component. If price reaches a specific spiral arc at a specific time, it often marks a high-probability turning point in the cycle.
🔵 CONCLUSION
Swing Fibonacci transforms abstract price action into a tangible geometric forecast. By anchoring dynamic, price-normalized spirals to the market’s strongest turning points, it provides a unique lens through which to view volatility, extension, and mean reversion.
Ideal for harmonic traders, swing analysts, and anyone looking for a deeper mathematical edge in their structural analysis. 指标

指标

指标

SFP Trend & VWAP Liquidity Pro [Zofesu]SFP Trend & VWAP Liquidity Pro is an overlay indicator that combines three concepts into a unified liquidity sweep detection system: Swing Failure Pattern detection, real-time swing high/low liquidity tracking, and dual independent trend filtering via VWAP or MA.
The three components are interdependent — SFP signals are only valid when the sweep direction aligns with both trend filters. Without the filters, SFP signals are too frequent and unreliable. Without the SFP engine, the filters alone are standard trend tools. The combination produces high-probability reversal entries at institutional liquidity levels.
─────────────────────────────────────
01 — What is STVL Pro?
─────────────────────────────────────
STVL Pro detects Swing Failure Patterns (SFP) — moments when price sweeps beyond a prior swing high or low, trapping breakout traders, then closes back inside the range. These are classic institutional liquidity grabs at known stop-loss clusters.
The indicator tracks the most recent swing high and low in real time, draws them as horizontal liquidity lines, and fires a BULL or BEAR SFP label only when:
— A liquidity sweep is detected AND
— Both trend filters confirm the reversal direction
─────────────────────────────────────
02 — Why This Combination?
─────────────────────────────────────
SFP patterns occur at all swing highs and lows — most are low quality. The dual VWAP/MA filter solves this by requiring the sweep to occur in a context where institutional bias supports the reversal.
Example: A bullish SFP (sweep below swing low, close back above) is only labeled if price is also above both Filter A and Filter B. This confirms the sweep happened in a bullish macro context — not against the institutional trend.
This filtering approach significantly reduces false signals compared to raw SFP detection.
─────────────────────────────────────
03 — SFP Engine
─────────────────────────────────────
The script tracks market structure using a configurable Swing Lookback Period (default 150 bars).
Bullish SFP conditions:
— Current low < last swing low
— Current close > last swing low
— Previous low > last swing low (first bar to breach)
Bearish SFP conditions:
— Current high > last swing high
— Current close < last swing high
— Previous high < last swing high (first bar to breach)
This three-condition check ensures only clean, confirmed sweeps trigger — not extended wicks or multi-bar breaches.
─────────────────────────────────────
04 — Dual Trend Filter (Filter A & B)
─────────────────────────────────────
Two independent filters run simultaneously. Each can be set to:
VWAP — Anchored to Session, Week, Month, or Year.
HMA — Hull Moving Average for smooth trend detection.
EMA — Exponential MA for faster trend response.
SMA — Simple MA for clean institutional levels.
Off — Disable filter for raw SFP tracking.
Default: Both filters set to VWAP (Session anchor).
Filter A length: 2000 | Filter B length: 5000
The two filters use different sensitivities intentionally — Filter A is faster, Filter B is slower. A signal requires both to agree, providing multi-scale trend confirmation.
─────────────────────────────────────
05 — Visuals
─────────────────────────────────────
BULL SFP label (green) — bullish sweep confirmed by both filters
BEAR SFP label (red) — bearish sweep confirmed by both filters
Upper Liquidity Line (red) — current swing high being monitored
Lower Liquidity Line (green) — current swing low being monitored
Filter A line — color changes based on price position relative to filter
Filter B line — color changes based on price position relative to filter
─────────────────────────────────────
06 — Settings
─────────────────────────────────────
Filter A / B Type — VWAP, HMA, EMA, SMA, or Off
Filter A / B Length — smoothing period when using MA types
VWAP Reset (Anchor) — Session, Week, Month, Year, None
Swing Lookback Period — default 150 bars
For scalping: reduce Lookback to 50–75, use Session VWAP.
For swing trading: keep 150+ lookback, use Month or Year VWAP anchor.
─────────────────────────────────────
07 — How To Use
─────────────────────────────────────
Step 1 — Monitor the red and green liquidity lines
These represent the current swing high and low being watched.
Step 2 — Watch for a sweep
Price moves beyond the line — this is the potential SFP forming.
Step 3 — Wait for the label
BULL or BEAR SFP label appears only on confirmed close back inside the range with both filters aligned. Do not anticipate — wait for the closed candle.
Step 4 — Enter on the next candle
The label appears on the sweep candle after close. Entry is on the opening of the next candle with SL beyond the sweep wick.
Works on all asset classes: Indices, Forex, Gold, Oil, Crypto.
Best timeframes: H1, H4, D1. 指标

Swing + Value Setup [Marcos]Swing + Value Setup — Descripción para TradingView
Título sugerido
Swing + Value Setup — Multi-Filter Entry Signal
Descripción (inglés — recomendado para mayor alcance)
🎯 What is this indicator?
Swing + Value Setup is a multi-condition entry filter designed for swing traders looking for high-quality setups in stocks with strong technical and structural foundations. Instead of relying on a single signal, this indicator requires 6 simultaneous conditions to be met before printing an entry label — dramatically reducing false signals and noise.
It also features a real-time status panel that shows exactly which conditions are passing or failing on any given bar, so you always know how close a setup is to triggering.
⚙️ How it works
The indicator combines trend, momentum, volume, and structure analysis into a single unified signal:
✅ 6 Required Conditions (all must be true simultaneously):
Price above EMA 200 — confirms the stock is in a long-term uptrend
Supertrend bullish — active trend filter, eliminates choppy/sideways markets
RSI between 40–55 — entry during healthy pullback, not extreme oversold
MACD signal — bullish crossover OR histogram rising below zero (momentum recovering)
OBV above its EMA — confirms institutional accumulation behind the move
Pullback to EMA 21 or EMA 50 (±1.5%) — optimal entry zone, not chasing price
⭐ High Conviction Bonus:
When a bullish RSI divergence is also detected (price making lower lows while RSI makes higher lows), the label upgrades to a High Conviction signal — historically the strongest setups.
📊 Visual elements
EMA 21 / 50 / 200 plotted directly on price
Supertrend line changes color with trend direction
Green background shading when a valid setup is active
Brighter shading for high conviction entries
Labels printed at signal candles (standard ✅ or high conviction 🎯)
Status table (top-right corner) showing live ✅/❌ for each condition
🔔 Built-in Alerts (3 total)
AlertTriggerSetup Swing/ValueAll 6 conditions met for the first timeSetup ALTA CONVICCIÓN ⭐Full setup + RSI divergence confirmedDivergencia RSI BullishBullish divergence in uptrend (early warning)
Set alerts from the indicator menu → Add Alert → select the condition.
🕐 Recommended Timeframes
TimeframePurposeWeeklyOverall bias and macro structureDailyPrimary signal timeframe (recommended)4H / 1HEntry timing and fine-tuning
Best results on Daily charts for swing positions of 5–30 days.
📐 Trade Management (suggested)
Stop Loss: Below the signal candle low or EMA 50
Target 1: Prior resistance / VPVR high-volume node
Target 2: Fibonacci 1.272 or 1.618 extension
Minimum R:R: 1:2.5
⚠️ Disclaimer
This indicator is a technical analysis tool only. It does not constitute financial advice. Always manage your risk, use stop losses, and do your own research before entering any trade. Past performance of any indicator does not guarantee future results.
Descripción (español — versión alternativa)
🎯 ¿Qué es este indicador?
Swing + Value Setup es un filtro de entrada multi-condición diseñado para swing traders que buscan setups de alta calidad en acciones con estructura técnica sólida. En lugar de depender de una sola señal, el indicador exige que 6 condiciones se cumplan simultáneamente antes de generar una señal — reduciendo drásticamente las falsas entradas y el ruido del mercado.
Incluye un panel de estado en tiempo real que muestra exactamente qué condiciones están activas o fallando en cualquier vela, para que siempre sepas qué tan cerca está un setup de activarse.
⚙️ Cómo funciona
✅ 6 Condiciones obligatorias (todas deben cumplirse a la vez):
Precio sobre EMA 200 — confirma tendencia alcista de largo plazo
Supertrend alcista — filtra mercados laterales y tendencias bajistas
RSI entre 40 y 55 — entrada en pullback sano, sin sobreventa extrema
Señal MACD — cruce alcista O histograma subiendo bajo cero
OBV sobre su media — confirma acumulación institucional detrás del movimiento
Pullback a EMA 21 o EMA 50 (±1.5%) — zona de entrada óptima sin perseguir precio
⭐ Bonus Alta Convicción:
Cuando además se detecta una divergencia bullish en RSI (precio haciendo mínimos más bajos mientras el RSI hace mínimos más altos), la señal se convierte en Alta Convicción — históricamente los setups más fuertes.
🔔 Alertas incluidas
Setup Swing/Value — cuando se cumplen las 6 condiciones
Setup Alta Convicción ⭐ — setup completo + divergencia RSI
Divergencia RSI Bullish — aviso temprano de posible giro
⚠️ Aviso legal
Este indicador es únicamente una herramienta de análisis técnico. No constituye asesoramiento financiero. Gestiona siempre tu riesgo y realiza tu propio análisis antes de operar.
swing trading value ema supertrend rsi macd obv multi-condition stocks entry signal divergence trend following pullback screener alerts 指标

指标

[ A L P H A X ] Swing Architect Predictive Swing Mapping AlphaX Swing Architect – Predictive Swing Mapping, Fibonacci Target Projection & Exhaustion Detection
AlphaX Swing Architect is a professional-grade swing analysis and projection system built on a proprietary multi-factor swing engine. It detects completed swing highs and lows, measures their historical characteristics, and projects where the next swing is statistically likely to terminate — using Fibonacci-scaled target zones, time-based duration estimates, and real-time exhaustion tracking. Designed for swing traders and intraday position traders on XAUUSD, indices, forex, and crypto.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Swing Engine — How It Works
At the core of AlphaX Swing Architect is a dynamic swing detection system that identifies confirmed swing highs and swing lows using adaptive highest/lowest scanning across a configurable lookback window. Unlike simple pivot detection, this engine waits for structural confirmation — a swing high is only registered when price breaks below a new high after establishing it, and a swing low is only registered when price breaks above a new low after establishing it.
Once a swing completes, the engine measures three critical properties:
Swing Size — The percentage move from swing high to swing low (or vice versa)
Swing Duration — How many bars the swing took to complete
Swing Velocity — The speed of the move (percentage per bar)
These measurements are stored in a rolling historical buffer (configurable from 3 to 25 samples). The engine then uses this history to project where and when the current swing is likely to end.
Three projection methods are available:
Average — Balanced projection using the arithmetic mean of all samples
Median — Outlier-resistant projection using the middle value
Weighted — Recency-biased projection where recent swings carry more influence than older ones
The Weighted method adapts fastest to changing market conditions — ideal for instruments that alternate between calm and volatile phases.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Six Analysis Layers
AlphaX Swing Architect combines six independent analysis layers into a single cohesive system:
1 ─ Swing Zones (Shaded Boxes)
Shaded boxes mark the confirmed swing high and swing low levels. Each box extends forward to the projection offset and displays:
The exact price level of the swing point
Volume data — Buy volume sum at swing lows, Sell volume sum at swing highs
Directional arrows — ▲ for support zones (swing lows), ▼ for resistance zones (swing highs)
The boxes are expanded vertically using ATR-based padding so the text sits clearly inside the zone without overlapping with price action. Box colors follow the AlphaX theme — green for bullish swing lows (support), red for bearish swing highs (resistance).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2 ─ Swing Leg Lines
Solid colored lines connecting swing highs to swing lows — green for bullish legs, red for bearish legs
Each completed swing leg is drawn as a solid line connecting the swing high to the swing low. This provides immediate visual context for the market's structural rhythm.
Green lines — Bullish swing legs (price moved from low to high)
Red lines — Bearish swing legs (price moved from high to low)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3 ─ Fibonacci Target Projection
This is the primary predictive feature. Based on the historical average swing size, four target levels are projected forward:
0.618 Level (Teal) — Conservative target. The minimum expected move if the swing follows historical patterns. Ideal for partial profit taking.
1.000 Level (Green/Red) — The full projected move based on historical average. This is the primary target — the dashed projection line terminates here.
1.272 Level (Orange) — Extended target. Reached during momentum continuation moves. Indicates the swing is stronger than average.
1.618 Level (Red) — Extreme target. Reached during blow-off tops or capitulation sell-offs. Indicates exceptional momentum — also a high-probability exhaustion zone.
Each level is displayed as a short horizontal marker with a label showing the Fibonacci ratio. The main projection line (dashed) connects the last swing point to the 1.000 target level and shows both the projected percentage move and the target price.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4 ─ Time Projection
Vertical dotted line showing the estimated number of bars until swing completion
Using the weighted average of historical swing durations, the engine projects how many bars the current swing is expected to last. This appears as a vertical dotted line at the estimated completion point.
Helps traders anticipate when a reversal might occur, not just at what price
Particularly useful for time-based strategies and options trading where timing matters as much as direction
Can be toggled on/off independently
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5 ─ Exhaustion Detection System
Orange warning label appearing when the current swing reaches the configurable threshold of the projected average
The exhaustion engine continuously tracks the current swing's progress as a percentage of the projected average swing size. When the current move reaches the configurable threshold (default 85%), a warning fires.
⚠ Exhaustion Warning — Appears on the chart showing current progress vs projected target (e.g., "⚠ 2.1% / 2.5%")
This is the highest probability reversal zone — historical data suggests the swing is running out of steam
The warning does not guarantee reversal but indicates that statistically, most swings of this instrument have completed by this point
Configurable threshold allows aggressive (70%) or conservative (100%) detection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6 ─ Confidence-Scored Reversal Signals
When the exhaustion system detects that a swing has reached its projected completion zone, the signal engine evaluates multiple confluence factors before generating an entry signal.
▲ Green Label (Bull Signal) — Dark text on green background. Fires when a bearish swing reaches exhaustion and a bullish reversal candle confirms.
▼ Red Label (Bear Signal) — White text on red background. Fires when a bullish swing reaches exhaustion and a bearish reversal candle confirms.
Each signal is classified into tiers based on confidence score:
S-Tier (75%+) — Highest probability. Strong trend alignment, high consistency, volume confirmation, deep exhaustion.
A-Tier (55–74%) — High probability. Most factors aligned but one or two may be neutral.
B-Tier (35–54%) — Moderate probability. Basic conditions met but some factors are weak.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Multi-Factor Confidence Scoring
Every reversal signal is scored by a real-time confidence engine that evaluates six independent factors:
Trend Alignment (up to 25 points)
HH/HL structure detected → bullish signal scores maximum
LH/LL structure detected → bearish signal scores maximum
Neutral structure → reduced score
Counter-trend signal → zero points (strongest filter)
Exhaustion Depth (up to 20 points)
Current swing has reached or exceeded the projected average size
Only fires when exhaustion warning is active
Historical Consistency (up to 20 points)
Measures how consistent historical swing sizes have been using statistical coefficient of variation
Higher consistency → more reliable projections → higher score
Erratic swing sizes → lower score → projections less trustworthy
Volume Confirmation (up to 15 points)
Volume delta within the current swing leg
Bullish signals score higher when sell volume dominates (selling exhaustion)
Bearish signals score higher when buy volume dominates (buying exhaustion)
Sufficient History (up to 10 points)
Full sample buffer filled → maximum score
Partial buffer → reduced score
Prevents signals from firing before enough data exists
Zone Proximity (up to 10 points)
How close price is to the projected target level
At or beyond target → maximum score
Still far from target → reduced score
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Trend Structure Analysis
The engine analyzes the sequence of swing highs and swing lows to determine the market's structural trend:
UPTREND — Higher highs and higher lows dominate recent swing history. Bullish signals carry maximum confidence. Bearish signals are penalized.
DOWNTREND — Lower highs and lower lows dominate. Bearish signals carry maximum confidence. Bullish signals are penalized.
NEUTRAL — Mixed structure. Both signal types receive moderate baseline scores.
The trend strength percentage shows how dominant the pattern is across the lookback window (configurable from 2 to 10 swings).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Volume Delta Analysis
Within each active swing leg, the engine separates volume into bullish (close > open) and bearish (close < open) components:
Buy Volume Sum — Total volume on bullish candles within the leg
Sell Volume Sum — Total volume on bearish candles within the leg
Delta Volume — Buy minus Sell — shows net buying or selling pressure
Volume Ratio — Delta as a percentage of total — shows conviction strength
This data is displayed both on the swing zone boxes and in the dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Dashboard Intelligence
A comprehensive AlphaX-branded dashboard provides real-time metrics organized into four sections:
Swing History
Individual percentage moves of the most recent completed swings
Color-coded from green (bullish) to red (bearish) with gradient intensity
Projection
Next swing direction and projected percentage size
Target price level
Projection method in use
Estimated duration in bars
Active Swing
Current progress as percentage of projected target
Exhaustion status (Active or Warning)
Current velocity compared to historical average (Fast / Normal / Slow / Crawling)
Analysis
Trend structure (Uptrend / Downtrend / Neutral) with strength percentage
Projection consistency score (High / Moderate / Low / Erratic)
Volume delta direction and magnitude
Total completed swing count
Current bull and bear signal confidence scores
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Swing Architect — Step by Step
Step 1 — Let History Build
Allow the indicator to detect at least 3–5 completed swings before acting on projections
Check the Dashboard: Is Consistency score above 50%? If not, projections are unreliable — wait for more data.
Step 2 — Identify the Active Swing
Look at the dashed projection line — it shows where the current swing is expected to terminate
Check the Fibonacci targets for multiple take-profit levels
Note the time projection — when is the swing expected to complete?
Step 3 — Monitor Exhaustion
Watch the Dashboard "Progress" row — it shows current swing size vs projected size
When progress exceeds 85% (or your configured threshold), the ⚠ exhaustion warning appears
This is the zone where reversals are most likely — prepare for a potential entry
Complete trade flow: Swing detection → Projection → Exhaustion warning → Reversal signal → Target
Step 4 — Enter on Confirmed Signal
Wait for a confidence-scored label (▲ or ▼) to appear
Check the tier — S-Tier and A-Tier signals have the highest probability
Enter in the signal direction with a stop loss beyond the swing extreme
Step 5 — Set Targets Using Fibonacci Levels
Use the 0.618 level for partial profit (conservative)
Use the 1.000 level for full projected target
Use the 1.272 and 1.618 levels for extended runners
Trail your stop as price moves through each level
Step 6 — Exit When Next Exhaustion Fires
When the new swing you entered reaches its own exhaustion zone, consider taking remaining profit
The cycle then repeats — wait for the next swing projection and reversal signal
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 Dynamic swing detection with structural confirmation — no repainting
📐 Fibonacci-scaled multi-target projection (0.618, 1.000, 1.272, 1.618)
⏱ Time-based duration projection — estimates when the swing may complete
⚠ Real-time exhaustion detection — warns when swing reaches statistical completion zone
📊 Three projection methods — Average, Median, and Weighted (recency-biased)
🧠 Multi-factor confidence scoring — trend, exhaustion, consistency, volume, history, proximity
▲▼ S/A/B Tier classified reversal signals with readable label colors
📈 Trend structure analysis — HH/HL/LH/LL pattern detection with strength scoring
📊 Volume delta analysis — buy vs sell volume within each swing leg
☁ Expanded swing zones with clear text positioning away from price action
📐 Comprehensive AlphaX-branded dashboard with four analysis sections
🎨 Cohesive dual-tone color theme — Green for bull, Red for bear, Orange for warnings
🔔 15+ alert conditions — swing changes, signals by tier, and exhaustion warnings
⚙ Fully configurable — all detection lengths, thresholds, and visual elements adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Swing Detection
Swing Detection Length — Bars used to find swing highs/lows (default: 30)
Pivot Confirmation Bars — Additional bars required to confirm swing validity
Projection
Future Projection Offset — How far targets are drawn into the future visually
Historical Swing Samples — Number of completed swings in the calculation buffer (default: 6)
Projection Method — Average, Median, or Weighted aggregation
Show Fibonacci Targets — Toggle the four Fib extension levels
Show Time Projection — Toggle the estimated duration marker
Swing Zones
Show Swing Zones — Toggle the shaded boxes at swing points
Show Swing Leg Lines — Toggle the connecting lines between highs and lows
Extend Zones Forward — Keep zones extending right indefinitely
Zone ATR Thickness — Controls the vertical size of the zone boxes
Exhaustion Detection
Show Exhaustion Warnings — Toggle the ⚠ warning labels
Exhaustion Threshold % — How much of the projected swing must be completed before warning (default: 85%)
Trend Context
Show Trend Context — Toggle HH/HL/LH/LL structure analysis
Trend Lookback Swings — How many swing points to analyze for structure (default: 4)
Signals
Show Entry Signals — Toggle reversal signal labels
Min Signal Confidence % — Minimum score required for a signal to display (default: 35%)
Signal Cooldown — Minimum bars between consecutive signals (default: 5)
Dashboard
Show Dashboard — Toggle the information panel
Position — Top Left, Top Right, Bottom Left, Bottom Right
Dashboard Text Size — Tiny, Small, Normal
Colors
Bull Primary / Bright / Dim — Green family for bullish elements
Bear Primary / Bright / Dim — Red family for bearish elements
Fib 0.618 / 1.000 / 1.272 / 1.618 — Individual Fibonacci level colors
Exhaustion Warning — Orange for warning elements
Neutral / Neutral Light — Gray for structural elements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
New Bullish Swing Started — Fires when swing direction changes to bullish
New Bearish Swing Started — Fires when swing direction changes to bearish
Swing Direction Changed — Fires on any direction change
S-Tier Bull / Bear Reversal — Confidence ≥ 75%
A-Tier Bull / Bear Reversal — Confidence 55–74%
B-Tier Bull / Bear Reversal — Confidence 35–54%
Any Bull / Bear / Any Signal — Combined alert conditions
Swing Exhaustion Warning — Fires when current swing enters the projected completion zone
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is tuned for XAUUSD (Gold) and major indices on the 5-minute to 1-hour timeframes :
Swing Detection Length at 30 captures meaningful swing structure without noise
6 historical samples provide balanced projection without excessive lag
Weighted projection method adapts to gold's alternating calm/volatile sessions
Exhaustion threshold at 85% catches most reversals before they fully form
Confidence minimum at 35% filters weak setups while keeping valid signals
For other instruments or timeframes, adjust:
Higher timeframes (4H, Daily) — Increase Swing Length to 40–60, increase Samples to 8–12
Lower timeframes (1m, 5m) — Reduce Swing Length to 15–25, keep Samples at 5–6
Forex majors — Use defaults or reduce Swing Length slightly for tighter swings
Crypto — Increase Swing Length to 35–50 (higher volatility creates wider swings)
Less noise — Increase Min Confidence %, increase Exhaustion Threshold, increase Swing Length
More signals — Decrease Min Confidence %, decrease Exhaustion Threshold to 75%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Swing Traders — Built specifically for identifying and projecting swing completion zones
📐 Fibonacci Traders — Automatic multi-level Fib projections based on actual historical swing data, not arbitrary levels
📊 Gold & Index Traders — Tuned for instruments with rhythmic swing behavior
🧠 Statistical Traders — Consistency scoring and confidence metrics provide a quantitative framework
⏱ Time-Based Traders — Duration projection helps anticipate when reversals may occur
📈 Traders who want a clean chart — No indicator soup. Zones, projections, and a dashboard — everything serves a purpose
⚠ Traders who struggle with exits — Exhaustion detection tells you when the move is statistically over
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All calculations are non-repainting — swing points are confirmed only after structural validation
Projections update in real-time on the last bar as new swing data becomes available
Dashboard updates on the last bar only for performance optimization
Volume analysis uses candle direction (close vs open) as a proxy for buy/sell pressure — this is an approximation, not true order flow
Maximum 500 labels, 500 boxes, and 500 lines are used — on very low timeframes with extended history, oldest drawings may be automatically removed by TradingView's rendering limits
The indicator requires at least 3 completed swings before projections become meaningful — allow sufficient chart history to load
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals and projections are generated from historical and real-time price data using mathematical and statistical calculations — their accuracy or profitability is not guaranteed. Past swing behavior does not guarantee future swing sizes or durations. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who demand clarity, confidence, and precision from their charts. 指标

指标

Objective Market Structure FrameworkThis library provides a systematic, rule-based approach to categorize market movements into four objective phases: Compression, Expansion, Distribution, and Consolidation.
Instead of subjective chart patterns, this tool uses volatility-relative thresholds (ATR) and momentum filters to identify significant trading ranges and structural breaks.
Main Use Cases:
Clear & Compact MTF Visualization: Map higher-timeframe (HTF) market structures directly onto your lower-timeframe (LTF) charts. Provides a clean, non-cluttered overview for an intuitive display of key levels without overcomplicating the chart.
Automated Setup Classification: Assign specific trading setups to distinct market regimes (Uptrends, Corrections, Sideways Ranges). Enables rapid, objective analysis every trading day, eliminating the need for manual re-evaluation or "hunting" for the current trend state.
Core Features:
Volatility-Adaptive: Range calculations scale automatically with the market's current ATR, making the analysis relevant across all asset classes.
MTF-Optimized Performance: Engineered for professional Multi-Timeframe workflows. Fetch 19 structural variables with a single request.security() call to minimize script load and prevent memory errors.
Momentum Validation: Distinguishes between high-conviction structural breaks and low-momentum "noise" using body-to-ATR ratios.
Reliability & Stability: Built-in Guard-Clauses protect against "Bar 0" and "NA" runtime errors, even when requesting lower timeframe data from a higher timeframe chart.
Key Parameters (Customizable Defaults):
Distribution Threshold (e.g. 1.2): Identifies price movement beyond the established range to confirm trend strength.
Compression (e.g. 1.5x ATR): Detects low-volatility buildup phases.
Expansion (e.g. 4.0x ATR): Flags explosive "Huge Range" impulses.
How to use (Educational Example included):
The source code contains a fully functional MTF Dashboard example (commented out at the bottom). It demonstrates how to map the library’s output variables into a visual trading interface, showing HTF trend alignment and real-time market phases.
Quick Start (Implementation):
import arnipoer/PriceActionStructure/1 as pa
// Single request for all 19 structural variables
=
request.security(syminfo.tickerid, "D",
pa.get_structure(true, 1.0, close, 14, 1.2, 1.5, 4.0))
// Example: Visualization
plot(strHigh, color=color.aqua, title="HTF Structure High")
bgcolor(hugeRange ? color.new(color.purple, 80) : na, title="Expansion Alert")
Disclaimer: No financial advice. Trading involves significant risk. This is an analytical tool for professional traders to build their own systematic strategies. 脚本库

Liquidity Structure Mapper [JOAT]Liquidity Structure Mapper
Introduction
The Liquidity Structure Mapper is an advanced market structure analysis tool designed to identify and visualize the key levels where institutional traders place their orders. This indicator goes beyond simple support and resistance by detecting swing points, equal highs/lows, liquidity zones, and the patterns that reveal professional market participation. Understanding market structure and liquidity is fundamental to successful trading - institutions don't enter at random levels, they hunt liquidity at specific price points, and this tool reveals those locations.
This indicator is built for traders who understand that markets are driven by liquidity - the accumulation and distribution of orders at key levels. Whether you're a day trader timing entries at structure, a swing trader identifying major turning points, or a position trader mapping long-term levels, this mapper provides the institutional-grade structural analysis needed to trade with the smart money rather than against it.
Why This Indicator Exists
Most traders draw support and resistance lines arbitrarily or use basic pivot points without understanding the underlying liquidity dynamics. This indicator addresses that limitation by:
Swing Point Detection: Identifies true market structure turning points
Equal Level Analysis: Finds equal highs and lows that form liquidity pools
Liquidity Zone Mapping: Visualizes areas of concentrated order flow
Zone Strength Scoring: Quantifies the reliability of each level
Sweep Detection: Identifies liquidity grabs before reversals
Proximity Analysis: Shows distance to nearest key levels
The mapper transforms abstract market structure concepts into concrete, actionable levels with measurable strength and reliability.
Core Components Explained
1. Swing Point Detection
The indicator identifies true swing points using pivot analysis:
// Swing point detection
float pivot_high = ta.pivothigh(high, i_swing_left, i_swing_right)
float pivot_low = ta.pivotlow(low, i_swing_left, i_swing_right)
// Process new swing high
if not na(pivot_high) and barstate.isconfirmed
int pivot_bar = bar_index - i_swing_right
SwingPoint new_sh = SwingPoint.new()
new_sh.price := pivot_high
new_sh.bar_idx := pivot_bar
new_sh.direction := 1
new_sh.is_valid := true
Swing features:
Left Bars: Bars to the left of pivot (default: 10)
Right Bars: Bars to the right for confirmation (default: 5)
Validation: Only confirmed swing points are marked
Visual Markers: Clear labels showing price and level type
Historical Tracking: Maintains history of all swing points
True swing points represent where the market actually changed direction - these are the foundation of market structure.
2. Equal Highs/Lows Detection
The indicator finds equal levels that form liquidity zones:
f_find_equal_levels(array swings, float threshold, int zone_type, color zone_col, float atr_val) =>
int sz = array.size(swings)
if sz >= 2 and barstate.isconfirmed
SwingPoint latest = array.get(swings, sz - 1)
for i = 0 to sz - 2
SwingPoint compare = array.get(swings, i)
if compare.is_valid and latest.is_valid
float pct = f_pct_diff(latest.price, compare.price)
if pct <= threshold
// Found equal level - create liquidity zone
float zone_top = math.max(latest.price, compare.price)
float zone_bottom = math.min(latest.price, compare.price)
// Add ATR buffer to zone
zone_top := zone_top + atr_val * 0.1
zone_bottom := zone_bottom - atr_val * 0.1
Equal level features:
Threshold: Percentage tolerance for equality (default: 0.1%)
Zone Creation: Forms zones around equal levels
ATR Buffer: Adds small buffer based on volatility
Zone Types: EQH (equal highs) and EQL (equal lows)
Liquidity Pools: Areas where stops cluster
Equal highs/lows are where stop losses and pending orders accumulate - they're liquidity magnets.
3. Liquidity Zone Management
The indicator tracks and manages liquidity zones dynamically:
// Zone interaction tracking
if array.size(liq_zones) > 0 and barstate.isconfirmed
for i = array.size(liq_zones) - 1 to 0
LiquidityZone zone = array.get(liq_zones, i)
if zone.is_active
// Check if price swept the zone
bool swept_high = zone.zone_type == 1 and high > zone.top
bool swept_low = zone.zone_type == -1 and low < zone.bottom
// Update zone age
zone.age_bars := zone.age_bars + 1
// Check for zone touches
bool touching_high = zone.zone_type == 1 and high >= zone.bottom and high <= zone.top
bool touching_low = zone.zone_type == -1 and low <= zone.top and low >= zone.bottom
if (touching_high or touching_low) and not (swept_high or swept_low)
zone.touch_count := zone.touch_count + 1
Zone features:
Active Zones: Zones that haven't been swept yet
Touch Count: Number of times price has tested the zone
Zone Age: How long the zone has existed
Sweep Detection: Identifies when liquidity is taken
Strength Updates: Zones get stronger with more touches
Zones that are tested multiple times become stronger and more significant.
4. Zone Strength Calculation
Each zone is assigned a strength score:
f_calc_zone_strength(int touches, int age, float zone_width, float atr_val) =>
float touch_score = math.min(float(touches) / 5.0 * 40, 40)
float age_score = math.max(30 - float(age) / 50.0 * 30, 0)
float width_score = math.min(atr_val / zone_width * 30, 30)
touch_score + age_score + width_score
Strength components:
Touch Score: More touches = stronger level (max 40 points)
Age Score: Fresher zones are more relevant (max 30 points)
Width Score: Tighter zones are more precise (max 30 points)
Total Strength: 0-100 indicating zone reliability
Visual Updates: Zone color intensifies with strength
Strength scoring helps prioritize which levels deserve more attention.
5. Structure Analysis Metrics
The indicator calculates structural relationships:
// Calculate structure metrics
float nearest_resistance = na
float nearest_support = na
// Find nearest resistance above current price
if array.size(swing_highs) > 0
for i = array.size(swing_highs) - 1 to 0
SwingPoint sh = array.get(swing_highs, i)
if sh.price > close and (na(nearest_resistance) or sh.price < nearest_resistance)
nearest_resistance := sh.price
// Find nearest support below current price
if array.size(swing_lows) > 0
for i = array.size(swing_lows) - 1 to 0
SwingPoint sl = array.get(swing_lows, i)
if sl.price < close and (na(nearest_support) or sl.price > nearest_support)
nearest_support := sl.price
// Structure bias calculation
float structure_bias = 0.0
if not na(dist_to_resistance) and not na(dist_to_support)
structure_bias := (dist_to_support - dist_to_resistance) /
(dist_to_support + dist_to_resistance)
Metrics include:
Nearest Resistance: Closest swing high above price
Nearest Support: Closest swing low below price
Distance Percentages: How far price is from each level
Structure Bias: Overall structural directional bias
Proximity Score: How close price is to key levels
These metrics provide context for current price position within the structure.
6. Proximity Analysis System
The indicator measures how close price is to key levels:
f_proximity_score(float price, float zone_top, float zone_bot) =>
float zone_mid = (zone_top + zone_bot) / 2
float dist = math.abs(price - zone_mid)
float zone_height = zone_top - zone_bot
math.max(100 - (dist / zone_height * 100), 0)
// Dynamic proximity labels
if i_show_prox_labels and barstate.islast
if not na(nearest_resistance) and resistance_proximity > 30
string res_label = "RESISTANCE " + str.tostring(nearest_resistance, "#.##") +
" Proximity: " + str.tostring(resistance_proximity, "#") + "%"
Proximity features:
Proximity Score: 0-100% showing closeness to levels
Dynamic Labels: Shows level price and proximity
Warning System: Alerts when approaching key levels
Background Colors: Visual warnings at high proximity
Distance Tracking: Real-time distance monitoring
Proximity analysis helps prepare for potential reactions at key levels.
Visual Elements
Swing Points: Clear markers for highs and lows with labels
Liquidity Zones: Color-coded zones with glow effects
Zone Strength: Visual intensity based on reliability
Swept Zones: Different styling for taken liquidity
Proximity Labels: Dynamic labels showing nearest levels
Warning Markers: Visual alerts at key level approaches
Dashboard: Comprehensive structure metrics
Background Shading: Subtle warnings at critical levels
The dashboard displays:
1. Active EQH and EQL zone counts
2. Nearest support and resistance levels
3. Proximity percentages to key levels
4. Zone strength distribution
5. Structure bias and metrics
6. Recent sweep activity
7. Level age and touch statistics
8. Trading recommendations based on structure
Input Parameters
Swing Detection:
Left Bars: Pivot lookback period (default: 10)
Right Bars: Confirmation period (default: 5)
Max Swings: Maximum swing levels to track (default: 20)
Show Swings: Display swing point markers
Equal Levels:
Equal Threshold: Percentage tolerance (default: 0.1%)
Show EQH/EQL: Display equal high/low zones
Zone Extension: How far zones extend (default: 50 bars)
Zone Settings:
Show Zones: Display liquidity zones
Zone Lookback: Historical zone tracking (default: 100)
Min Touches: Minimum touches for strength (default: 2)
ATR Buffer: Zone size multiplier (default: 0.15)
Visual Settings:
Color Scheme: Customizable colors for all elements
Glow Effects: Enable visual enhancements
Label Sizes: Adjustable text sizes
Dashboard Display: Show/hide metrics panel
How to Use This Indicator
Step 1: Identify Key Structure
Start by identifying major swing highs and lows. These form the foundation of market structure and define the overall market direction.
Step 2: Locate Liquidity Zones
Look for equal highs and lows that form liquidity zones. These are where stop losses accumulate and where institutions often target for liquidity grabs.
Step 3: Assess Zone Strength
Pay attention to zone strength scores. Zones with multiple touches (3+) and high strength (>70%) are more reliable for reactions.
Step 4: Monitor for Sweeps
Watch for price sweeping liquidity zones (breaking slightly beyond levels) and then reversing. These are often reversal signals.
Step 5: Use Proximity Analysis
When price approaches key levels (proximity > 70%), prepare for potential reactions. This is where entries or exits should be considered.
Step 6: Track Structure Bias
The structure bias shows whether price is closer to support or resistance. This can guide your directional bias.
Best Practices
The most reliable levels have multiple touches and high strength scores
Liquidity grabs (sweeps) often precede strong reversals
Fresh zones (newly formed) are often more significant than old ones
Combine structure with price action for confirmation
Higher timeframe structure overrides lower timeframe levels
Zone strength increases with each successful test
Be cautious at zones with very wide spreads - they're less precise
Watch for clusters of zones - these form major support/resistance areas
Keep a structure journal to track which levels hold best
Use structure for stop placement - just beyond key levels
4HR TF On BTC:
Trading Applications
Support/Resistance Trading:
Enter long near strong support zones
Enter short near strong resistance zones
Place stops just beyond the zone boundaries
Target the opposite zone or midpoint
Breakout Trading:
Wait for clear breaks of structure
Confirm with volume and momentum
Enter on retests of broken levels
Use zones as new support/resistance
Reversal Trading:
Look for liquidity sweeps beyond zones
Enter on first signs of reversal
Confirm with candlestick patterns
Target the opposite structure level
Strategy Integration
This indicator enhances any trading system:
Use structure levels for stop placement
Filter trades based on proximity to key levels
Time entries at strong support/resistance
Identify high-probability reversal zones
Export structure metrics for custom logic
Combine with trend analysis for optimal results
Technical Implementation
Built with Pine Script v6 featuring:
Advanced swing point detection with pivot analysis
Equal level identification with customizable thresholds
Dynamic liquidity zone management and tracking
Zone strength scoring with multiple factors
Real-time proximity analysis and warnings
Comprehensive structure metrics calculation
Visual effects including glow and gradient fills
Interactive dashboard with 8 key metrics
Alert conditions for all major structural events
Export functions for strategy integration
The code uses confirmed bars for all calculations to prevent repainting and ensure reliable structure identification.
Originality Statement
This indicator is original in its comprehensive approach to liquidity structure analysis and zone management. While swing point detection is a known concept, this indicator is justified because:
It synthesizes swing analysis with equal level detection to identify liquidity zones
The zone strength scoring system provides objective measures of level reliability
Dynamic zone management tracks the lifecycle of each liquidity area
Proximity analysis adds practical trading context to structure identification
Sweep detection identifies the patterns of liquidity grabs
The dashboard presents complex structural analysis in an accessible format
Visual elements including glow effects and gradients enhance readability
Export functions enable integration with any trading system
Each component provides unique insights: swing points show structure, equal levels show liquidity, strength shows reliability, and proximity shows opportunity
The indicator solves the real problem of identifying where institutions place orders rather than just drawing arbitrary lines
The indicator's value lies in transforming abstract market structure concepts into concrete, actionable levels with measurable properties that traders can use to make informed decisions about entries, exits, and risk management.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Market structure analysis is a tool for understanding price levels, not a prediction system.
Support and resistance levels can break without warning due to news events, economic data, or changes in market sentiment. Past reactions at levels do not guarantee future behavior. The indicator's levels are mathematical calculations based on historical price action and should be used in conjunction with other forms of analysis.
Always use proper risk management, including stop losses placed beyond key levels. Never assume a level will hold - always have a plan for when it breaks. Liquidity zones can be swept multiple times before a final reversal.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
指标

Alpha SuperTrend Signal [identityKa]Overview
The Alpha SuperTrend Signal is a highly optimized trend-following system designed to fix the inherent lagging issues found in traditional SuperTrend indicators. While standard SuperTrends use fixed ATR multipliers across all timeframes, this script features a proprietary Auto-Adaptive Sensitivity Engine. It dynamically adjusts its own mathematical parameters based on the chart's timeframe, ensuring rapid response times during intraday scalping while maintaining robust, noise-free structural integrity on macro swing charts.
The Auto-Adaptive Engine Logic
Standard SuperTrends often fail because a 3.0x multiplier is too slow for a 15-minute chart and too volatile for a Daily chart. This script solves that computationally:
Intraday Scalping (≤ 15m): The engine automatically drops the ATR multiplier to 1.8x, hugging the price action tightly to catch micro-reversals early.
Day Trading (≤ 60m): The engine adjusts the multiplier to a balanced 2.2x, filtering out mid-session noise while capturing the dominant daily trend.
Swing/Macro (≥ 4H): The engine defaults to a wider 2.6x to 3.0x multiplier to prevent premature stop-outs from standard market pullbacks.
(Note: Traders can disable the Auto-Adaptive engine in the settings and manually input their preferred fixed multiplier).
Flawless Visuals & Aesthetics
To maintain a clean, institutional-grade chart, the script features "Flawless Label Positioning." Instead of plotting BUY/SELL signals randomly above or below candle wicks (which often causes visual clutter during high volatility), the script mathematically anchors the signal labels directly to the exact pivot coordinate of the SuperTrend line itself. This creates a visually perfect and undeniable invalidation point.
HUD Dashboard & AI Trade Logic
The integrated on-chart panel evaluates the distance between the live price and the active SuperTrend line to output a mechanical suggestion:
Dangerous: Triggered whenever the current closing price enters within a 0.5 ATR threshold of the SuperTrend line. This mathematically indicates that the trend is actively being tested, stop-losses are vulnerable, and a structural flip is highly probable. Traders should exercise extreme caution and avoid entering new trend-continuation setups.
LONG / SHORT: Triggered when the price is trending safely in the direction of the SuperTrend (LONG for a green line, SHORT for a red line) and is comfortably outside the 0.5 ATR danger zone.
How to Use It
Traders should use the painted candlesticks and the Alpha ST Line to define their strict directional bias. When a new BUY or SELL label prints, wait for a pullback. Execute trades only when the AI Suggestion reads "LONG" or "SHORT," and use the step-line itself as a trailing stop-loss to manage risk mathematically. 指标

Gold Master Hybrid V1 UltraGold Master Hybrid V1 Ultra - The Ultimate Multi-Confluence Trading System
Welcome to the Gold Master Hybrid V1 Ultra, a state-of-the-art, all-in-one trading indicator engineered strictly for serious traders. Built upon a robust 8-Point Multi-Confluence Engine, this indicator bridges the gap between traditional momentum oscillators and modern institutional Smart Money Concepts (SMC).
Whether you are a day trader looking for precise intraday entries or a swing trader aiming to ride massive trend waves, the Gold Master Hybrid acts as your personal, noise-filtering trading assistant. It doesn't just give you raw buy and sell arrows; it evaluates the entire market spectrum—from volatility and volume to deeply embedded institutional price action—before calculating dynamic, mathematically sound targets.
The Core Philosophy
The financial markets are filled with noise. Most standard indicators fail because they evaluate only one dimension of the market (like momentum or trend) and end up printing false signals during ranging or choppy environments.
The Gold Master V1 Ultra solves this by requiring actual "Confluence". Before any signal is generated, our proprietary engine interrogates the market using eight distinct parameters. Only when the absolute majority of these stars align does the indicator grant a "Confirmed Signal."
The Engine - 8 Point Multi-Confluence
The core of the indicator assigns a Score (out of 8) to every single candle based on the following criteria. It asks 8 strict questions:
1. Price vs EMA: Is the current Close Price trading above the fast EMA 9? This ensures short term momentum is heavily in our favor.
2. Moving Average Trend Validation: Has the EMA 9 crossed above the EMA 21 (Bullish Cross)? This validates a structural shift in momentum.
3. Macro Trend Filter: Is the current asset trending above the 50-period Simple Moving Average? We never want to trade against the medium-term trend.
4. RSI Strength: Is the Relative Strength Index (RSI 14) residing in the "Healthy Bullish" zone (between 50 and 70)? If it is below 50, it is weak. If it is above 70, it is overbought. The sweet spot is 50 to 70.
5. MACD Confirmation: Is the MACD line actively leading above its Signal line?
6. Stochastic Filter: Is the Stochastic %K line crossing above the %D line while explicitly avoiding the "Overbought" (>80) extreme?
7. Institutional Volume Surge: Is the current volume surging to at least 1.5x the 20-period moving average volume? This detects big institutional involvement that is required to move the market.
8. SMC Trend Matrix: Is the broader Market Structure currently Bullish? Has it printed an upward Break of Structure recently?
Signal Grading:
- Strong Signal (Score >= 6): An incredibly high-probability setup where the trend, momentum, volume, and structure are perfectly synchronized. Printed as a prominent Triangle marker (Lime for BUY, Red for SELL).
- Weak Signal (Score 4 or 5): A moderate continuation or early-warning setup. Printed as smaller triangles (Teal for Buy, Orange for Sell).
Advanced Signal Noise Reduction
We hate chart clutter. To keep your charts clean and your mind focused, the Gold Master V1 Ultra includes two built-in noise-canceling filters:
Filter 1: Consecutive Confirmation Lock
A signal condition must physically hold and mathematically close for two consecutive candles. This completely annihilates 1-candle fakeout spikes that ruin most strategies.
Filter 2: Strict Cooldown Buffer
Once a signal is printed, the indicator enters a strict 5-candle cooldown phase. During this time, it will completely ignore minor fluctuations and will not print duplicate signals of the same type. This ensures massive readability on any timeframe, avoiding the common issue of printing 5 arrows in a row during a ranging period.
Integrated Smart Money Concepts (SMC)
You no longer need five different indicators on your chart to find institutional levels. The Gold Master handles advanced institutional mapping automatically in the background:
- Market Structure Pivot Labels: Automatically draws Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) so you never lose track of structure.
- BOS & CHoCH: Dynamically plots Break of Structure and Change of Character lines to help you anticipate trend exhaustion or continuation without having to draw trendlines yourself.
- Order Blocks (OB): Scans historical price action to plot highly accurate Bullish (Teal) and Bearish (Red) Order Block zones where banks left pending limit orders.
- Fair Value Gaps (FVG): Instantly highlights market imbalances (FVG+ and FVG-) so you know exactly where price is likely to be magnetized next to fill liquidity voids.
Dynamic Risk Management System (TP & SL)
Stop guessing where to take profit or place your stop. The Gold Master Hybrid V1 Ultra utilizes a custom Average True Range (ATR) algorithm to auto-calculate your trade parameters the instant a Strong Signal appears.
- Dynamic Stop Loss (SL): Placed at exactly 1.5x ATR away from the wick of the signal candle. It adapts to current market volatility to protect you from getting wicked out during high-impact news.
- Take Profit 1 (TP1): Set at 2.0x ATR from your entry. Optimized for safe, high-win-rate scalps.
- Take Profit 2 (TP2): Set at 3.5x ATR from your entry. Optimized for capturing the true meat of the trend.
The Golden R:R Safety Protocol:
Before drawing the SL/TP lines on your chart, the indicator internally calculates the Risk-to-Reward ratio. If the setup doesn't offer at least a 1:1.5 reward-to-risk ratio (based on historical volatility), the indicator completely hides the targets. It is effectively telling you: "This trade is too mathematically risky, skip it." This forces you to be a disciplined trader.
The Command Center Dashboard
At the corner of your chart (Top-Right by default, completely movable in the settings), sits your real-time Command Center. It aggregates all critical data from the indicator into one beautiful UI panel so you never have to look at subcharts:
- Real-time Value Tracking: See the exact status of your EMA, RSI, MACD, and Volume.
- Current Signal Score: Instantly know if the current candle is scoring a 3/8, 5/8, or a perfect 8/8 before the signal even fires.
- Exact Pricing: Displays the precise price coordinates for TP1, TP2, and your SL so you can immediately copy them into your broker.
- R:R tracking: See the exact live Risk-to-Reward ratio of the current setup.
- Time Session Matrix: Know instantly if you are trading in the high-volume London, New York, or Asian session, or if you are in the dead hours.
User Guide - How to Execute Trades
1. Reading the Macro Trend Background
Look closely at the entire background color of your chart. The Gold Master will tint the background Teal if the absolute macro trend is Bullish, and Red if it's Bearish.
Rule #1: Only take Strong BUY signals when the background is Teal. Never trade against the macro trend.
2. The Golden Setup (Finding Institutional Confluence)
A Strong Signal alone is great. But a Strong Signal that prints exactly inside an auto-drawn Bullish Order Block or inside a Fair Value Gap (FVG+) is a "God-Tier" setup. You want to layer the confluences. If your Buy signal happens right as price touches the demand zone, that is your highest probability entry.
3. Wait for the Candle to Close
Because the engine relies on a 2-candle confirmation filter, you must wait for the current candle to mathematically close before considering the signal valid. Do not enter a trade while the candle is still moving.
Pro-Tip: Use TradingView's alert system and set the condition to "Once Per Bar Close" to let the indicator notify your phone automatically when a valid, locked-in signal has occurred.
4. Execution and SL/TP Placement
When a Buy signal flashes and you take the trade, immediately look at the dashboard (or the lines drawn on the chart) and place your Stop Loss exactly where the red line tells you to. Place your Take Profit at the green TP1 or TP2 line depending on your risk appetite. Do not move your Stop Loss arbitrarily—the ATR calculation placed it there for a mathematical reason.
5. Customizing to Your Specific Asset
Every asset breathes differently. Gold (XAUUSD) moves differently than EURUSD, which moves differently than Bitcoin.
If you are trading extremely volatile Crypto, go into the indicator settings (click the gear icon next to the indicator name) and increase the "ATR Multiplier (SL)" from 1.5 to 2.0 to give your trades more breathing room.
If you are scalping the 1-minute chart, you might want to reduce the TP1 multiplier to 1.5. You can customize every aspect visually from the settings menu without touching the code.
6. Dashboard Movement
If the dashboard is blocking your view of current price action, click the gear icon settings for the indicator, go to the "Dashboard" section, and switch the "Dashboard Position" from Top Right to Top Left, Bottom Right, or Bottom Left.
Conclusion
The Gold Master Hybrid V1 Ultra is not a magic wand, but it is one of the strictest, most logical institutional trading systems available today. By forcing you to wait for 8 points of confluence, keeping your charts clean, calculating ATR-based risk management, and preventing you from taking terrible R:R trades, it physically forces you to trade like an institution rather than an emotional retail trader.
(Disclaimer: Trading financial markets involves significant risk. The Gold Master Hybrid V1 Ultra is a highly advanced analytical tool designed to assist your decision-making, but it does not constitute financial advice. Always test strategies on a demo account before risking real capital.) 指标

Swing Profile [BigBeluga]🔵 OVERVIEW
Swing Profile is a dynamic swing-based volume profiling tool that builds a complete volume profile for each completed market swing.
Instead of using fixed sessions or time ranges, the indicator anchors its profile strictly between confirmed swing highs and swing lows, allowing traders to analyze where volume accumulated inside each directional leg.
The profile updates in real time while a swing is still forming and finalizes once the swing direction flips, giving both historical and live insight into volume behavior.
🔵 CONCEPTS
Swing-Anchored Profiling — Volume is calculated only between confirmed swing highs and lows detected by the Swing Length input.
Directional Legs — Each bullish or bearish swing leg gets its own independent volume profile.
ATR-Adaptive Bins — Profile bin size is automatically scaled using ATR, keeping resolution consistent across volatility regimes.
Real-Time Rebuild — While a swing is still active, the profile continuously recalculates and redraws.
Finalized Profiles — Once direction flips, the profile is locked and marked as a completed swing.
🔵 FEATURES
Swing Volume Profile — Displays horizontal volume distribution for each swing leg.
Point of Control (PoC) — Highlights the price level with the highest traded volume inside the swing.
Buy / Sell Volume Separation — Tracks bullish (buy) and bearish (sell) volume inside each profile.
Delta Volume Calculation — Shows net buying vs selling pressure as a percentage.
Profile Outline — A polyline traces the outer shape of the volume distribution.
HeatMap Mode — Optional heatmap visualization showing volume intensity by color gradient.
ZigZag Swing Connector — Visual connection between swing highs and lows for structure clarity.
Custom Label Sizing — Adjust label size (Tiny → Huge) for clean chart scaling.
🔵 HOW TO USE
Identify High-Interest Zones — Use the PoC to locate price levels where the market spent the most time during a swing.
Trend Strength Analysis — Strong directional swings often show volume skewed toward one side of the profile.
Pullback Zones — Profiles help identify areas where price may react during retracements.
Continuation vs Reversal — Delta volume reveals whether buying or selling dominated the swing.
Live Monitoring — While a swing is forming, watch the real-time profile to anticipate where structure may complete.
🔵 DATA LABELS
T — Total traded volume inside the swing.
B — Buy volume (bullish candles).
S — Sell volume (bearish candles).
D — Delta volume (% difference between buy and sell volume).
🔵 CONCLUSION
Swing Profile delivers a precise, structure-aware view of volume by anchoring profiles directly to market swings.
By combining real-time profiling, PoC detection, delta analysis, and adaptive resolution, it provides deep insight into where participation truly occurred — making it a powerful tool for swing traders, structure traders, and volume-focused strategies. 指标

Vector Logic: Macro Regime SwingVector Logic: Macro Regime Swing 🦅
Most standard moving average strategies fail because they cannot tell the difference between a true trending market and a sideways "chop zone" (accumulation/distribution). They constantly fire false 'BUY' and 'SELL' signals while the asset is just moving sideways, leading to a slow bleed of your capital.
The Vector Logic: Macro Regime Swing indicator was built to solve exactly that. Instead of just looking for trends, this script mathematically detects when a stock has fallen asleep, throws up a visual "Trap," and sits safely on the sidelines until a real breakout happens.
⚙️ How the Engine Works
This indicator combines four engines/logics to confirm a trade:
1. The Macro Trap (The Purple Lines) 🟪
The script constantly monitors the last 60 days of price action. If the asset goes just 7 days without making a new 60-day high or low, the indicator declares the stock is "chopping."
• It instantly draws a faint purple ceiling and floor on your chart.
• While the price is trapped inside this purple chop zone, all trades are strictly blocked. You sit safely on the sidelines.
2. The Trend Engine (The Blue & Orange Lines) 🌊
For a trend to be valid, the script requires structural alignment. We use a classic, robust Moving Average crossover:
• Fast Trend: 20-period EMA (Cyan)
• Slow Trend: 50-period EMA (Orange)
• The price must be aggressively crossing the 20 EMA in the direction of the trend to trigger an entry.
3. The Volume Consensus 📊
A breakout without volume is a trap. The script monitors On-Balance-Volume (OBV) in the background. A trade will only fire if institutional volume is actively pushing the price in your direction.
4. The Momentum Exit (The Yellow Dotted Line) 🟡
Getting into a trade is only half the battle; keeping your profits is the other.
Instead of waiting for the price to crash all the way back down to the 20 or 50 EMA, this script uses a rapid 10-period EMA (the dotted yellow line) as a tight trailing stop. The moment a daily candle closes on the wrong side of this yellow line, the script ruthlessly exits the trade to lock in your momentum profits.
⏱️ Adapting for Smaller Timeframes
By default, the VL Macro Regime is tuned for Daily (1D) swing trading. However, the engine is fully dynamic. When you drop down to intraday timeframes (like 1H, 15m, or 5m), keep in mind that "Days" in the settings menu translates directly to "Candles" or "Bars". If you want to trap a true macro-level chop zone on a 15-minute chart, you should increase your Historical Range Lookback (e.g., 100 to 200 bars) to capture the overarching structure of the week. For highly aggressive day trading, you can also tighten the Trend MAs (e.g., 9 and 21) to catch rapid intraday momentum breakouts before the volume fades.
💡 How to Read the Chart
• BUY / SELL Labels: A clean, confirmed breakout. The trend is aligned, volume is backing it up, and the stock has escaped the purple Macro Trap.
• EXIT Circles: The tiny grey circles tell you exactly when the price closed across the yellow 10 EMA trailing stop. Time to take your profits and step away.
• TP Flags: Subtle green flags suggest a standard 5% partial Take-Profit zone.
• The Dashboard HUD: Located in the top right, this panel gives you a real-time pulse check on the current trade status, volatility state, and volume trend.
🛠️ Built-In Failsafes
• Zero Repainting: All signals are strictly hardcoded to the candle close (barstate.isconfirmed). What you see on a closed daily candle is permanently locked in history. No flickering, no vanishing signals.
• Glitch Protection: Automatically untethers and resets itself if it encounters broken historical data or extreme anomalies (like leveraged ETF reverse splits).
Disclaimer: This script is for educational and informational purposes only. It does not constitute financial advice. Always backtest strategies and manage your own risk. 指标

Gann-Fibonacci Swing Toolkit [BigBeluga]🔵 OVERVIEW
Gann–Fibonacci Swing Toolkit is an advanced swing-based projection tool that combines classic Gann geometry with Fibonacci ratios.
The indicator automatically detects market swings, anchors them to the most recent structure, and dynamically plots either Gann Fans or Gann Boxes to visualize price–time relationships, trend angles, retracement zones, and expansion targets.
This toolkit is designed to help traders understand not only where price may react, but also how fast it should move relative to time.
🔵 HISTORICAL BACKGROUND
The foundation of this toolkit comes from two of the most influential schools of market geometry:
W.D. Gann (early 1900s) introduced the idea that markets move according to geometric and mathematical laws, where price and time must stay in balance . His work emphasized angles (such as 1×1, 1×2, 1×3) that define how much price should advance or decline per unit of time.
Fibonacci ratios , derived from the Fibonacci sequence and popularized in trading decades later, describe natural proportional relationships observed across markets, especially during corrections and expansions.
Modern technical analysis merges these ideas by applying Fibonacci ratios to Gann’s price–time framework, creating tools that measure both distance (price) and duration (time) .
The Gann–Fibonacci Swing Toolkit follows this combined philosophy by grounding all projections in real swing structure rather than static or manually drawn anchors.
🔵 CORE CONCEPT
Swing-Based Anchoring — All calculations start from confirmed swing highs and lows detected via a rolling highest/lowest lookback.
Directional Context — The tool automatically determines bullish or bearish structure and adapts all projections accordingly.
Price–Time Geometry — Gann logic is applied by projecting price movement relative to elapsed bars, not just price distance.
🔵 KEY FEATURES
SWING DETECTION LOGIC
A swing high is confirmed when price forms a local maximum and then fails to extend higher.
A swing low is confirmed when price forms a local minimum and then fails to extend lower.
The most recent completed swing becomes the anchor point for all Gann and Fibonacci calculations.
Optional ZigZag lines visually connect completed swings for structural clarity.
GANN FAN MODE
When Fibonacci Type = Fan , the indicator plots dynamic Gann fan angles from the swing anchor.
Fan Ratios — Each fan line represents a 1/x (1/1, 1/2, 1/3, etc.), defining how much price should move per unit of time.
Trend-Aware Projection
- Bullish fans project upward from swing lows.
- Bearish fans project downward from swing highs.
Fan Fill Zones — Optional shaded regions between fan levels highlight price compression and expansion areas.
GANN BOX (FIBONACCI BOX) MODE
When Fibonacci Type = Box , the indicator builds a Gann Box using Fibonacci retracement and time ratios.
Horizontal Levels — Fibonacci price retracement levels (0.236, 0.382, 0.5, 0.618, 0.786) are projected from the swing range.
Vertical Levels — Fibonacci time divisions are applied across the swing duration to estimate timing of reactions.
Inverse Mode — Flips retracement logic to project inverted expansions instead of standard pullbacks.
OTE Zone — Optional Optimal Trade Entry zone highlights the premium/discount retracement area.
Dual-Axis Structure — Combines price and time into a single geometric framework instead of treating them separately.
MAIN FRAME LOGIC
A dynamic frame is drawn between the swing anchor and current bar, scaled by trend slope.
The frame visually represents the dominant trend channel derived from swing geometry.
VISUAL ELEMENTS
Swing anchor labels mark the exact price and bar index used for calculations.
Color-coded bullish and bearish swings improve structural readability.
Labels on fan and box levels display their exact Fibonacci ratios.
🔵 HOW TO USE
Use Gann Fans to trade dynamic trend support and resistance that evolves with time.
Use Gann Boxes to identify high-probability retracement zones and timing windows.
Combine fan angles with horizontal box levels for confluence-based entries.
Disable ZigZag if you want a cleaner chart focused only on projections.
🔵 CONCLUSION
Gann–Fibonacci Swing Toolkit is a geometry-driven market structure tool that goes beyond static Fibonacci levels.
By uniting Gann’s price–time balance with Fibonacci proportionality and anchoring everything to real swing structure, the indicator provides a deeper framework for understanding trend behavior, corrective depth, and future reaction zones — all derived directly from price action itself. 指标

Vector Logic: Gator Trend Hunter [v 2.0]MAJOR UPDATE: Added Trend Rider Logic to prevent premature exits.
"Stop getting shaken out of winning trades."
🛑 The Problem:
Most trend-following indicators have a fatal flaw: they exit too early . As soon as a strong trend pauses to take a breath, standard momentum indicators (like MACD or moving average crosses) panic and signal an exit, forcing you to watch from the sidelines as the stock rips higher without you.
✅ The Solution: The "Trend Rider" Logic
The VL: Gator Trend Hunter is an institutional-grade trend system designed to solve the problem of premature exits. It combines the legendary Williams Alligator volatility logic with a 200 Double EMA macro filter, but with a critical twist:
Instead of exiting when lines cross (which is noisy), this script uses a Structure Break Exit . It will keep you in the trade as long as the price candles close above the Alligator's Teeth (the Red Balance Line). This acts as a "Guard Rail," allowing the price to wiggle, pullback, and test support without killing your position.
_______________________________________
🧠 How It Works
1. The Macro Filter (200 DEMA) 🌊
The script first checks the "Big Picture" trend direction.
• Price > Orange Line = 🟢 Longs Only.
• Price < Orange Line = 🔴 Shorts Only.
2. The Trigger (The Alligator) 🐊
It waits for the Alligator lines to "Sleep" (contract/tangle) and then "Eat" (expand).
• LONG: When the Green line crosses above the Red line and price breaks out.
• SHORT: When the Green line crosses below the Red line and price breaks down.
3. The Ride (The Secret Sauce) 🏄♂️
Once in a trade, the script ignores minor crossovers . It only signals an EXIT if the price physically closes beyond the Red Guard Rail.
_______________________________________
📖 The Playbook: How to Trade It
• The Setup: Look for the Macro Trend Line (Orange) to be sloping up.
• The Entry: Wait for the Cyan "BUY" Label . This appears when the Alligator wakes up and expands (you will see the "Gator Cloud" turn bright Blue).
• The "Sit on Your Hands" Phase: This is the hardest part of trading. You will see red candles. You will see pullbacks. Do not sell. Trust the Red Line. As long as the "Gator Cloud" remains visible and price is above the Red line, the trend is healthy.
• The Exit: Sell only when the Yellow "X" appears. This confirms that the trend structure has actually broken.
_______________________________________
⚡ Key Features
• Bi-Directional: Works for both Bull markets (Longs) and Bear markets (Shorts).
• State Machine: No signal spam. You get one clean entry signal, and then silence until the exit.
• Live Dashboard: A status panel in the bottom right corner shows you:
📊 Macro Trend: Bullish/Bearish.
🐊 Gator Phase: Sleeping vs. Expansion.
🎯 Active Action: Long, Short, or Wait.
💎 Best For:
• Trending Assets: High Beta Stocks (NVDA, TSLA), Crypto (BTC, ETH), and Commodities.
• Timeframes: Optimized for 4H and Daily charts to catch major swings.
Part of the Vector Logic Labs quantitative suite. 指标

指标

指标

MST Medio v1.0MST Medio — 3-Phase Price Action Confirmation
MST Medio is a structured price action indicator that detects high-probability reversal entries using a 3-phase confirmation process: Break → Confirm → Retest. It waits for a confirmed Higher High / Lower Low, validates the impulse wave, then triggers only when price retests the key level.
No repainting. No lagging indicators. Pure price action logic built on swing structure.
────────────────
How It Works
Phase 1 — Break
Price forms a Higher High (HH) above the previous Swing High, or a Lower Low (LL) below the previous Swing Low. The break must pass two filters:
Break Strength — The break distance must exceed a minimum percentage of the previous swing range (configurable, default 0.25×).
Impulse Body Filter — The first candle closing beyond the old high/low must have a body ≥ 1.5× the 20-bar average body. This ensures the break is driven by momentum, not a weak drift.
The indicator then identifies the W1 impulse wave — the highest high (BUY) or lowest low (SELL) from the break candle until the first opposing candle.
Phase 2 — Confirm
After the impulse wave, price must pull back and then close beyond the W1 peak (for BUY) or below the W1 trough (for SELL). This confirms that momentum has resumed after the correction.
Invalidation rules:
Price returns to the entry level (old SH/SL) before confirmation → structure broken, cancel.
Price hits the Stop Loss level → cancel.
Phase 3 — Retest Entry
Once confirmed, the indicator waits for price to retest the original Swing High (BUY) or Swing Low (SELL). This is your entry point — buying at the old resistance turned support, or selling at the old support turned resistance.
Invalidation rules:
Price hits Stop Loss → cancel.
Price breaks below the W1 trough (BUY) or above the W1 peak (SELL) → cancel.
────────────────
Visual Elements
Entry / SL / TP lines (dashed) — Drawn at signal confirmation with labels showing levels and R:R ratio.
Risk/Reward zones — Colored boxes: red zone (Entry → SL) and green zone (Entry → TP) for instant visual assessment.
Confirm Break label — "▲ Confirm Break" / "▼ Confirm Break" at the wave confirmation candle.
Pending state — Dotted lines and phase labels ("Phase 1 BUY", "Phase 2 SELL") showing the indicator is tracking a potential setup before it triggers.
Swing markers (optional) — Small triangles at detected pivot highs and lows.
────────────────
Take Profit Logic
TP is placed at the high of the Confirm Break candle (BUY) or the low of the Confirm Break candle (SELL). This represents the point where momentum was confirmed — a natural target that aligns with the structure of the move.
────────────────
Inputs
Pivot Lookback (default: 5) — Bars left/right to confirm a swing point. Higher values = fewer but stronger pivots.
Break Strength (default: 0.25) — Break distance must be ≥ this multiple of the previous swing range. Set 0 to disable.
Impulse Body Filter (default: 1.5) — The break candle body must be ≥ this multiple of the 20-bar average body. Set 0 to disable.
Show Entry / SL / TP Lines — Toggle dashed level lines and labels.
Show Risk/Reward Zones — Toggle colored risk/reward boxes.
Show Pending State — Toggle the dotted lines and phase labels for setups being tracked.
Show Confirm Break Label — Toggle the confirmation label.
Show Swing Points — Toggle swing high/low markers on the chart.
Full color customization for all visual elements.
────────────────
Alerts
BUY Signal — Fires when Phase 3 retest is triggered on a bullish setup.
SELL Signal — Fires when Phase 3 retest is triggered on a bearish setup.
Any Signal — Fires on either direction.
────────────────
Notes
Works on all timeframes and all instruments.
Non-repainting — All signals use confirmed (closed) pivots. No lookahead.
This is a detection tool , not a strategy. Use it alongside your own risk management and confluence analysis.
Best suited for trending markets where HH/LL structures form clean impulse waves.
The 3-phase confirmation significantly reduces false signals compared to raw breakout detection.
指标

指标
