Indicator

Indicator

Large Order Delta Profile [TradingIQ]Hello Traders!
🔹 Large Order Delta Profile
Large Order Delta Profile is an order-flow visualization tool designed to split delta profiles across different transaction-size categories.
That is the core idea behind the tool: instead of showing one combined volume or delta profile, it separates activity by customizable dollar-value thresholds so you can compare how smaller, medium-sized, and very large transactions behaved during the same session.
This helps traders visualize where different sizes of market participants were active, where aggressive buying or selling concentrated, and whether large-order flow agreed or disagreed with smaller transaction flow .
splits the delta profile across multiple transaction-size ranges
compares smaller, medium, and large-order activity side by side
tracks bullish and bearish delta at price levels
filters trades using customizable dollar-value thresholds
supports tick, second, and minute-based granularity
builds session-based delta profiles
🔹 What the tool shows
🔸 Transaction-size delta profiles
The main feature of this indicator is that it separates market activity into different transaction-size profiles.
Each profile represents a different dollar-value range of transactions, allowing you to compare:
smaller transaction flow
medium-sized transaction flow
large-order activity
extreme large-order activity
This makes it easier to see whether large participants were active at the same price levels as smaller participants, or whether larger transactions were concentrated in completely different areas.
🔸 Large order delta distribution
The script builds a profile showing where aggressive buying and selling activity occurred during the active session.
Instead of displaying simple volume-at-price, it separates:
bullish delta
bearish delta
net directional pressure
This helps identify where buyers or sellers were more aggressive across each transaction-size category.
🔸 Custom dollar-value filters
The indicator allows you to define multiple transaction-size filters using estimated dollar value.
Each filter creates its own profile, so you can compare activity such as:
all qualifying transactions
transactions above a larger threshold
transactions above an extreme threshold
This is useful because not all market activity carries the same context.
A small transaction imbalance and a large transaction imbalance can tell very different stories.
🔸 Delta-based directional analysis
The profile uses directional estimation to classify activity as bullish or bearish.
Depending on your selected granularity:
tick-based bid/ask estimation can be used
lower-timeframe candle direction can be used
aggressive buying and selling pressure is separated
Positive delta suggests stronger aggressive buying.
Negative delta suggests stronger aggressive selling.
This helps reveal where different transaction-size groups were actively lifting offers or hitting bids.
🔸 Session-based profiling
The indicator resets and rebuilds based on a customizable session period.
This allows profiles to adapt dynamically to:
daily sessions
custom session structures
intraday profiling
higher-timeframe segmentation
The profile continuously expands as price moves beyond existing ranges.
🔸 Adaptive profile levels
The script uses ATR-based level spacing to dynamically build profile rows.
This allows the profile structure to adapt to:
high-volatility conditions
low-volatility conditions
tight ranges
expanding markets
Instead of relying on static tick spacing, the levels automatically scale with market volatility.
🔸 Visual imbalance mapping
Profile blocks expand horizontally based on the strength of bullish or bearish delta.
This creates a quick visual representation of:
where aggressive buyers dominated
where aggressive sellers dominated
which price levels showed the strongest imbalance
where directional pressure was concentrated
how imbalance differed across transaction-size groups
Bullish pressure is displayed using bullish profile coloring.
Bearish pressure is displayed using bearish profile coloring.
Optional delta labels can also display the raw imbalance values directly on the chart.
🔹 How to read it
Each component gives a different layer of order-flow context:
Transaction-size profile → which order-size group is being shown
Bullish delta → aggressive buying pressure
Bearish delta → aggressive selling pressure
Large profile expansion → stronger directional imbalance
Thin profile areas → weaker participation
Filter ranges → separated transaction-size categories
Session profile → where activity concentrated during the session
🔹 Why this tool is useful
It gives you:
a way to compare delta across different transaction sizes
a visual map of where larger orders were active
separate profiles for smaller, medium, and larger transaction flow
context around whether large-order activity confirms or conflicts with smaller flow
session-based order-flow structure
a clearer view of where aggressive participation concentrated
🔹 Best use cases
comparing small vs large transaction behavior
tracking where large participants were most active
studying aggressive buying and selling by transaction size
analyzing directional imbalance across multiple order-size groups
identifying high-participation price zones
building session-based order-flow context
🔹 Important note
This tool estimates directional pressure using lower-timeframe or tick-based data.
That means:
delta estimation is not identical to centralized exchange order books
transaction-size filters are based on estimated dollar value
large imbalance does not guarantee continuation
profiles represent historical participation, not future certainty
market conditions can shift quickly
outputs should be used as contextual analysis, not standalone signals
🔹 Inputs you can customize
The script includes flexible controls such as:
data granularity selection
session timeframe selection
profile level granularity
multiple dollar-value transaction filters
profile offsets
bullish and bearish profile colors
delta label visibility
delta label sizing
Closing Notes
Large Order Delta Profile is built around one central idea: not all transaction sizes should be viewed the same way .
By splitting delta profiles across different dollar-value thresholds, the tool helps traders compare how smaller flow, larger flow, and extreme transaction activity behave during the same session.
Rather than asking only where volume occurred, this tool helps ask which size of activity created the imbalance, where it happened, and whether larger transaction flow told a different story from the broader market .
Thank you for checking it out! Indicator

AetherEdge - Hypercube Heatmap (Horizon Field)🖊️ Overview
AE-HYPE2 is a heatmap engine that embeds multiple market features into a latent energy and projects it across the chart as horizontal energy bands by price level. It dynamically weights feature importance with attention and modulates band brightness with a Bayesian-style uncertainty. Brighter bands mark price levels where energy concentrates, intuitively conveying where market force accumulates. It expresses the CoinGlass-style horizontal-band aesthetic through a unique "market energy" lens rather than liquidations.
🔶 Key Features
Price-level energy field: projects multi-feature latent energy into horizontal bands by price
Latent embedding: five features (momentum, volatility, volume, trend, RSI) compressed into latent energy
Dynamic attention: softmax real-time weighting of each feature's importance
Uncertainty estimation: a Bayesian-style estimate from feature dispersion, darkening uncertain bands
Smooth gradient field via vertical smoothing
Viridis palette (purple→teal→green→yellow) reproducing the CoinGlass aesthetic
Hotspot glow and an integrated HUD showing total energy, uncertainty, and the focused feature
🧠 Technical Architecture
Within Pine — which has no autodiff, external libraries, or animation — this reproduces the mathematical core of deep embedding and attention in static form. A softmax over five standardized features yields attention weights, and their weighted sum is the latent energy. Uncertainty is a Bayesian-style estimate from the standard deviation among features. In rendering, for each past bar, the latent energy (attenuated by uncertainty) is accumulated into the price row that bar's price occupied, so levels where energy concentrates emerge as bright horizontal bands. Vertical smoothing diffuses energy into neighboring bands for a smooth gradient field. Color is the Viridis spectrum, with brightness encoding energy magnitude.
⚙️ Recommended Settings & Tuning Guide
Tuned with crypto in mind. Price Resolution 48 and Lookback Width ~250 are a starting point. Attention Temperature sets the embedding's character — below 1 focuses sharply on the strongest feature, above 1 blends multiple. Vertical Range adjusts field height, Color Intensity overall opacity. Enabling Apply Uncertainty Softening darkens uncertain price levels so confident bands stand out. Raising Price Resolution makes finer bands but watch the drawing-object limit (up to ~120).
💡 How to Use in Practice
Bright bands are price levels where market energy concentrates, marking levels that historically drew large interest (volume, momentum, volatility). These tend to act as support/resistance, and moments where price approaches them are worth attention. Dark, blurred-looking bands indicate high uncertainty and lower confidence. The HUD's focused feature reveals what currently drives the market. Used together with AE-LIQ (the liquidation heatmap), you can find levels where liquidation bands and energy bands coincide — doubly significant levels.
⚠️ Important Notes
This tool is inspired by deep learning and attention, not a true backprop-trained neural network. External libraries like NeuraLib, and animation/particle/blur effects, are impossible in Pine and are not included. Energy bands are a visualization of market state, not predictions. The heatmap rebuilds only on the last bar and does not repaint confirmed history. Pushing Price Resolution too high may hit the drawing-object limit and break the display.
🚨 Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. No output guarantees future prices, and past performance does not indicate future results. All trading decisions are made at your own risk. Indicator

AetherEdge - Adaptive Liquidation Heatmap🖊️ Overview
AE-LIQ is a liquidation-level estimation engine in the spirit of CoinGlass-style liquidation heatmaps. It estimates the price levels where leveraged liquidation orders cluster and renders them as bright horizontal bands — the "magnets" price tends to be drawn toward. Real liquidation maps use exchange position data, but since Pine can only access price and volume, this tool estimates from those by back-solving liquidation prices for several leverage tiers, emphasizing the bands that work via adaptive learning.
🔶 Key Features
Liquidation-band estimation: back-solves liquidation prices for 5×/10×/25×/50×/100× leverage
Volume weighting: each bar's volume serves as a position-size proxy for band intensity
Swept decay: bands price has already traded through are decayed, emphasizing un-swept bands (remaining liquidity)
Long/short selection: long liquidations (below) and short liquidations (above) can be shown separately
Adaptive tier reliability: online-learns whether price reaching each tier's bands actually reacted, emphasizing the effective ones
Viridis palette (purple→teal→green→yellow) reproducing the CoinGlass aesthetic
Integrated HUD showing the strongest leverage tier and each tier's reliability
🧠 Technical Architecture
Liquidation distance is approximated by the inverse of leverage (≈10% for 10×, ≈4% for 25×). From each bar's price, liquidation prices are back-solved for every enabled leverage tier, and a volume-based weight is added to the row (price bin) that price occupies. Higher leverage produces tighter, more crowded bands weighted more heavily. The accumulated row energy is normalized, bands price recently swept are decayed by the configured amount ("liquidated"), and un-swept bands remain bright. The AI layer checks whether, historically, price reaching each tier's liquidation distance actually produced an ATR-scaled reaction, updating per-tier reliability via an exponentially-weighted average. More reliable tiers gain band weight and visual emphasis. Rendering uses per-row horizontal box transparency grading, with Viridis-spectrum brightness encoding energy magnitude.⚙️ Recommended Settings & Tuning Guide
Tuned with crypto in mind. Price Resolution 60 and Accumulation Lookback ~250 are a starting point. On high-volatility instruments, raise Vertical Range to cover a wider price span. Swept-Band Decay controls how much traded-through bands are erased — higher leaves only the un-swept bands vivid, like CoinGlass. If cluttered, turn off unneeded tiers or restrict to one side (long/short).
💡 How to Use in Practice
Bright yellow bands read as price levels where heavy liquidations sleep — magnets that attract price. Price often moves toward such bands, and reaching them tends to trigger large volatility (liquidation cascades). The brightest bands above and below current price offer references for short-term targets and risk management. The HUD's strongest tier shows which leverage layer actually functions as a magnet on this instrument, guiding which bands to prioritize. Pairing with other structure analysis and favoring levels where liquidation bands align with support/resistance is effective.
⚠️ Important Notes
This tool is Estimated and differs from a real CoinGlass liquidation map. Exchange open-interest and leverage-distribution data cannot be accessed in Pine, so this is an approximation back-solved from price and volume, and may diverge from the actual distribution of liquidation orders. Liquidation bands are probabilistic estimates, not certain price targets. The heatmap rebuilds only on the last bar and does not repaint confirmed history. The AI reliability learning requires accumulated data.
🚨 Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. No output guarantees future prices, and past performance does not indicate future results. All trading decisions are made at your own risk. Indicator

MTF RSI Synchrony | Rainbow MatrixGENERAL OVERVIEW
The MTF RSI Synchrony is a multi-timeframe RSI fusion oscillator that aggregates five independent RSI readings — one per Fibonacci-spaced timeframe — into a single weighted Master Line. Each per-timeframe RSI is also plotted as a "ghost line" that fades by distance to the Master: when the five timeframes align, the rainbow renders solid; when they diverge, the ghost lines spread visibly across the pane, making synchrony itself a visible density property rather than a number to compute.
The main goal of this indicator is to give traders a single integrated read of RSI across multiple horizons — without flipping between charts, mentally averaging values, or guessing which timeframe's RSI matters at the current decision point. Every line, color, and divergence event on the pane was derived from real RSI calculations on each native timeframe, not approximated from the current chart's resolution.
It computes the Master Line from five timeframes via Fibonacci-proportioned weights (peak weight on the macro middle TFs), classifies the result through an adaptive Fibonacci channel that builds Z-Breathing / Z-Alert / Z-Exhaustion / Black Swan zones around the Master, and runs a classic price↔RSI divergence engine on each of the 5 TFs plus the Master line independently. A 5-column MTF Legend Table surfaces every TF's state at a glance, with an antenna marker (📡) flagging the row whose timeframe matches the chart's native resolution.
This indicator was developed for traders who already understand RSI and divergence concepts and want to see them across multiple timeframes in a single visual, with automatic synchrony detection and an integrated classic divergence layer.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
Most RSI implementations on PulseWire operate on a single timeframe. They show you a value between 0 and 100 for the current chart and leave the multi-timeframe assessment to manual work — flipping between charts, sketching trendlines, or stacking multiple instances of the indicator on different intervals. This treats each timeframe as an isolated decision space.
The problem: institutional momentum is not isolated to one timeframe. The participants operating on the daily horizon see different RSI conditions than those operating on the weekly or 4-hour horizon. When the 15-minute RSI flips above 70 but the daily RSI is still neutral, the overbought signal is local — likely a counter-trend bounce. When the 15-minute RSI flips above 70 and the daily RSI also approaches the upper zone, the overbought signal is structurally agreed across horizons — far more likely to mark a multi-horizon exhaustion.
This indicator addresses that by extracting RSI from five user-configured timeframes simultaneously via request.security, fusing them via canonical Fibonacci weights (peak weight on the macro middle TFs), and rendering both the integrated Master signal and each contributing TF's individual reading on the same pane. The math of the per-TF extraction is standard RSI on the native bars — what makes it useful is doing it across five timeframes at once, weighting them by structural significance, and surfacing both the alignment and the per-TF divergences in a single visual.
The classic divergence layer addresses a parallel problem: textbook regular divergence (price↔RSI on the same timeframe) is a well-known reversal cue, but traders typically watch it on one timeframe at a time. By running pivot-based divergence detection independently on each of the 5 TFs and on the Master line, the indicator surfaces local divergences (on fast TFs — often noise) versus structural divergences (on slow TFs — often precede major reversals) in the same table view, with the Master line acting as the integrated read drawn directly on the chart.
MTF RSI SYNCHRONY FEATURES
The indicator includes 7 main features:
◇ Multi-Timeframe RSI Fusion Engine
◇ Adaptive Fibonacci Channel (Master Volatility Envelope)
◇ Hybrid Black Swan Zone (static or dynamic)
◇ Classic Divergence Detection Engine (per-TF + Master)
◇ MTF Legend Table with antenna marker
◇ Per-Timeframe RSI Length Customization
◇ Multilingual interface (5 languages) and full visual customization
MULTI-TIMEFRAME RSI FUSION ENGINE
🔹 What It Does
The core of the indicator. For each of the five configured timeframes, an independent RSI reading is extracted at its native resolution. The five readings are then fused into a single Master Line via canonical Fibonacci-proportioned weights.
🔹 Method
The extraction runs via request.security with lookahead=barmerge.lookahead_off to prevent repainting. Per-timeframe RSI uses Wilder's standard formulation. The Master is computed as a weighted average with the following Fibonacci weights:
◇ TF1 (Trigger, default 5m): 0.15
◇ TF2 (Intraday, default 15m): 0.20
◇ TF3 (Macro 1, default 60m): 0.25 (peak weight)
◇ TF4 (Macro 2, default 240m): 0.25 (peak weight)
◇ TF5 (Base, default Daily): 0.15
The peak weight sits on the macro middle TFs (TF3 + TF4), where institutional decisions consolidate. The Master is clamped to the 0–100 RSI range.
🔹 Ghost Line Rendering
Each per-timeframe RSI is plotted as a ghost line with transparency inversely proportional to its absolute distance from the Master. The fade sensitivity is configurable (default 3.5): at distance 0 the line is solid (transparency 20), at ~20 RSI points away it becomes effectively invisible. Synchrony emerges as a visible density property — when the five lines collapse toward the Master, the rainbow is solid; when they spread, the pane fills with translucent ghosts.
ADAPTIVE FIBONACCI CHANNEL
🔹 What It Does
The Master Line is wrapped in an adaptive volatility channel built from its own highest/lowest over a configurable lookback (default 50), EMA-smoothed (default 10). From the channel envelope, four Fibonacci-proportioned zones are derived above and below the channel midpoint:
◇ Z-Breathing (1.50σ proportion) — yellow (high) / green (low)
◇ Z-Alert (1.85σ anchor) — orange (high) / teal (low)
◇ Z-Exhaustion (2.75σ proportion) — red (high) / blue (low)
◇ Black Swan (3.85σ proportion) — purple (high) / aqua (low)
🔹 Why It Matters
The 30/50/70 lines of classic RSI are static — they don't adapt to the volatility regime of the current instrument or timeframe. The Fibonacci channel does. In a low-volatility regime, the Z-Exhaustion zone tightens and the script flags exhaustion at lower thresholds; in a high-volatility regime, the channel widens and only genuine outliers reach the extreme zones. The Master's position within the channel — color-coded continuously — is a regime-aware read on momentum saturation that the fixed 30/70 lines cannot provide.
HYBRID BLACK SWAN ZONE
🔹 What It Does
The Black Swan threshold operates in hybrid mode:
◇ OFF (default): classic 80/20 RSI extremes — the conventional Wilder oversold/overbought boundaries.
◇ ON: dynamic Fibonacci 3.85σ proportion of the Master channel — adapts to current volatility.
🔹 Method
When dynamic mode is enabled, the Black Swan High becomes osc_up4 = dyn_mid + (dist_up × 3.85/1.85), and the Low becomes dyn_mid − (dist_dn × 3.85/1.85). Both are clamped to . The threshold breathes with the channel — wider in volatile regimes, tighter in calm ones.
🔹 Visual Design
Black Swan zones render as a line + proximity-based glow only — NO fill is drawn underneath, by design. This is a hard rule of the indicator's visual grammar: every other zone (Breathing, Alert, Exhaustion) has a fill; Black Swan is line + glow only, making the extreme zone visually distinct from the gradient zones below it.
CLASSIC DIVERGENCE DETECTION ENGINE
🔹 What It Does
Regular divergence (price↔RSI on the same timeframe) is detected independently on each of the 5 timeframes and on the Master line:
◇ Bear divergence (top): price made higher high + RSI made lower high — momentum failing to confirm the new price peak; exhaustion warning.
◇ Bull divergence (bottom): price made lower low + RSI made higher low — momentum failing to confirm the new price trough; accumulation signal.
🔹 Method
Pivot detection runs via ta.pivothigh and ta.pivotlow with a configurable lookback (default 5 bars before and after). For each timeframe, the previous pivot and current pivot are compared on both price and RSI. A divergence is flagged when price and RSI move in opposite directions across the two pivots, gated by na guards to handle cold-start conditions.
🔹 Two Layers of Output
The detection produces two complementary outputs:
◇ Per-TF divergence flags are rendered in the Legend Table 'Div' column (🔺 bull / 🔻 bear / — none, color-coded). This gives granular per-horizon insight: which exact timeframe is showing divergence right now.
◇ Master divergence — the integrated MTF signal — is additionally drawn on the indicator pane as a line connecting the two pivots, with a "🔺 Bull Div Master" or "🔻 Bear Div Master" label at the second pivot. An alert is available (toggleable, ON by default).
🔹 Why Two Layers
Per-TF divergences answer "where is the divergence forming?" — fast TFs (TF1, TF2) often catch local noise; slow TFs (TF4, TF5) catch structurally significant turns. Master divergence answers "is the integrated MTF view showing exhaustion?" — Master fuses all five TFs into one signal weighted by significance, so its divergence is the consolidated read. The strongest setups occur when both layers agree: Master divergence drawn on the chart + multiple Legend Table 'Div' cells lighting up in the same direction.
MTF LEGEND TABLE
🔹 What It Shows
A compact 5-column table renders inside the indicator pane (force_overlay=false for mobile readability), with 8 rows:
◇ Row 0: title header (multilingual)
◇ Rows 1–5: per-timeframe data — color-coded RSI value, timeframe resolution, trend arrow (▲ rising / ▼ falling / ▬ flat with ±0.5 RSI point deadzone to avoid flicker), and classic divergence cell (🔺/🔻/—)
◇ Row 6: Master row — displays "🌈 Master (~XhYm)" where XhYm is the geometric weighted mean of the 5 active timeframes (e.g. ~1h11m for the default 5/15/60/240/D set), with the Master's RSI value, trend arrow, and divergence state
◇ Row 7: MTF Divergence status row — tracks RSI alignment between TF1 and TF5
🔹 Antenna Marker
An antenna marker (📡) appears at the end of the timeframe label on the row whose timeframe matches the chart's native resolution. Start the read at the antenna row — that's your chart's RSI — then scan up to faster TFs and down to slower TFs to see whether they confirm or contradict the current read.
🔹 MTF Divergence Status Row (TF1 ↔ TF5)
Separate from the classic per-TF divergence: the status row at the bottom tracks RSI alignment between the fastest and slowest configured timeframes:
◇ Aligned (TF1 and TF5 in the same zone): trend continuation, no MTF divergence.
◇ Strong Divergence (TF1 ≥ 70 vs TF5 ≤ 30, or mirrored): fast and slow timeframes telling completely opposite stories. Common at major turning points.
◇ Moderate Divergence (TF1 ≥ 65 vs TF5 ≤ 40, or mirrored): partial misalignment between fast and slow.
PER-TIMEFRAME RSI LENGTH CUSTOMIZATION
🔹 What It Does
RSI period defaults to 14 globally — Wilder's canonical setting. Each of the 5 timeframes has an optional length override: zero means inherit the global default, any positive integer means use that period for that timeframe only.
🔹 Why It Helps
Real-world strategies often want different RSI sensitivities at different horizons. Scalpers use 7-9 on the trigger TF for fast signals while keeping 14 on slower TFs for stability. Swing traders use 14-21 on intraday TFs and 21+ on the daily for smoother reads. Connors-style strategies use 2 on the trigger for mean-reversion. The hybrid pattern keeps the settings panel clean for casual users (one input controls all) while letting power users specialize per TF when needed.
MULTILINGUAL INTERFACE
The indicator supports five languages for the HUD display, Legend Table headers, and alert messages: English (default), Português, Español, Русский, and 中文 (Chinese). Code, comments, and configuration tooltips remain in English regardless of the selected language. Tech abbreviations (RSI, MTF, HTF, TF) stay Latin in all language contexts — they are universally recognized in trading and translation would add noise.
For reference, the multilingual coverage includes:
◇ HUD title and all row labels
◇ Trend arrows (universal: ▲▼▬)
◇ Divergence cells (universal: 🔺🔻—)
◇ MTF Divergence status row (Aligned / Strong / Moderate, with Top/Bottom directional labeling)
◇ All alert messages including the new classic divergence alerts
HOW TO USE
This indicator is not a signal generator. It is a structural map: it tells you where RSI sits across multiple horizons, how aligned (or divergent) those horizons are, and where classic price↔RSI divergence is forming.
🔹 Reading the Rainbow
◇ Solid rainbow + Master near equilibrium (30–70 zone): no clear signal. Trending behavior absent.
◇ Solid rainbow + Master in Z-Alert (orange/teal): trend in motion across all horizons. Look for follow-through confirmation.
◇ Solid rainbow + Master in Z-Exhaustion (red/blue): elevated probability of mean reversion. Multiple horizons agreeing on saturation.
◇ Master touches Black Swan (purple/aqua glow): statistically rare overshoot. High-probability reversal setup, especially when the MTF Divergence row also fires Strong.
◇ Ghost lines visibly spread far from Master: synchrony breakdown. Wait for re-convergence before high-conviction entries.
🔹 Reading the Legend Table
◇ Antenna row (📡): your chart's native TF. Start there.
◇ Scan above the antenna: faster TFs. If they're in extremes opposite to the antenna, the local signal is conflicted.
◇ Scan below the antenna: slower TFs. If they're aligned with the antenna, the structural bias confirms.
◇ Master row: the integrated read. The "~XhYm" label tells you where Master sits in the TF spectrum.
🔹 Reading the Classic Divergence Layer
◇ Single TF lit up (e.g. only TF2 shows 🔻): local divergence. Often noise on fast TFs.
◇ Multiple TFs lit up in the same direction: structurally significant. Confluence of divergence across horizons.
◇ Master divergence drawn on chart + 2 or more TFs in same direction: high-conviction reversal setup. The strongest signal this indicator produces.
◇ Divergence appearing on slow TFs (TF4 / TF5) while fast TFs are quiet: often precedes major reversals — slow-horizon participants are pulling away before fast-horizon ones notice.
🔹 Tactical Reading
◇ Master in Z-Alert + MTF status Aligned: with-trend continuation setup.
◇ Master in Z-Exhaustion + Bear Div drawn on chart + 2 TFs 🔻: short setup with multi-horizon confirmation.
◇ Master at Black Swan Low + Bull Div drawn on chart + Strong MTF Divergence (TF1 ≤ 30 vs TF5 ≥ 70 mirrored): rare confluence of multiple exhaustion signals.
INPUTS EXPLAINED
🔹 System Language
Display language for the HUD and alert messages. Options: English (default), Português, Español, Русский, 中文 (Chinese).
🔹 Multi-Timeframe (TF1 to TF5)
Configure each of the five timeframes to scan. Defaults: 5m / 15m / 60m / 240m / Daily. Plus AI Auto-Sync option that adjusts the 5 TFs based on chart resolution.
🔹 Default RSI Length + 5 Per-TF Overrides
Default 14 applied globally; per-TF override is 0 by default (inherit). Set override > 0 to specialize per TF.
🔹 Dynamic Black Swan Mode
OFF (default): static 80/20 thresholds. ON: dynamic Fibonacci 3.85σ proportion of the Master channel.
🔹 Dynamic Channel Lookback + Smoothing
Lookback for highest/lowest of Master (default 50). EMA smoothing applied to the channel envelope (default 10).
🔹 Divergence Pivot Lookback
Lookback (bars before/after) for the classic divergence pivot detection. Default 5 — matches most community divergence indicators.
🔹 TF Colors + Show/Hide Toggles
Color and visibility for each of the 5 ghost lines. Hiding a TF does NOT remove it from the Master fusion — the calculation continues; visibility is purely visual.
🔹 Ghost Fade Sensitivity
Higher = ghost lines fade more aggressively as they diverge from the Master. Default 3.5 (invisible at ~20 RSI points apart).
🔹 Show Master Line / Fills / Black Swan / Channel / Legend Table / Static Levels / Div Column / Div Chart Line
Independent toggles for each visual layer.
🔹 Legend Table Position + Font Sizes
Position of the table (four corners) and separate font sizes for data rows and label rows.
🔹 Alert Toggles
Master crosses Black Swan High / Low — fires when Master crosses the threshold.
Strong MTF Divergence — fires when TF1 vs TF5 enter opposite extremes.
Master enters Z-Exhaustion — fires when Master enters the red/blue zone (OFF by default to avoid overlap with Black Swan alerts).
Master Classic Divergence — fires when classic bear or bull divergence is detected on the Master line (ON by default).
IMPORTANT NOTES
The MTF RSI Synchrony works on any timeframe. The default radar configuration (5m/15m/60m/240m/D) is calibrated for intraday and swing trading on liquid instruments. For position trading or scalping, the radar timeframes can be reconfigured to scan longer or shorter horizons respectively, or AI Auto-Sync can be enabled to let the engine pick automatically.
The script makes 10 request.security calls in total (5 for the RSI extraction + 5 for the per-TF divergence detection). On low-volatility chart resolutions or weaker hardware, chart load may take a moment longer than for a single-TF RSI; this is expected and normal.
Alerts fire once per confirmed bar (alert.freq_once_per_bar + barstate.isconfirmed gating). Historical bars never repaint after they close. The live bar updates intra-bar as expected for a real-time indicator.
The Fibonacci channel calibration (ratios 1.50 / 1.85 / 2.75 / 3.85) is the canonical Rainbow Matrix ratio set, also used in other portfolio scripts for consistency.
Pine Script v6. Open-source under Mozilla Public License 2.0.
UNIQUENESS
The MTF RSI Synchrony is unique in three ways. First, it performs RSI extraction across five timeframes simultaneously via request.security with Fibonacci-proportioned weights — the integrated Master Line is not a smoothed version of one TF but a true weighted fusion of five independent RSIs, with peak weight on the macro middle TFs where institutional decisions consolidate. Second, the per-timeframe RSIs are rendered as fade-by-distance ghost lines around the Master, transforming synchrony itself into a visible density property — when the timeframes align the rainbow is solid, when they diverge the ghost lines spread visibly across the pane, without requiring the trader to read numbers. Third, the classic divergence detection runs in parallel on each of the 5 timeframes plus the Master line, producing two complementary outputs: a per-TF Legend Table column for granular per-horizon insight and a Master-line chart visual (line connecting pivots + label) for the integrated MTF signal. The combination of weighted multi-timeframe fusion, density-based synchrony visualization, and two-layer divergence detection produces a structural map of RSI behavior that single-timeframe RSI indicators cannot provide — particularly at decision points where multiple horizons converge or where slow-horizon divergences emerge before they reach fast-horizon attention. Indicator

AetherEdge - Contrastive Similarity Engine🖊️ Overview
The Contrastive Learning Similarity Engine is a pattern-matching engine inspired by the principles of contrastive learning (SimCLR). It encodes the current market state into a feature embedding, contrasts it against every past window via cosine similarity, and surfaces the closest historical analogue. When a high-similarity pattern is found, it overlays that analogue's subsequent price action onto the present as a translucent Ghost Chart — "last time this shape appeared, price did this."
🔶 Key Features
SimCLR-inspired contrastive similarity space: shape-based cosine matching
Adaptive feature weights: a contrastive adaptation that online-learns which features proved predictive
Top-K matching: extracts the several closest historical analogues
Ghost Chart overlay: projects the analogue's "what happened next," anchored at current price
Ghost-all-top-K: overlays multiple historical outcomes as a fan distribution
Match-origin marker: shows where in history the analogue occurred
Match-accuracy tracking: learns and displays how often high-similarity projections were correct
Exploratory palettes (Spectral Scan et al.) with an integrated HUD
🧠 Technical Architecture
This tool is a translation that realizes SimCLR's core idea within Pine, which has neither autodiff nor deep nets. The encoder converts a price window into successive log returns, then mean-removes and L2-normalizes them into a shape vector (capturing form, not absolute price, so it's level-independent). Matching computes the weighted cosine similarity between the current vector and every past window, extracting the best match and Top-K.
The contrastive learning layer checks, after an outcome horizon, whether the direction a high-similarity match projected was actually correct, then reinforces (pulling positives together) or attenuates (pushing misleading ones apart) the feature weights — an online realization of SimCLR's contrastive adaptation. Because compute is O(search depth × window length), it runs only on the last bar to avoid Pine's loop limit. The Ghost Chart applies the matched analogue's subsequent cumulative return to the current price, drawing it forward as translucent lines.
⚙️ Recommended Settings & Tuning Guide
Tuned with crypto in mind. Pattern Window 20 and Search Depth ~400 are a starting point. Min Similarity sets match strictness — 0.80+ accepts only strong matches with closely-aligned shapes. For short-term patterns use Pattern Window near 10; for larger structures near 40. Raising Search Depth explores richer history but is heavier — reduce it if slow. Enabling Ghost All Top-K reveals the spread of multiple historical outcomes rather than a single one.
💡 How to Use in Practice
The Ghost Chart visualizes how past analogous situations resolved, serving as a hypothesis for how the current pattern might resolve. When multiple Top-K ghosts converge in one direction, conviction in that direction is relatively higher; when they fan out widely, the same shape historically led to diverse outcomes — read as hard to predict. If the HUD's match accuracy stably exceeds 50%, it suggests pattern repetition carries predictive power on this instrument and timeframe. Overlaying with other structure tools and support/resistance, and favoring moments where the ghost's direction agrees with other evidence, is effective.
⚠️ Important Notes
This tool is SimCLR-inspired, not a true backprop-trained contrastive network; within Pine's constraints it reproduces the core idea in a feasible form. The Ghost Chart is a replay of past analogues, not a prediction — there is no guarantee the same shape leads to the same outcome. Matching runs only on the last bar and does not repaint confirmed history. Learning the feature weights requires accumulated data and cannot overcome the fundamental constraint of market predictability. Excessively large Search Depth may approach the runtime limit.
🚨 Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. No match or ghost guarantees future prices, and past performance does not indicate future results. All trading decisions are made at your own risk. Indicator

AetherEdge - Generative Flow Synthesizer🖊️ Overview
The Generative Flow Synthesizer is a path-synthesis engine inspired by the principles of a Variational Autoencoder (VAE), learning the market's "generative distribution." It compresses past price action into a low-dimensional latent distribution, samples latent variables via the reparameterization trick, and synthesizes multiple future price paths from them. Unlike conventional tools that draw a single forecast line, it renders the very spread of plausible futures as a stream of generated samples flowing forward like particles.
🔶 Key Features
VAE-inspired generative model: encode (latent compression) → sample (reparameterization) → decode (path expansion)
Reparameterization trick: latent sampling via z = μ + σ·ε (identical math to a real VAE)
Central predicted flow: a deterministic mean path generated from the latent mean
Multiple generated sample paths: stochastic draws from the latent distribution stream forward like particles
Generative confidence band: a ±σ uncertainty envelope widening each step
Online-learned latent distribution: drift, volatility, and autocorrelation adapt via EWMA
Sampling temperature: control future spread from conservative to bold
Mean-reversion strength: tune from pure random walk to convergent paths
Generative/fluid palettes (Plasma Flow et al.) with particle fade toward the horizon
🧠 Technical Architecture
This tool is a translation that realizes the VAE's mathematical core within Pine, which lacks autodiff. The encoder extracts sufficient statistics from log returns — drift (mean), volatility (standard deviation), and autocorrelation (persistence) — and online-learns the latent distribution parameters (μ, logσ²) via EWMA, a Pine realization of the posterior an encoder network would learn.
The sampling stage is identical to a real VAE, drawing latent variables through the reparameterization trick z = μ + σ·ε (ε a standard normal via Box–Muller). The decoder expands each latent sample into a forward price path through a mean-reverting stochastic process r_t = z + φ·(r_{t-1} − z) + σ·temp·ε_t. Because each path uses its own random sequence, they diversify like particles. The central predicted flow is the deterministic mean path with the noise term removed; the confidence band is the ±σ envelope built from accumulated step variance.
⚙️ Recommended Settings & Tuning Guide
Tuned with crypto in mind. On BTC and ETH, Encoder Window 60 and Generation Horizon ~24 are a starting point. Sampling Temperature is the generative core — below 1 yields narrow, conservative futures; above 1, wide, bold exploration. In trends, lower Mean-Reversion Strength for freer paths; in ranges, raise it for convergent paths, matching the possibility distribution to market character. Number of Sample Paths trades visual richness against compute; ~12 is a good balance.
💡 How to Use in Practice
The central predicted flow serves as the model's most average future trajectory for reading trend bias. The spread of the sample paths (particle scatter) expresses uncertainty itself — tight scatter signals clear direction, wide scatter a hard-to-predict regime. The confidence band width offers an objective reference for stop placement and target setting. For multi-timeframe trading, pair a higher-timeframe generative flow with a lower timeframe for timing.
⚠️ Important Notes
This tool is VAE-inspired, not a true backprop-trained neural-network VAE; within Pine's constraints it reproduces the VAE's core principles in a feasible form. Generated paths are samples from a learned distribution, not predictions of the future — purely a visualization of the spread of possibilities. Generation occurs only on the last bar and does not repaint confirmed history. Learning the latent distribution requires accumulated data and cannot overcome the fundamental constraint of market predictability.
🚨 Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. No generated path guarantees future prices, and past performance does not indicate future results. All trading decisions are made at your own risk. Indicator

Trend Volatility RegimeThe Trend Volatility Regime is an all-in-one trend-following model that identifies changes in the market regime by combining moving-average crossover signals with volatility-adaptive trailing stops. It features an integrated backtesting engine that provides institutional-grade insights into historical strategy performance, along with a built-in alert system that notifies investors in real time when regime changes occur. The model integrates seamlessly into the price chart and presents backtest results in a clear, color-coded table benchmarked against buy-and-hold.
At its core, the model combines two complementary trend detection components to determine the prevailing market regime. The first component identifies the underlying structural trend using a volatility-adjusted moving-average crossover based on the spread between fast and slow moving averages. The second component identifies trend reversals using an adaptive trailing stop based on changes in price and volatility. Bullish and bearish regimes occur when both crossover and volatility signals are directionally aligned, while conflicting signals result in neutral regimes.
Bullish Crossover Signal = (Fast MA – Slow MA) > (ATR × Trend Margin)
Bearish Crossover Signal = (Fast MA – Slow MA) < –(ATR × Trend Margin)
Bullish Volatility Signal = Price > (Highest Price – (Volatility × Stop Factor))
Bearish Volatility Signal = Price < (Lowest Price + (Volatility × Stop Factor))
By default, the model applies an asymmetric regime design in which conflicting signals default to a bullish regime unless half-equity positions are enabled in the menu. This asymmetric design reflects the tendency of risk assets to deteriorate gradually while recovering more abruptly. The moving-average component captures the slower deterioration typically observed during market tops, while the trailing stop component responds more dynamically to faster reversals typically observed at market bottoms. This helps reduce overreaction to corrections during uptrends while still allowing for faster re-entry following sharp recoveries. To evaluate the performance of different parameter configurations, the model includes a built-in table with the following metrics:
CAGR = Compounded Annual Growth Rate.
Excess = CAGR in excess of buy-and-hold.
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Alpha (α) = Excess annualized risk-adjusted returns.
Win Rate = Ratio of profitable trades to total trades.
Profit Factor = Total gross profit per unit of losses.
Expectancy = Average expected return per trade.
Turnover = Average annualized change in exposure.
This indicator is designed with flexibility in mind, enabling users to specify the start date of the backtesting period, the preferred trend type, volatility type, and regime visualization. Supported regime visualizations include line, candle, and shaded background. Supported moving-average types include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), and Weighted Moving Average (WMA). Supported volatility types include the Average True Range (ATR), Standard Deviation (SD), and Mean Absolute Deviation (MAD). Supported price sources include Close, HL2, HLC3, and OHLC4. The table follows an intuitive color-coded logic that allows for quick performance comparison against buy-and-hold (B&H):
CAGR = Green indicates above 0%, while red indicates below 0%.
Excess = Green indicates above 0%, while red indicates below 0%.
Sharpe = Green indicates better than B&H, while red indicates worse.
Sortino = Green indicates better than B&H, while red indicates worse.
Calmar = Green indicates better than B&H, while red indicates worse.
Max DD = Green indicates better than B&H, while red indicates worse.
Alpha (α) = Green indicates above 0%, while red indicates below 0%.
Win Rate = Green indicates above 50%, while red indicates below 50%.
Profit Factor = Green indicates above 2, while red indicates below 1.
Expectancy = Green indicates above 0%, while red indicates below 0%.
In summary, the Trend Volatility Regime is a comprehensive trend-following tool designed to help investors stay on the right side of the market by identifying key changes in the market regime. By combining volatility-adjusted moving-average crossover signals with adaptive volatility-based trailing stops, the model seeks to maximise participation during uptrends while reducing exposure during sustained downtrends. While the model provides valuable historical insights, users should remain mindful that past results may not necessarily persist under future market conditions. Indicator

ValidationUtilitiesValidationUtilities Library
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- 1. INTRODUCTION --------- 🌸
💮 What Does This Library Contain?
ValidationUtilities is a centralised validation framework for Pine Script. It replaces scattered, ad-hoc input checks with a single, structured validation pass that catches every misconfiguration before a script begins operating.
The library spans the full validation workflow: framework lifecycle, configuration checks, position sizing guards, and signal completeness verification.
💮 Key Categories
The library contains:
Core Framework : the ValidationFramework UDT and its lifecycle methods (init, collect, report)
Standalone Utilities : bounded-buffer push and division-by-zero guard
Configuration Validation : range, ordering, exclusivity, lookback, source, and timeframe checks
Position Sizing & Risk : order size constraints, progressive risk alerts, allocation distribution, and Martingale safety
Signal & Timing : signal source completeness and cooldown gating
🌸 --------- 2. ADDED VALUE --------- 🌸
💮 Consistent, Readable Error Messages
Every error and warning follows the same Message format. Users see clear, categorised feedback instead of cryptic runtime error strings. A single validation pass surfaces all issues at once, so there is no need to fix one error only to hit the next on re-run.
💮 Single Import, Full Coverage
One import replaces dozens of inline validation blocks. Range checks, allocation constraints, timeframe guards, and position sizing validations are all available immediately.
💮 Errors and Warnings, Separated
Hard/soft boundary separation lets developers enforce critical constraints (errors halt execution via runtime.error() ) whilst still surfacing non-critical suggestions (warnings display as chart labels). The framework handles formatting, counting, and display.
💮 Proven in Production
ValidationUtilities underpins the validation layer of a strategy with an extensive configuration surface (12+ validated parameter groups). The methods have been refined against real misconfiguration scenarios including floating-point allocation sums, multiplier escalation, and unconnected data streams.
🌸 --------- 3. CORE FRAMEWORK --------- 🌸
💮 ValidationFramework (UDT)
The central data structure that collects validation results. It holds two string arrays, errors (critical, halt execution) and warnings (advisory, continue execution), alongside convenience flags has_errors and has_warnings .
Declare once with var , then call init() to reset state before each validation cycle:
var framework = vu.ValidationFramework.new()
framework.init()
💮 init()
Resets the framework: clears both arrays and resets flags to false . Call at the start of each validation cycle.
💮 add_error() and add_warning()
Building blocks for custom validation beyond the built-in methods. Both accept a category and message , formatting them as Message . Use add_error() for constraints that must halt execution and add_warning() for advisory messages.
framework.add_error("Position Sizing", "Order exceeds account equity.")
framework.add_warning("Risk", "Position represents 35% of equity — monitor carefully.")
💮 trigger_errors()
Fires runtime.error() with the first collected error and a count of any remaining. Always call after all validations have run so every misconfiguration is detected in a single pass.
💮 display_warnings()
Renders warnings as orange chart labels (below bar by default). Displays the first warning with a count of additional warnings, then clears state to prevent repetition. Accepts an optional yloc_arg for label placement.
↑ Runtime error dialog showing a categorised validation error with count of additional issues
↑ Warning labels displayed on the chart via display_warnings()
🌸 --------- 4. STANDALONE UTILITIES --------- 🌸
These functions are independent of the ValidationFramework and can be used anywhere.
💮 push_limited()
A FIFO bounded-buffer push: appends a value and evicts the oldest entry when the array exceeds a specified limit. Available for both float and int arrays.
vu.push_limited(price_buffer, close, 50) // Keeps the last 50 closes
💮 safe_denominator()
Returns math.max(value, floor) to guard against division by zero. Default floor is 1e-9 .
ratio = numerator / vu.safe_denominator(denominator)
🌸 --------- 5. CONFIGURATION VALIDATION --------- 🌸
These methods validate user-facing settings before a script begins operating. Each accepts the framework as self and a category string for error grouping. Refer to the source code for full parameter details.
💮 validate_range()
Checks that a value falls within hard bounds (error if violated) and optional soft bounds (warning if outside the optimal range). Supports a value_unit label for message clarity. Returns true if within hard bounds.
💮 validate_exclusive_selection()
Ensures exactly one boolean flag is active among a set of mutually exclusive options. Produces an error listing which options were found active, or that none were selected.
💮 validate_ascending_order()
Verifies that an array of values is in ascending order. Supports strict (default) or non-strict comparison. Skips na values.
💮 validate_minimum_lookback()
Checks that a lookback parameter meets a caller-derived minimum. Accepts an optional fix_hint for the error message. Returns true if met.
💮 validate_source_connected()
Detects when an input.source() has no external indicator connected (it silently defaults to close ). Uses a 2-bar close heuristic. Accepts an is_enabled flag to skip the check when the relevant feature is disabled. Returns true if the source appears connected.
💮 validate_higher_timeframe()
Validates that a user-selected timeframe is sufficiently higher than the chart timeframe. Returns the integer multiplier, useful for scaling lookback periods. Produces an error if below min_multiplier (default 1.0).
🌸 --------- 6. POSITION SIZING & RISK --------- 🌸
These methods guard against position sizing errors and excessive risk exposure. See the source code for parameter details and default thresholds.
💮 validate_order_size_constraints()
Checks a proposed order against account equity and position size limits. Errors if the order exceeds equity or a hard cap; warns if the position exceeds a configurable percentage of equity. Returns true if no errors were added.
💮 validate_multiplied_sizing_risk()
Progressive risk alerting for scripts that scale position sizes with multipliers (Martingale, Anti-Martingale, or any multiplicative sizing). Applies three escalating thresholds:
Warning (default 25%): elevated risk
Error (default 50%): high risk
Critical (default 75%): exceeds safe limits
Also warns when the multiplier itself exceeds a configurable threshold. Returns true if no errors were added.
💮 validate_martingale_settings()
Validates Martingale/Anti-Martingale parameter consistency: multiplier range, streak bounds, and maximum possible escalation. Warns when maximum escalation exceeds 100×.
💮 validate_allocations()
Validates percentage distributions (0–1 scale) for take-profit levels, portfolio weights, or any system that divides a whole into parts. Checks individual allocations and total against 1.0 with floating-point tolerance. Supports both mandatory full allocation and partial allocation.
🌸 --------- 7. SIGNAL & TIMING --------- 🌸
These methods verify signal completeness and enforce cooldown periods. See the source code for parameter details.
💮 validate_signal_configuration()
Completeness check for signal sources. Validates that an enabled signal has a connected primary data stream, a secondary stream (if required), at least one signal mapping, and activity in at least one market regime (when regime filtering is enabled).
💮 validate_timing_cooldown()
Gating check for entry timing. Verifies that enough bars have elapsed since the last relevant event and that a valid entry signal is present. Both conditions produce warnings rather than errors.
🌸 --------- 8. USAGE EXAMPLE --------- 🌸
A typical validation lifecycle: import, initialise, run validations, then trigger errors and display warnings.
import GoemonYae/ValidationUtilities/1 as vu
// Declare once, reset each bar
var framework = vu.ValidationFramework.new()
framework.init()
// Configuration validation
framework.validate_range("Config", "ATR Lookback", i_atr_lookback, 1, 500, 10, 50, "bars")
framework.validate_exclusive_selection("Distance", "TP Mode",
array.from(i_use_pct, i_use_atr, i_use_hl),
array.from("Percentage", "ATR", "High/Low"), "method")
// Allocation validation
framework.validate_allocations("TP Settings", "Take Profit",
array.from(i_tp1_alloc, i_tp2_alloc, i_tp3_alloc),
array.from("TP1", "TP2", "TP3"), true)
// Position sizing guard
framework.validate_order_size_constraints("Sizing",
order_size, close, strategy.equity, max_pos, 50.0)
// Report results
framework.trigger_errors() // Halts if any errors found
framework.display_warnings() // Shows warnings on chart
When all inputs are valid, trigger_errors() does nothing and execution continues; display_warnings() draws no labels. A correctly configured script simply runs with a clean chart.
🌸 --------- 9. PRACTICAL USAGE NOTES --------- 🌸
💮 Errors vs Warnings
Use add_error() for constraints that make the script unsafe or logically broken (missing data streams, impossible parameter combinations, equity-exceeding orders). Use add_warning() for suboptimal but non-dangerous configurations (values outside the recommended range, elevated risk percentages). Errors halt execution; warnings inform via chart labels.
💮 Single-Pass Collection
Always run all validations before calling trigger_errors() . The framework collects every error in a single pass so the user sees the total count of issues.
💮 Integration with Other GYTS Libraries
ValidationUtilities complements the GYTS library ecosystem:
FiltersToolkit : smoothing and signal processing
VolatilityToolkit : volatility estimation and regime detection
ColourUtilities : dynamic colour mapping
MathTransform : mathematical transformations and normalisation
Each library handles its own domain; ValidationUtilities handles the validation layer that sits above them.
💮 Limitations
A few constraints to keep in mind:
The validate_source_connected() heuristic (2-bar close comparison) can produce false positives if a source genuinely tracks price closely. It is a best-effort detection, not a guarantee.
Pine Script libraries cannot import other libraries. So ValidationUtilities is designed for indicators and strategies.
The framework validates configuration state, not runtime state. It catches misconfigurations at the input level; it does not monitor runtime behaviour.
Library

Strategy

[MAD] SMC1. OVERVIEW
SMC Event Markers is a complete Smart-Money-Concepts toolkit that draws every major institutional footprint on the chart — and then ranks every zone by relevance so you instantly see which ones actually matter.
Most SMC indicators have the same problem: they paint dozens of FVGs, order blocks, and liquidity lines, and leave you to decide what to trade. After ten zones the chart looks like a dropped Lego set. This indicator solves that. Every active zone is scored 0–100 against five independent factors. Low-scoring zones fade or disappear automatically. A compact dashboard pins the top-ranked setups to a chart corner so you always know where the high-probability opportunities are.
The indicator detects 14+ SMC event types — FVG, IFVG, Order Blocks, Breaker Blocks, BSL/SSL, BPR, EQH/EQL, BOS/CHoCH, Sweep, IDM, Reversal Confirmed, Premium/Discount/Equilibrium, OTE, Volume Imbalance, SMT Divergence, PDH/PDL/PWH/PWL/PMH/PML, and ICT killzones. Every zone is ranked 0–100 by a relevance score built from five factors; opacity scales with that score so the eye is drawn to the bright zones while weak ones recede, and a threshold filter deletes the weakest zones entirely to free chart drawing budget. A top-N dashboard ranks the strongest setups by price, direction, age, and score. Three colour schemas — Default (customizable), Dark, and Light — are switchable globally, with all 22 default colours exposed as individual inputs. Per-type drawing caps and an FVG merge engine keep performance steady on busy timeframes.
2. HOW IT WORKS
SMC Event Detection
The script identifies institutional footprints in real time. Every event has its own creation logic and mitigation logic — once price returns and fills the inefficiency, the zone is removed from the chart.
Fair Value Gaps are 3-bar imbalances where the wicks don't touch, rendered as semi-transparent boxes with a centre-line at the consequent encroachment (CE). Order Blocks are the last opposite-coloured candle before a structure break, gated by minimum displacement (× ATR). Breaker Blocks are Order Blocks that flip side after price violates them, indicating role reversal. Liquidity (BSL / SSL) lines mark confirmed swing highs and lows where retail stops cluster, while BPR (Balanced Price Range) zones are detected as overlaps between opposing FVGs — high-probability institutional pivots.
EQH / EQL marks equal highs and lows within an ATR tolerance, identifying magnet liquidity. BOS / CHoCH distinguishes Break of Structure (continuation) from Change of Character (reversal); when a CHoCH prints shortly after a liquidity sweep, it is auto-tagged as Reversal Confirmed . The script also detects Sweep , IDM (Inducement) , and SMT divergence against a configurable reference symbol, and shades Killzones for the Asia, London, NY-AM, and NY-PM sessions in the timezone of your choice.
Confluence Scoring
For every active zone, the script counts how many other zones overlap its price range within an ATR-based tolerance. Confluence between an Order Block, a Fair Value Gap, and a previous-day high is the textbook setup smart-money traders look for — this metric quantifies it.
Composite Relevance Score
Each zone is scored 0–100 from five normalised factors with user-editable weights: Confluence (default 30%) measuring how many other zones overlap, Freshness (20%) decaying exponentially with bars since creation, Displacement (20%) capturing the size of the impulse that created the zone divided by ATR, Trend Alignment (15%) rewarding zones that match the current swing-structure direction, and Proximity (15%) favouring zones near current price normalised by ATR reach. Weights don't have to sum to 100 — normalisation happens internally. The score recalculates every bar, so as price moves the proximity factor updates and the ranking shifts in real time.
Visual Hierarchy
Opacity scales with score — a zone at score 90 is vivid; at score 35 it's nearly transparent. Same colours, different volume. The threshold filter takes this further: anything below a configurable score (default 30) is deleted, not just dimmed — this frees drawing slots and prevents drawing-limit overflow on busy charts. Every zone label optionally appends its score, e.g. "Bull OB 82".
Dashboard Panel
On the last bar, a compact table renders in the chart corner showing the top N zones ranked by score. Each row displays rank, type, price, direction, age in bars, and score with star rating and tier colour (≥80 green, ≥60 teal, ≥40 amber, <40 grey). The table updates with every new bar.
3. HOW TO USE
The Dashboard Workflow
Glance at the dashboard. The top 2–3 zones are your high-probability watchlist for this chart — combine the price level shown with the type and direction to plan your entries. If nothing has a score above 60, the market isn't offering quality setups; wait.
Trading Reversals
Look for this sequence on the chart. First, price sweeps a BSL or SSL line and a sweep label appears. Within a few bars, CHoCH prints — a close back through the opposing swing — and a Reversal Confirmed label fires at that CHoCH point. From there, look for a fresh Order Block or FVG in the direction of the new bias, ideally inside the Discount or Premium zone or the OTE. Enter on retracement to that zone, place your stop beyond the swept extreme, and target the opposite liquidity pool (the BSL or SSL on the other side).
Trading Continuations
After a BOS in the direction of the current trend, the OB or FVG that produced the break becomes a high-probability retracement entry. The dashboard will surface it automatically if its score is in the top tier.
Decluttering for Clarity
The Threshold input is your declutter dial. On a busy 1H chart with 50+ historical zones, set it to 60 — only the cream stays visible. On a clean 15m intraday, set it to 30 to keep more context. At 0, every detected zone is drawn (legacy mode).
Combine With Other Confluence
The scoring system already integrates intra-indicator confluence. For external confluence, overlay your higher-timeframe levels, a volume profile, or session VWAPs — anything that aligns with a high-score zone is a stronger setup.
4. SETTINGS
Settings are organised into logical groups in the dialog.
Structure: swing and internal pivot lengths, BOS / CHoCH toggles, HH/HL/LH/LL labels
Liquidity: BSL/SSL/INT_LQ toggles, sweep window, IDM, Reversal Confirmed
Order Blocks: minimum displacement (× ATR), Breaker conversion on violation
EQH / EQL: ATR tolerance for equal levels
Fair Value Gap: small-gap filter, extension bars, mitigation-on-close, BPR detection
FVG Merge: consolidates old overlapping FVGs by age and ATR tolerance
Volume Imbalance: body-to-body gap detection
Premium / Discount: range plot and OTE zone (62–79% retrace)
Previous H/L: PDH/PDL, PWH/PWL, PMH/PML toggles
SMT: divergence reference symbol (default NQ futures)
Killzones: session backgrounds in selectable timezone
Drawing Limits: per-type caps to control total draw count
Scoring: confluence tolerance, freshness decay, proximity reach, five weights, threshold, opacity toggle, score-in-label toggle
Dashboard: show / rows / position / cell size
Colors: schema enum (Default / Dark / Light) plus 22 individual colour inputs
Style: label size, extension bars, all event label text
5. DESIGN DECISIONS
This indicator was built around three principles.
Decluttering is more valuable than detection. Anyone can detect an FVG — the hard part is knowing which of the twelve currently on screen is the one you should care about. The scoring system exists because the trader's biggest enemy is signal-to-noise, not missing signals.
Every zone should justify its space. Opacity scaling and the threshold-delete behaviour mean that low-conviction zones don't merely fade — they're erased from the drawing pool, so the chart stays performant even on minute-tick instruments with thousands of bars of history. The drawing-limit caps (configurable per event type) reinforce this.
Customisation should be opt-in. The Default schema is the production-ready palette. Most traders won't touch the 22 colour inputs. But for designers who care, every base colour is individually editable. Dark and Light schemas exist as one-click presets for OLED users and light-theme users respectively.
6. CREDITS AND ATTRIBUTION
The Smart Money Concepts framework is a community-developed body of knowledge built on the work of Richard Wyckoff (1930s — accumulation / distribution cycles, composite-man theory), Charles Dow (higher-highs / higher-lows market structure), Michael J. Huddleston / ICT (modern SMC terminology — BOS, CHoCH, Liquidity, Breaker, FVG, OTE, Killzones), and the wider SMC trading community that refined, tested, and disseminated these ideas.
7. DISCLAIMER
For educational and informational purposes only — not financial advice. Past performance does not guarantee future results, and all trading decisions are made at your own risk. The author accepts no liability for any loss arising from use of or reliance on this script. Indicator

Money Flow Regime [forexobroker]Money Flow Regime reads the Chaikin-style accumulation/distribution flow of an instrument, z-normalises it over a rolling window, and sorts that reading into five symmetric regime bands (strong-in, mild-in, neutral, mild-out, strong-out). The active band sets a directional bias and a reclaim-EMA cross times the actual entry, so you act with the dominant money-flow rather than against it. The symmetric banding means the read and the rules are identical long or short.
🔶 ALGORITHM
1. Build a money-flow multiplier per bar: ((close - low) - (high - close)) / (high - low), times volume, accumulated into a running Accumulation/Distribution line.
2. Compute a Chaikin-style oscillator as the spread of a fast EMA minus a slow EMA of the A/D line.
3. Z-normalise that oscillator over the Normalise Window using its rolling mean and standard deviation to get a flow z-score.
4. Sort the z-score into bands: |z| >= Strong Band Z is a strong regime, |z| >= Mild Band Z is a mild regime, otherwise neutral. Sign of z sets the bias (inflow bullish, outflow bearish).
5. Once a tradable band sets the bias, a close-cross of the Entry Reclaim EMA in the bias direction times the entry. ATR is tracked for context.
🔶 SIGNAL LOGIC
- Buy: in-session AND regime is tradable AND flow bias is bullish AND close crosses over the reclaim EMA AND not already long AND cooldown elapsed AND barstate.isconfirmed (position-locked).
- Sell: in-session AND regime is tradable AND flow bias is bearish AND close crosses under the reclaim EMA AND not already short AND cooldown elapsed AND barstate.isconfirmed (position-locked).
Only fires when the flow band is tradable (mild-or-strong, or strong-only if Require Strong Band is on).
🔶 INPUTS
- Money Flow: Chaikin fast/slow EMA lengths, normalise window, and the band z thresholds; key default Chaikin Fast EMA = 3.
- Money Flow: Mild and Strong band z levels separate neutral, mild and strong regimes; default Strong Band Z = 1.0.
- Money Flow: ATR length for volatility context; default ATR Length = 14.
- Signal Logic: Entry Reclaim EMA that times the entry inside the bias; default Entry Reclaim EMA = 9.
- Signal Logic: Require Strong Band restricts trading to the strong regime only; default off.
- Signal Logic: Cooldown bars between signals; default Cooldown Bars = 5.
- Filters: optional session restriction with a session window; default Restrict to Session off.
- Visual: dashboard, 3-layer glow, reclaim-EMA plot, and buy/sell/background colors; dashboard default on.
🔶 ALERTS
MFR Buy, MFR Sell, MFR Any Signal, MFR Strong In, MFR Strong Out, MFR Bias Bull, MFR Bias Bear, MFR EMA Up, MFR EMA Down, MFR Flow Zero, MFR Band Change, MFR Armed, MFR Webhook JSON.
🔶 LIMITATIONS
- Requires a real volume feed; on instruments with synthetic or missing volume the flow reading is unreliable.
- Needs warm-up bars for the A/D EMAs and the normalise window before bands stabilise.
- Z-band defaults are tuned for liquid instruments; thin markets may need wider thresholds.
- The reclaim EMA introduces deliberate entry lag versus the raw band change, by design.
- Regime bands describe flow context, not a forecast; chop can flip bias repeatedly.
Indicator

Entry Gate - ADR% / ADV / ATR MultipleThree critical pre-trade filters, always visible right on your chart.
Before entering any swing trade, three questions determine whether the setup is even worth considering: is this stock volatile enough to move my account, is it liquid enough to trade cleanly, and is it too extended to enter now? Entry Gate answers all three at a glance, in a single corner of your chart.
ADR% (Average Daily Range) measures how much a stock moves on an average day. Too low and it won't move your portfolio. Too high and daily noise will stop you out randomly.
ADV (Average Dollar Volume) measures how much money flows through the stock each day. Liquid stocks respect key levels, pull back cleanly to moving averages, and don't gap on low volume. Illiquid stocks do the opposite.
ATR Multiple measures how extended the price is above its 50-day moving average, expressed in ATR units. The further extended, the higher the probability of a pause or reversal. Based on jfsrev's published formula: % Gain from MA divided by ATR%.
ATR% rounds out the dashboard with the raw volatility number for context.
All values are color-coded against your thresholds:
🟢 Green — within your ideal range
🟠 Orange — borderline, proceed with caution
🔴 Red — outside your criteria
A yellow dot also plots above the bar when the ATR Multiple exceeds your trigger level, marking historically extended zones at a glance.
Fully customizable:
Independent thresholds for ADR%, ADV, and ATR Multiple
Warning zones for borderline values
Lookback periods for each calculation
Font size, table position, dot size and offset
Color customization for good / warning / bad / ATR / dot
All values are pulled from the daily timeframe via request.security, so the numbers stay consistent whether you're on a daily, weekly, or intraday chart.
Default thresholds are calibrated for swing traders running mid-sized accounts. Adjust to match your strategy.
Credits to ArmerSchlucker for the original ADR% table indicator, MikeC / TheScrutiniser and GlinckEastwoot for the ADR% formula, and jfsrev / Fred6724 for the ATR% Multiple from 50-MA approach. Indicator

Gatev Relative Value Arbiter [JOAT]Gatev Relative Value Arbiter
Introduction
Gatev Relative Value Arbiter studies relative value between the chart symbol and a selected peer using beta spread, z-score, stationarity, Kalman residuals, and OU speed.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Rolling Beta Spread
The chart log price is modeled against the peer log price with rolling beta and alpha.
2. Spread Z-Score
Residual spread is normalized to identify cheap and rich dislocations.
3. Kalman Residual
A recursive residual estimate adapts to changing pair behavior.
4. Stationarity and OU Speed
Correlation, beta drift, skew, kurtosis, and OU-style speed grade pair quality.
spread = logChart - (alpha + beta * logPeer)
Features
Peer relative-value model
Rolling beta and spread z-score
Kalman residual z-score
Stationarity and cointegration energy proxies
Cheap, rich, prime, broken, and fair-value states
Input Parameters
Peer symbol
Rolling beta and z-score lengths
Entry and exit z thresholds
Minimum correlation
Cooldown and display toggles
How to Use This Script
Choose a logically related peer. Cheap and rich states are most meaningful when pair validity and stationarity remain acceptable.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
GRA is original in combining rolling beta arbitrage logic, Kalman residuals, OU speed, and stationarity grading.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Live Footprint Center Frame📊 Live Footprint Center Frame
Live Footprint Center Frame is a footprint-style chart overlay designed to help traders study candle-by-candle volume behavior directly on the main chart. The script displays centered footprint frames around candles and breaks each candle into multiple price slots so volume structure can be viewed more clearly.
🔎 What It Does
The script visualizes estimated internal candle activity using lower-timeframe OHLCV data. It displays price-slot volume, delta behavior, POC, value area, imbalance markings, absorption-style highlights, delta bars, POC trail, and a compact HUD panel for quick market structure reading.
Key visual elements include:
• Footprint-style candle frames
• Price-slot volume ladder
• Estimated ask/bid style cell values
• Positive and negative delta coloring
• POC highlight
• Value Area highlight
• Imbalance arrows
• Absorption-style border highlights
• Small delta bar below candles
• POC trail between candles
• Compact HUD with ASK, BID, DEL, POC, VA, VOL, CVD, and bias information
🧠 General Logic
Live Footprint Center Frame uses lower-timeframe OHLCV data to approximate how volume is distributed inside each candle. The script divides the candle range into price slots, distributes lower-timeframe volume across those slots, and then calculates estimated delta, total volume, POC, value area, and balance information.
This is not true exchange-level bid/ask footprint data. It is an educational footprint-style approximation based on the data available through PulseWire.
📌 Why It Is Useful
This tool can help traders study more than just candle open, high, low, and close. It gives a clearer visual view of where volume activity is concentrated inside the candle and how that activity changes from candle to candle.
It can be useful for observing:
• Where volume is concentrated
• How POC shifts between candles
• Whether delta supports or disagrees with price movement
• Where value area develops inside the candle
• Whether activity appears balanced or imbalanced
• Possible absorption-style areas
• Short-term volume structure around important price zones
🎨 Visual Reading Guide
Green-style cells show stronger positive delta behavior.
Red-style cells show stronger negative delta behavior.
Orange areas highlight the POC zone.
Blue-style areas highlight the value area.
Yellow borders can show absorption-style conditions.
Small delta bars below candles show candle delta direction and strength.
The HUD gives a quick summary of ASK, BID, DEL, POC, VA, VOL, CVD, and bias.
🧭 How To Use
1. Add the script to a clean chart.
2. Use intraday charts for clearer footprint-style reading.
3. Watch the POC area to see where the highest slot volume appears.
4. Compare candle delta with candle direction.
5. Use value area to understand where most candle activity is located.
6. Use imbalance and absorption highlights as context only.
7. Check the HUD for a quick summary of current candle conditions.
8. Combine this with market structure, support and resistance, liquidity zones, and proper risk management.
⚙️ Settings Overview
Lower timeframe precision controls the lower timeframe data used for the footprint approximation.
Closed bars to keep controls how many previous footprint candles remain visible.
Price slots per candle controls how many horizontal volume rows appear inside each candle.
Cell text controls whether cells show volume, delta, delta percentage, or estimated ask/bid style values.
Frame width adjusts the centered footprint frame width around each candle.
Live candle update allows the active candle footprint to update while the candle is forming.
POC trail connects POC movement between candles.
Value Area highlights the main volume zone.
Imbalance ratio controls imbalance sensitivity.
Absorption slot volume percentage controls absorption-style highlighting.
HUD settings control the compact panel position and visibility.
Color settings allow visual customization of bullish, bearish, neutral, POC, value area, frame, and delta elements.
⚠️ Limitations
This script uses PulseWire-available OHLCV data and lower-timeframe calculations. It does not access true exchange order book data or true bid/ask footprint data on most symbols. Values can vary depending on symbol, timeframe, lower-timeframe availability, volume quality, and chart settings.
The live candle can update while it is still forming. Confirmed candles are more stable than the active candle.
✅ Educational Use Only
This script is provided for educational market analysis and visual order-flow style study. It does not provide financial advice, guaranteed results, or automatic trade decisions. Traders should use proper risk management and combine this information with their own analysis. Indicator

Black Merton Volatility Engine [JOAT]Black Merton Volatility Engine
Introduction
Black Merton Volatility Engine blends multiple realized-volatility estimators with expected-move rails, cone rank, jump pressure, and tail-state classification.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Composite Realized Volatility
Close-to-close, Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang-style estimates contribute to the volatility state.
2. Volatility Cone
Current volatility is ranked against a historical cone to identify squeeze and shock conditions.
3. Expected Move Rails
Annualized volatility is converted into a multi-day expected move around price.
4. Tail and Jump Pressure
Large returns, rail breaches, and volatility divergence contribute to tail and jump states.
expectedMove = close * realizedVol * math.sqrt(days / 252)
Features
Composite realized volatility
Expected-move rails
Squeeze and shock regimes
Gamma pin, tail shock, clean expansion, and jump labels
Movable quant HUD
Input Parameters
Fast, base, and slow vol windows
Vol cone window
Expected move days
Squeeze and shock percentiles
Cooldown and display toggles
How to Use This Script
Use the rails as volatility context. Squeeze, shock, tail, and jump states describe volatility conditions, not a certain direction.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
BMV is original in blending several volatility estimators, cone ranking, jump pressure, and expected-move visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Discrete Stochastic Volatility Optimal Stopping## Technical Documentation: Discrete Approximation of Bivariate Optimal Stopping Boundaries
### Overview
This document outlines the mathematical methodology for discretizing a continuous-time stochastic volatility model to identify optimal execution boundaries. The algorithm maps an asset's price and variance processes into standardized state spaces to detect joint extrema, triggering execution when predefined statistical thresholds are breached.
---
### 1. Price Process Normalization
To evaluate structural price dislocation, the raw asset price $P_t$ is transformed into a standardized normal state space (Z-score).
**Mathematical Formulation:**
$$Z^{(S)}_t = \frac{P_t - \mu_S}{\sigma_S}$$
Where the sample mean ($\mu_S$) and sample standard deviation ($\sigma_S$) are calculated over an $N$-period lookback window:
* **Sample Mean:** $\mu_S = \frac{1}{N} \sum_{i=0}^{N-1} P_{t-i}$
* **Sample Standard Deviation:** $\sigma_S = \sqrt{\frac{1}{N} \sum_{i=0}^{N-1} (P_{t-i} - \mu_S)^2}$
**Purpose:** This isolates the magnitude of the price deviation relative to its recent equilibrium, providing the orthogonal $x$-axis for the state space.
---
### 2. Instantaneous Variance Estimation
Continuous-time models rely on instantaneous variance, which is unobservable in discrete time. The algorithm approximates this using the annualized rolling realized variance of geometric returns.
**Mathematical Formulation:**
$$v_t = \frac{252}{N} \sum_{i=0}^{N-1} r_{t-i}^2$$
Where the continuously compounded return $r_t$ is defined as:
$$r_t = \ln\left(\frac{P_t}{P_{t-1}}\right)$$
**Purpose:** Assuming the mean daily return is zero ($\mu \approx 0$), the squared log return $r_t^2$ serves as an unbiased estimator of daily variance. The factor $\frac{252}{N}$ standardizes the sum of these squared returns into an annualized volatility metric ($v_t$).
---
### 3. Variance Process Normalization
Because variance $v_t$ is heteroskedastic and mean-reverting, the empirical variance series must also be standardized to evaluate expansion or compression relative to its own baseline.
**Mathematical Formulation:**
$$Z^{(v)}_t = \frac{v_t - \mu_v}{\sigma_v}$$
Where $\mu_v$ and $\sigma_v$ are the $N$-period sample mean and standard deviation of the variance series $v_t$.
**Purpose:** This yields a unitless metric representing the statistical extremity of the current volatility regime, forming the orthogonal $y$-axis of the state space.
---
### 4. Boundary Evaluation Logic
The discrete optimal stopping conditions approximate the analytical Hamilton-Jacobi-Bellman (HJB) boundaries by evaluating the intersection of the two state variables ($Z^{(S)}_t$ and $Z^{(v)}_t$) against arbitrary static thresholds ($\alpha$ for maxima, $\beta$ for minima).
**Entry Condition (Buy):**
Execution is triggered exclusively at the joint minimum of price and variance, defined by the logical intersection:
$$\tau_B = \inf \{ t \ge 0 \mid (Z^{(S)}_t \le \beta_S) \land (Z^{(v)}_t \le \beta_v) \}$$
*Requires price to be heavily discounted while the market regime is highly compressed.*
**Exit Condition (Sell):**
Liquidation is triggered exclusively at the joint maximum, defined by the logical intersection:
$$\tau_S = \inf \{ t \ge \tau_B \mid (Z^{(S)}_t \ge \alpha_S) \land (Z^{(v)}_t \ge \alpha_v) \}$$
*Requires price to be statistically overextended during a regime of extreme variance expansion.* Indicator

Fibonacci Retracement Statistics by VolProfexFIBONACCI RETRACEMENT STATISTICS BY VOLPROFEX
=============================================
DESCRIPTION
-----------
Fibonacci Retracement Statistics is an analysis tool that
automatically detects price swings, tracks retracements within each trend,
and calculates how often price retraces to various Fibonacci levels. The
indicator labels every completed swing with its swing number and deepest
fib level reached (e.g. "▲ #12 78.6%"), and displays a statistics table
showing the count and percentage of swings reaching each level.
All visual elements (trend boxes, fib lines, retracement boxes, labels, and
the statistics table) are drawn only on the last chart bar, keeping the
indicator performant during real-time scrolling. Retracement labels update
in real time so you always see the current value for the active swing.
HOW IT WORKS
------------
1. SWING DETECTION (ATR-Deviation ZigZag)
A volatility-adaptive ZigZag engine finds pivot highs and lows. A pivot
is confirmed when price moves against the current leg by at least
ATR(period) × deviation multiplier. A minimum swing size filter discards
insignificant wiggles. A spike filter rejects reversals triggered by
bars with extreme wick-to-body ratios.
2. HIGHER-TIMEFRAME (HTF) CONTEXT (optional)
When enabled, the indicator loads data from a higher timeframe (default: 1h)
and runs the same ZigZag engine on it. Completed HTF swings are drawn as
translucent boxes on the chart. Local swings are filtered to only count
when their direction matches the HTF swing they fall inside. This removes
counter-trend noise within the larger structure.
A separate gate ("Exclude Retracements outside HTF swing") further filters
retracement contributions: only retracements where both the trend leg and
the counter-trend leg fall inside the same completed HTF box are counted
in statistics and drawn on the chart.
3. TREND & RETRACEMENT TRACKING
Alternating pivot types (high → low → high → ...) create directional
trends. For each unfinalised trend, the indicator tracks the extreme
retracement price bar by bar. When the trend completes, the retracement
percentage is calculated using the actual counter-trend leg. This value is
then compared against each enabled Fibonacci level.
4. FIBONACCI LEVEL COUNTING
A cumulative counting system tallies how many trends have retraced to
each enabled level. Levels available include: 23.6%, 38.2%, 50.0%, 61.8%,
78.6%, 88.6%, 100.0%, 127.2%, 138.2%, 150.0%, 161.8%, plus up to 5
custom levels (0–500%). The statistics table is split into UP and DOWN
sections, each with its own Level / Count / Percent columns.
5. INTRADAY TIME WINDOW (optional)
On intraday charts, you can set a session window (e.g. 09:30–16:00) to
restrict which swings are analysed. Choose between "Pivot Confirmed Inside"
(the confirming bar's timestamp must fall in the window) or "Full Cycle
Inside" (both the pivot start and confirmation must fall in the window).
A visual box overlay can be enabled to highlight the active window.
6. SPIKE FILTER
Optionally discard ZigZag reversals triggered by bars where the upper or
lower wick exceeds the body by a user-defined ratio. This helps avoid
false pivot signals from sudden, low-liquidity spikes.
SETTINGS REFERENCE (defaults optimised for BTCUSDT, 5m chart, 1h HTF)
---------------------------------------------------------------------
── SWING ENGINE ──
- ATR Period: 14
Period for ATR calculations. Shared by local ZigZag and HTF swing detection.
- ZigZag Deviation Multiplier (ATR ×): 3.0
Pivot confirmed when price reverses by ATR × this value.
- Min Swing Size (ATR multiple): 0.8
Legs smaller than ATR × this are discarded. Set 0 to disable.
── HTF CONTEXT ──
- Use Higher Timeframe Swing Context: ON
When enabled, local swings are counted only when their direction matches the
current HTF swing bias.
- HTF Timeframe: 60
Higher timeframe for context. Must be higher than the chart timeframe.
- HTF Swing Deviation (ATR ×): 3.5
ATR multiplier for HTF pivot reversals.
- HTF Min Swing Size (ATR ×): 1.5
Minimum leg size for HTF swings. Set 0 to disable.
- Exclude Retracements outside HTF swing: ON
When enabled, only retracements fully contained within a completed HTF swing
box contribute to statistics and visual output.
- Show HTF Swings: ON
Draws HTF major swing boxes on the chart (Blue = upswing, Red = downswing).
- HTF Bull Color / HTF Bear Color: Blue (50% transp) / Red (50% transp)
── FIBONACCI LEVELS ──
- Levels enabled by default: 23.6%, 38.2%, 50.0%, 61.8%, 78.6%, 100.0%,
138.2%, 161.8%
- 5 custom level slots, each 0.0–500.0%. Set to 0.0 to disable. Default: all 0.0
── FILTERS ──
- Trend Direction: Both
Options: Both / Uptrends Only / Downtrends Only
- Use Intraday Time Window: OFF
When ON, applies a daily clock window on intraday charts.
- Window Session: 0930-1600
- Window Mode: Pivot Confirmed Inside
Options: Pivot Confirmed Inside / Full Cycle Inside
- Window Timezone: Exchange (uses the symbol's exchange timezone)
- Show Time Window Box: OFF
Visual box highlighting the active intraday window.
- Enable Spike Filter: ON
Discard reversals triggered by spike bars.
- Max Wick-to-Body Ratio: 4.0
Threshold for spike detection (wick ≥ this × body).
── DISPLAY ──
- Show Trend Boxes: ON (Border Width: 1)
Bullish: Teal / Bearish: Maroon
- Show Fib Lines: ON (Width: 1, Style: Dashed, Color: Gray at 60% transp)
- Show Fib Labels: ON (Position: Right, Vertical: Center, Size: Small, Color: White)
- Show Retracement Boxes: ON (Color: Orange at 40% transp)
- Show Retracement Labels: ON (Position: Center, Vertical: Below, Size: Small, Color: Yellow)
- Max Trends Drawn: 50 (1–500)
── TABLE ──
- Table Position: Top Right
- Font Size: Small
VISUAL OUTPUT
-------------
1. Trend Boxes: Translucent coloured boxes spanning each completed swing leg.
2. Fib Lines & Labels: Dashed (or solid/dotted) lines at each Fibonacci level
with optional percentage labels on every completed swing.
3. Retracement Boxes: Overlay boxes on the counter-trend leg with a connecting
diagonal line, colour-coded by trend direction.
4. Retracement Labels: Labels on each retracement showing:
- Arrow direction (▲ = uptrend, ▼ = downtrend)
- Filtered swing number
- Deepest Fibonacci level reached
5. HTF Swing Boxes: Larger translucent boxes showing higher-timeframe swing
structure (blue = up, red = down).
6. Statistics Table: A table in one of four corners displaying:
- Level | Count | Percent for uptrends (teal header)
- Level | Count | Percent for downtrends (maroon header) Indicator

Best Position Size CalculatorBEST POSITION SIZE CALCULATOR (PINE SCRIPT V6)
OVERVIEW:
Most traders fail not because of poor entries, but due to terrible risk management. Standard position size calculators are static, rigid, and tedious to use. The Best Position Size Calculator is a dynamic, institutional-grade risk management dashboard built directly into your chart.
Instead of just multiplying a percentage by your account balance, this script dynamically optimizes your share size based on live market volatility, broad market conditions, liquidity depth, and execution environments. It serves as an ultimate Go/No-Go gauge for entering trades safely.
WHAT THE SCRIPT DOES:
The indicator calculates the exact number of shares or contracts to purchase based on your personalized account settings. It visually displays this data in a clean, customizable on-screen dashboard.
Beyond simple calculations, the script acts as an automated defensive filter. If market conditions are highly dangerous (parabolic extensions, extreme overbought levels, dry liquidity, or a broken macro trend), the calculator will dynamically lock execution and flag a warning directly on your table, preventing you from taking high-risk setups.
HOW IT DOES IT (THE CORE ENGINE):
This script features a multi-layered calculation engine across several parameters:
Flexible Risk Architectures: You can determine your risk per share using six distinct methodologies:
1. LOD (Low of Day): Dynamically calculates risk based on the current session's low.
2. % of Account: A fixed percentage layout.
3. Volatility Matrix: Uses four specialized volatility tools across multi-timeframe structures (ATR, ADR, qADR, or StDev).
Progressive Risk Scaling: It pulls data from a major reference index (like NASDAQ:QQQ) and tracks its Z-score. When the broader market is healthy, it securely scales your risk up (up to 4x base risk); when the broad market is hostile, it dials your risk back down.
Smart Rounding Logic: Instead of suggesting fractional shares for large accounts (like buying 4,532.12 shares), the script uses an advanced tiered system to floor shares logically based on block size (rounding to the nearest 10, 50, 100, or 1000 shares dynamically).
Defensive Filtering Matrix: The script checks five separate conditions before displaying a size:
1. Liquidity Filter: Assesses average daily dollar volume to protect you from illiquid slippage.
2. Volume Cap Filter: Limits total share size to a maximum percentage of the daily average volume so your order doesn't disrupt the book.
3. Parabolic Filter: Flags when daily and weekly RSIs are simultaneously overextended (above or equal to 80).
4. Z' Trend and Overbought Filters: Maps out the asset's current Z-Score profile (Hostile, Weak, Neutral, Strong, or Overbought).
5. Long-Term Trend Filter: Utilizes a Weekly Rate of Change (ROC 50) filter to verify macro market direction.
HOW TO USE IT:
1. Input Your Metrics: Open the settings panel and enter your total Account Size, Base Risk %, and Max Position Size boundaries.
2. Select Your Sizing Method: Choose how you plan to manage stops (such as placing stops under the Low of Day or wrapping it around an ATR multiple).
3. Read the Dashboard:
- Blue text indicates a healthy environment with your optimal share size calculated.
- Orange text indicates that your size was safely capped to protect you from illiquidity or excessive capital concentration.
- Red or Gray text warnings (like Overbought, Low Liquidity, or wROC less than 0) warn you that a filter has triggered, notifying you to skip the trade or exercise extreme caution.
WHY THIS SCRIPT IS TRULY ORIGINAL:
Traditional position sizing scripts are blind. They treat a trade the exact same way during a roaring bull market as they do in a choppy bear market, or on a highly liquid stock versus an illiquid micro-cap.
This script is unique because it introduces dynamic adaptability and defensive restrictions. It combines cross-asset index tracking (Progressive Risk) with localized volatility indicators, then routes the output through institutional volume-cap guardrails and smart rounding. It is not just a calculator; it is an automated risk manager that scales your position size up when odds are in your favor and freezes entry sizes when market conditions turn toxic.
IMPORTANT NOTICE AND RISK DISCLAIMER:
This tool is designed strictly for informational and educational purposes. Every effort has been made to ensure the mathematical calculations within this Pine Script are correct, robust, and functional. However, software errors, data feed latencies, and market anomalies can occur.
Trading financial markets involves substantial risk of loss. Utilizing this script does not guarantee profitability or protection against loss. If you execute a trade and lose money, it is entirely your responsibility. The author assumes no financial liability for any losses, missed opportunities, or damages incurred from the use of this indicator. Always cross-verify position sizes manually before committing capital. Use at your own discretion. Indicator

Dynamic Take Profit Stop LossDynamic Take Profit Stop Loss
Dynamic Take Profit Stop Loss is designed to move beyond static take profit levels by dynamically adapting profit projections to changing market conditions.
Instead of relying on fixed R:R targets or ATR values alone, this indicator uses an internal Efficiency Engine to measure how effectively price is moving and adjusts projected targets accordingly.
As market efficiency strengthens, targets can expand. As efficiency weakens or deteriorates, targets can tighten to help preserve gains and reduce exposure.
Key Features
• Adaptive TP projections based on market efficiency
• SL-based R:R projection mode
• ATR-based projection mode
• Dynamic TP expansion and contraction logic
• Automatic Optimal TP selection (TP1 / TP2 / TP3)
• Local High / Low stop-loss calculation with adjustable buffers
• Optional manual entry price input
• Multiple TP display combinations:
TP1 Only
TP2 Only
TP3 Only
Optimal Only
TP + Optimal combinations
Multi-TP combinations
Show All
• Long and Short trade projections
• Dynamic TP multiplier engine
• Efficiency state analysis:
Improving
Mixed
Worsening
• Live information table showing:
Efficiency Score
Market State
TP Multiplier
Optimal TP
Long SL Distance
Short SL Distance
• Adjustable colors, table placement, text sizing, labels, and projection length
How It Works
The internal Efficiency Engine analyzes recent price behavior by comparing:
• Net directional movement
• Total movement path traveled
• Historical improvement or deterioration in efficiency
A weighted score is generated and translated into a dynamic TP multiplier.
Typical behavior:
Strong efficiency + improving conditions
→ Expand targets
Neutral conditions
→ Hold targets
Weakening efficiency
→ Tighten targets
Weak and deteriorating conditions
→ Exit or reduce exposure
Example Use
A standard 2R target may become:
Strong conditions:
2R → 3R+
Weak conditions:
2R → 1.2R–1.5R
The goal is to align profit expectations with how price is actually behaving instead of assuming all trades deserve identical targets.
Best Used For
• Trend continuation trading
• Breakout strategies
• Intraday trading
• Swing trading
• Futures
• Forex
• Indices
• Crypto
• Stocks
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market. Indicator

Signal Forge [LuxAlgo]The Signal Forge indicator is a modular technical analysis engine that allows users to blend 11 distinct technical filters into a unified signal and backtest the results in real-time. This tool aims to simplify strategy development by providing a visual framework for testing indicator confluence and risk management settings without writing code.
🔶 USAGE
The script provides a flexible logic system for generating signals based on the alignment of multiple technical components. Users can toggle specific indicators on or off and choose between "strict" mode (requiring ALL active indicators to agree) or "any" mode (where ANY active indicator can trigger a signal).
Signals are displayed on the chart as glowing orbs connected to the price action. Each signal includes a real-time historical win rate label at the moment of entry, allowing for a visual audit of the strategy's performance over time.
🔹 Indicator Selection
The tool includes 11 harmonized indicators:
SMA Crossover
RSI Filter (Levels)
MACD Crossover
Supertrend
Stochastic (Trend-based)
Bollinger Bands (Basis Filter)
EMA Crossover
Awesome Oscillator
Parabolic SAR
CCI Filter
ADX/DI Filter
🔹 Risk Management
Users can enable ATR-based Take Profit, Stop Loss, and Trailing Stop levels. When active, these levels are plotted on the chart. The Trailing Stop feature includes a specialized gradient fill that highlights the "breathing room" between the price and the exit level.
🔶 DETAILS
🔹 Dashboards
The script features two distinct dashboards to provide a comprehensive overview of the strategy:
Indicator Dashboard: Shows the real-time bullish/bearish status of all 11 indicators, their individual "standalone" win rates visualized with histograms, and their current toggle status.
Performance Dashboard: Provides a high-level summary of the combined strategy performance, including Net Profit %, Win Rate, Profit Factor, and Total Trades.
🔹 Logic Harmonization
To ensure different indicator types work together effectively, mean-reversion tools like the Stochastic and Bollinger Bands have been reconfigured to act as trend-confirmation filters. For example, the Stochastic signal is bullish when the %K is in the upper half of its range (> 50) rather than looking for oversold extremes, ensuring it aligns with trend-following components like Moving Averages.
🔶 SETTINGS
🔹 Signal Logic
Require All Enabled Indicators to Align: When enabled, every checked indicator must have the same directional bias to generate a signal.
🔹 Risk Management (ATR)
ATR Length: The period used for volatility-based exit calculations.
Take Profit/Stop Loss/Trailing Stop: Toggles and multipliers for managing trade exits.
🔹 Visuals
Orb Distance (ATR): Controls the vertical offset of signal orbs from the price candle.
Orb Base Size: Adjusts the thickness and glow intensity of the signal markers.
🔹 Dashboards
Dashboards: Enable or disable the table overlays.
Position/Size: Options to move and scale the Indicator and Performance tables to fit different screen layouts.
Indicator

Inverse-Variance Slope Spectrum [forexobroker]Inverse-Variance Slope Spectrum runs five linear regressions of different lengths in parallel and blends their slopes into a single consensus, trusting each regression in proportion to how well it actually fits the data. The result is a noise-robust trend estimate whose sign sets the bias, with an adaptive linear-regression signal line timing entries. It is a statistically weighted answer to the classic problem of picking one regression length.
🔶 ALGORITHM
1. For each of five regression lengths, compute the slope as ta.linreg(close, L, 0) minus ta.linreg(close, L, 1).
2. For each length, compute the price-vs-bar-index correlation r, and a residual variance = price variance x (1 - r^2).
3. Assign each regression a weight of 1 / residual variance, so tighter-fitting lengths count more.
4. Combine the five slopes into an inverse-variance-weighted consensus slope.
5. The consensus slope's sign sets the regime/bias (positive = up, negative = down); an optional Min |Slope| x ATR gate filters weak slopes.
6. A close-cross of the adaptive linear-regression signal line in the bias direction times the entry. ATR is tracked for context.
🔶 SIGNAL LOGIC
- Buy: in-session AND |consensus slope| passes the ATR gate AND slope regime is up AND close crosses over the signal line AND not already long AND cooldown elapsed AND barstate.isconfirmed (position-locked).
- Sell: in-session AND |consensus slope| passes the ATR gate AND slope regime is down AND close crosses under the signal line AND not already short AND cooldown elapsed AND barstate.isconfirmed (position-locked).
Only fires when the consensus slope regime agrees with the signal-line cross.
🔶 INPUTS
- Spectrum: five regression lengths forming the slope spectrum; default Reg Length 1 = 10 (through Reg Length 5 = 89).
- Spectrum: Adaptive Signal Linreg length used as the entry signal line; default Adaptive Signal Linreg = 20.
- Spectrum: ATR length for the slope gate and context; default ATR Length = 14.
- Signal Logic: Min |Slope| x ATR optional minimum consensus-slope magnitude; default Min |Slope| x ATR = 0.0 (off).
- Signal Logic: Cooldown bars between signals; default Cooldown Bars = 5.
- Filters: optional session restriction with a session window; default Restrict to Session off.
- Visual: signal-line plot, dashboard, 3-layer glow, and buy/sell/background colors; signal line default on.
- Visual: dashboard reports regime, consensus slope, slope/ATR, signal line and weight sum; dashboard default on.
🔶 ALERTS
IVS Buy, IVS Sell, IVS Any Signal, IVS Slope Bull, IVS Slope Bear, IVS Signal Up, IVS Signal Down, IVS Slope Zero, IVS Strong Slope, IVS Regime Flip, IVS Any Signal Cross, IVS Webhook JSON.
🔶 LIMITATIONS
- Computational cost is higher than a single regression: it runs five regressions plus correlation and variance each bar.
- Needs warm-up bars up to the longest regression length before the consensus stabilises.
- Inverse-variance weighting reduces but does not eliminate lag inherent to linear regression.
- The consensus describes trend slope, not magnitude of future move; ranging markets can still whipsaw.
- Defaults are tuned for liquid instruments; very noisy symbols may need a Min |Slope| gate.
Indicator
