Indicator
Statistics
Forex Power Gauge With GOLD [LEO MAGLENTE 2.0] - Expanded Gold Power Gauge With GOLD trend sentiment Currency Strength Aggregation
Dahil ang Forex ay by "pair," kinukuha natin ang net score ng isang currency laban sa lahat ng major partners nito.
Halimbawa sa USD:
Para makuha ang total score ng USD, pinagsasama-sama ng script ang resulta mula sa:
-(EURUSD score) + -(GBPUSD score) + -(AUDUSD score) + USDCAD score + USDJPY score.
Logic Note: Kapag ang EURUSD ay "Down" (-1), pabor iyon sa USD, kaya nagiging +1 ito sa total score ng USD.
Indicator
Mitigation Block Quality [AGPro Series]OVERVIEW
Mitigation Block Quality grades every order-block retest as A, B, or C based on
the strength, speed, and follow-through of the bounce after price returns to
the block. Instead of just drawing order blocks and leaving you to guess
which ones matter, the script measures each mitigation objectively and keeps
a live scoreboard of how those reactions have been performing.
The result is an order block tool that tells you two things at once: where
the zones are, and how well price has historically respected them on the
symbol and timeframe you are looking at.
UNIQUE EDGE
Most order-block indicators end at detection. This one begins there. Each
time a block is mitigated, the script measures the reaction over a fixed
window and grades the bounce by its ATR-normalized magnitude. That grade
is then reflected everywhere: on the block border, in the on-chart label,
in the dashboard, and in the historical success-rate statistics.
You also get multi-timeframe context, confluence detection, streak tracking,
and a dynamic setup banner that describes the current price-block
relationship in plain English.
METHODOLOGY
1. Detection. Swing pivots are identified using a configurable pivot length.
The last opposite-colored candle before the pivot forms the order block.
2. Mitigation. A block is mitigated when price re-enters the zone.
3. Grading. After a fixed reaction window, the script measures the peak of
the bounce and normalizes it to ATR. Grade A is a strong bounce, B is
solid, C is weak.
4. Invalidation. A body close beyond the block marks it as invalidated.
Invalidated blocks can be hidden or shown as a dotted reference.
5. Retirement. Blocks retire by age, by distance from price, or when the
per-side cap is exceeded.
FEATURES
- A, B, or C grade assigned to every mitigation (ATR-normalized reaction)
- Reaction trail line on Grade A mitigations showing the bounce extent
- Entry marker (diamond) at the exact mitigation bar of Grade A bounces
- Confluence glow when two or more blocks overlap within 0.5 ATR
- Time-based opacity decay so older blocks recede and fresh ones pop
- Optional pulse animation on A/B blocks while price is inside them
- Price-scale labels tagging each active block's grade and side
- Higher-timeframe alignment check against a configurable HTF structural bias
- Dashboard panel with: active count, tested count, success (current),
nearest-block state (Inside / Touching / distance in ATR), all-time
success rate with stacked distribution bar, last-20 success, health
progress bar, current Win/Loss streak, HTF alignment, and a dynamic
setup banner
SIGNALS & ALERTS
Three alert conditions are provided:
- Grade A Mitigation — a premium-quality bounce has been detected
- Grade B Mitigation — a solid bounce has been detected
- Block Invalidation — an active block has been broken
These are alertconditions and can be configured from the PulseWire
Create Alert dialog in the usual way.
KEY INPUTS
- Pivot Length and Lookback: control how blocks are detected and how long
they stay on the chart
- Reaction Window and Grade Thresholds (A, B in ATR units): define what
counts as a premium, solid, or weak bounce
- Invalidation Mode: choose between body close or wick pierce
- Retire Block Beyond (xATR): automatic cleanup when price moves far away
- Max Active Blocks per Side and Max Visible Labels: keep the chart premium
- Premium Visuals toggles: Reaction Trail, Entry Marker, Confluence Glow,
Quality Heatmap row, Setup Banner, Pulse, Time Decay, Price Scale Labels,
HTF Alignment, Streak row
- HTF for Alignment: the higher timeframe used for multi-timeframe confluence
- Panel location and theme
HOW TO USE
1. Add the script to any chart and timeframe.
2. Read the panel top-down:
- Last 20 breakdown tells you the recent quality regime
- Nearest Block tells you how close the closest active zone is
- All-time and Last 20 success tell you how reliable those zones have been
- Streak gives you momentum context
- HTF Alignment tells you if the bigger picture agrees
- Setup banner describes what is happening right now
3. Look at the chart:
- A/B/C labels on mitigated blocks tell you how those tests resolved
- Reaction trails and diamonds highlight the premium Grade A mitigations
- Confluence glows mark zones where multiple blocks agree
4. Use alerts to get notified when a fresh Grade A or Grade B mitigation
occurs, or when an active block is invalidated.
The tool is designed to help with discretionary analysis. It is not a
trading system and does not generate buy or sell signals on its own.
LIMITATIONS & TRANSPARENCY
- Pivots are confirmed after the swing length completes, so block detection
has a small structural lag. This is inherent to any pivot-based method.
- Grades are assigned after the reaction window closes. A very fresh
mitigation will briefly show "Active" before its grade appears.
- HTF Alignment uses a 50-period simple moving average on the chosen higher
timeframe as a structural bias proxy. It is a context filter, not a
predictive signal.
- All metrics are computed from the visible historical data on the current
chart. Loading more bars will change the all-time statistics.
- The script uses Pine Script v6 drawing objects. Extremely long histories
on very low timeframes may hit PulseWire object limits; the built-in
per-side cap and distance-based retire keep this under control in normal
use.
RISK DISCLOSURE
This script is an analysis aid, not financial advice. It does not predict
future price movement and does not generate trade recommendations. Any
decision to enter or exit a position is the responsibility of the user.
Historical grade distributions are descriptive, not predictive. Past
mitigation behavior on a symbol does not guarantee future behavior.
Trade with risk capital you can afford to lose and use appropriate
position sizing and stop placement.
LICENSE
Released under the Mozilla Public License 2.0. The full source is available
on PulseWire via the Open-Source badge. You are free to study and modify
the code subject to the terms of the license.
Indicator
Cross-Asset Correlation & Cointegration Intelligence [NikaQuant]
**Cross-Asset Correlation & Cointegration Intelligence**
Track your chart symbol against up to six comparison symbols. The script
renders **three synchronized panels** that tell you, in plain numbers:
- How coupled the basket is **right now**
- Which pairs are genuinely tradeable (and the **expected mean-reversion time**)
- How much **gross exposure** you should carry given the current regime
## What It Does
- **Intelligence Dashboard** — per-symbol grid: correlation, beta, R²,
z-score, percentile, stability, lead/lag, spread z, quality score,
hedge size, stress-vs-normal correlation delta, signal verdict
- **N×N Correlation Matrix** — full 6×6 pairwise heatmap
- **Action Center** — regime timer, flip probability, risk-budget advisor,
top-5 ranked trades, top-3 cointegrated pair setups, trade playbook
## Why It Is Original
Unlike standard correlation heatmap scripts that display a single Pearson
value per pair, this script builds a composite intelligence layer across
**three independent axes** that no retail correlation indicator combines:
**1. Asymmetric (Conditional) Correlation**
Splits history into **normal-volatility** and **stress-volatility** regimes
using an ATR-median split on the base symbol, and reports the two
correlations side by side. This exposes the *"diversification fails when
you need it"* amplification that an averaged Pearson value hides — a
documented pattern in every crisis since 1998.
**2. Cointegration + Half-Life**
For all 15 unique pairs, runs an **Engle-Granger two-step** (log-regression
then AR(1) on the residual spread) to flag which spreads are genuinely
mean-reverting. Cointegrated pairs carry an **Ornstein-Uhlenbeck half-life**
t½ = −ln(2) / ln(1 + φ) — the expected mean-reversion time in bars.
*Correlation tells you direction; cointegration tells you whether the
spread will revert.*
**3. Regime Persistence + Flip Probability**
Tracks four states (Crisis / Coupled / Mixed / Decoupled) in a **4×4 Markov
transition counter**, stores per-regime dwell times, and converts them into
flip-probability estimates for the next 10 and 30 bars. You see not just
*"we are in X"* but *"X has lasted 47 bars, historical average is 62 bars,
probability of flip in 30 bars is 55%."*
## Composite Modules
- **Crisis Clock (0–100)** — composite of average absolute correlation,
cross-sectional dispersion collapse, and tail-dependence count
- **Market Brain** — union-find clustering on positive pairwise
correlations, auto-groups symbols that move as one
- **Dispersion Trade Detector** — fires when average correlation drops
>2σ while realized volatility rises
- **Hedge Desk** — converts OLS beta into a **dollar hedge notional**
given your base position size
- **Effective-N** — correlation-adjusted diversification count (six
symbols at ρ=1.0 gives effective N = 1)
- **Risk Budget Advisor** — regime + effective-N → suggested gross
exposure percentage
- **Setup Quality Score** — composite of |corr| × R² × stability,
adjusted for regime, clock, and break
- **Action List** — scans every symbol and every pair, scores each
candidate, ranks them, surfaces the top five with type, target, score,
direction, suggested size, rationale
## Per-Symbol Metrics
- Rolling Pearson correlation across **three lookbacks** (short, medium,
long) — three-block glyph reveals timeframe divergence
- **OLS beta** from log returns, **R²** as variance explained
- **Z-score** of current correlation vs its own 200-bar distribution
- **Percentile rank** of current correlation in its own history
- **Stability** from rolling stdev of the correlation itself
- **Optimal-lag scanner** across {−5, −3, −1, 0, +1, +3, +5} offsets
- **Spread z-score** of the price ratio for pairs signaling
- **Asymmetric Δ** = ρ_stress − ρ_normal (positive = hedge fails under stress)
## How To Use It
- **Scan the Quality column first.** Anything at or above 60 with a
TRACK++ or HEDGE++ signal is a high-confidence setup.
- **Cross-check AsymΔ.** Values above +0.3 mean that "hedge" is expected
to fail under stress — avoid relying on it in a crisis.
- **Use Hedge column values** as the dollar notional to short or long
against your base position to neutralize beta.
- **Read the matrix** like a portfolio risk report. Clusters of dark-green
tiles = diversification is breaking down. Red tiles = inverse pairs.
- **In the Action Center**, start at the Risk Budget line, then work
top-down through the Action List. Cointegrated pairs marked with a
check-mark prefix show expected mean-reversion time in bars.
**Recommended timeframes:** intraday or daily charts with at least 250
bars of history across all six symbols.
**Recommended markets:** anywhere the base asset has meaningful
relationships with a benchmark basket — equity indexes vs sector ETFs,
crypto majors vs index proxies, FX vs rates and commodities.
**Avoid using when:** fewer than three symbols resolve to valid data;
during the first 250 bars after chart load; or on a symbol with gapped
or illiquid history that creates artificial correlation jumps.
## Alerts
Regime Break · Dispersion Trade Setup · New Cointegrated Pair ·
High-Quality Setup · Imminent Regime Flip · Crisis Regime Entered ·
Asymmetric Correlation Amplification · Risk Budget Reduced · Clock
Stressed/Critical · Strong Positive/Negative Correlation Crossovers
## Key Settings
- **Comparison Symbols 1–6** — the basket (autocomplete from any TV ticker)
- **Medium-Term Correlation Period** (50) — primary correlation lookback
- **Short / Long Lookbacks** (20 / 200) — timeframe-divergence glyph
- **Historical Baseline** (200) — z-score, percentile, stability, regime
dwell times, and asymmetric-correlation ATR split
- **Strong Correlation** (0.70) — threshold for strong-signal eligibility
- **Regime-Break |Z|** (2.00) — flags correlations breaking their range
- **Pairs-Trade |Spread Z|** (2.00) — pairs-trade setup threshold
- **Min R² for Trust** (0.25), **Min Stability** (0.50) — quality gates
- **Cluster Threshold** (0.60) — Market Brain grouping
- **Crisis Clock** — Stressed (60), Critical (80) thresholds
- **Base Position Size** (10,000) — drives Hedge Desk and Action sizing
- **Min Action Quality** (60) — filters the Action List
- **Risk Budget per regime** — Crisis 50%, Coupled 75%, Mixed 90%,
Decoupled 100% (all user-tunable)
- **Display** — position each of three tables independently; Compact or
Pro column density; full palette customization
## Notes
**No repainting.** All correlations, betas, and regime computations use
confirmed bars only. Regime transition counters and dwell-time arrays
update only when a bar confirms.
**Data integrity.** Six external symbol requests are made with
non-forward-looking data fetches, well within PulseWire's request limit.
**Methods.** Asymmetric correlation uses log returns with indicator
weights from an ATR-median volatility split on the base asset.
Cointegration is Engle-Granger two-step: log-regression residual, then
AR(1) test. A pair is flagged as cointegrated when the AR(1) coefficient
is sufficiently negative to indicate mean-reversion. Half-life uses the
standard Ornstein-Uhlenbeck solution t½ = −ln(2) / ln(1 + φ).
**Warm-up.** The first ~250 bars after chart load are a warm-up period.
Several metrics will display "—" until enough history accumulates.
**Originality.** All calculations, signal logic, clustering,
cointegration testing, and table rendering are original. No third-party
code is reused.
Indicator
Hybrid Round Numbers [LuxAlgo]Smart Round Number Indicator (MES & MNQ)
This indicator highlights key psychological price levels and helps traders focus on where price is most likely to react—without cluttering the chart.
🔑 Core Features
Automatic Detection
Detects MES and MNQ automatically
Applies optimized spacing:
MES → 100 / 50 / 25
MNQ → 1000 / 500 / 100
🎯 Two Display Modes
1. Full Mode
Displays all Major, Medium, and Minor levels
Ideal for big-picture analysis and mapping liquidity zones
2. Proximity Mode (Scalping Focus)
Shows only the nearest levels above and below price
Reduces clutter for precision trading
🟦 Reaction Zones
Each level includes a shaded zone (customizable in ticks)
Represents areas where price is likely to:
react
reverse
consolidate
🚨 Two-Tier Alerts
Zone Touch: Price enters the reaction zone
Level Sweep: Price crosses the exact round number
🎨 Full Customization
Adjust:
spacing (auto or manual)
colors
line styles (solid, dashed, dotted)
line thickness
number of levels shown
Customize Major, Medium, and Minor levels independently
🧠 Smart Logic
Prevents overlapping levels
Automatically prioritizes Major levels over Medium
Keeps charts clean and readable
📍 Improved Visibility
Right-aligned labels and extended lines
Clean layout optimized for real-time decision-making
⚡ Best Use Case
Ideal for scalpers and intraday traders
Helps identify:
liquidity sweeps
reaction zones
high-probability entry and exit levels
Indicator
Yield Curve Regime Yield Curve Regime – Pro Edition
=== WHAT IT DOES ===
This indicator classifies the U.S. Treasury yield curve into six canonical
regimes by comparing the current behavior of a short-maturity yield
(default 2Y) and a long-maturity yield (default 10Y) against their values
N bars ago. It paints the chart background (or bar color) with the
regime color and renders a modular on-chart dashboard showing the active
regime, a curve-delta trend arrow, live yield snapshots, a quantitative
strength score, multi-horizon confluence, dwell-time, rolling regime
frequencies, and a transition log.
=== WHY IT IS DIFFERENT ===
Most public yield-curve scripts plot the 10Y-2Y spread or flag a single
inversion event. This script decomposes every curve move into the two
dimensions that actually matter for fixed-income interpretation:
1) Curve direction : did the spread steepen or flatten?
2) Yield direction : did short and long yields rise or fall?
Crossing these dimensions produces six distinct regimes, each with a
different macro meaning. A +10 bp move in the 2s10s spread can be a
"Bull Steepener" (Fed easing – risk-on friendly) or a "Bear Steepener"
(inflation / term-premium driven – risk-off friendly). Flagging only
the spread hides that distinction; the six-regime framework exposes it.
On top of that six-regime base, this indicator adds four analytical
layers that, to the best of our knowledge, are not combined in any
existing public yield-curve script:
• A Z-score-based Strength score (0–100) that quantifies *how
convincing* each regime is instead of treating it as a binary flag.
Calibrated so |Z| = 2.0 (the 95 % confidence band) maps to 100.
• A Multi-Horizon Confluence score (0/3, 1/3, 2/3, 3/3) computed by
running the same regime detection on three independent offsets
(fast / mid / slow) and measuring agreement across horizons.
• A Dwell-Time counter plus a rolling history of the last N regime
transitions, so the viewer can see not just the current regime
but its persistence and transition path.
• A rolling Regime-Frequency statistic showing what percentage of
the last freqLen bars each regime occupied, rendered as an inline
bar and a precise percentage in a dedicated dashboard block.
These are genuine additions to the calculation – not cosmetics.
All of them are visualized in the on-chart dashboard so the reader
can consume the extra information at a glance.
=== THE SIX REGIMES (core logic) ===
Let curve = longRate - shortRate, compared against its value "offset"
bars ago. A regime fires when all three conditions hold simultaneously:
Bull Steepener : curve widens, short falls, long falls
(short falls faster – classic early easing cycle)
Bear Steepener : curve widens, short rises, long rises
(long rises faster – inflation / term premium / supply)
Steepener Twist : curve widens, short falls, long rises
(reflation pivot / policy-vs-inflation divergence)
Bull Flattener : curve narrows, short falls, long falls
(long falls faster – flight to quality / recession bid)
Bear Flattener : curve narrows, short rises, long rises
(short rises faster – aggressive Fed tightening)
Flattener Twist : curve narrows, short rises, long falls
(stagflation signal / tightening into weakness)
Exactly one regime fires per bar (the six conditions are mutually
exclusive by construction). When none triggers, the background stays
clean.
=== HOW TO READ THE DASHBOARD ===
• Header row – ticker + timeframe context.
• Active row – the regime currently firing, tinted in its own
color, with a ▲ / ▼ / ▬ arrow showing the signed
change of the curve over the fast offset window.
• Strength bar – █-fill from 0 to 100 plus the exact score.
• Confluence row – ●●● / ●●○ / ●○○ / ○○○ plus score 0/3 … 3/3.
• Dwell row – bars elapsed inside the current regime.
• Yields block – live short, long, and curve values.
• Legend block – every enabled regime with a colored dot and a
live "● aktiv" / "○ ruhend" status.
• Frequency block – each regime's share of the last freqLen bars,
shown as a 10-step bar plus exact percentage.
• Transitions – a log of the most recent regime changes
(newest first).
• Background/bars – tinted in the active regime's color, optionally
dimmed when Strength is low.
=== HOW TO READ THE ANALYTICAL LAYERS ===
• Strength bar (█████░░░░░ 65 / 100) – the farther right it fills,
the more statistically significant the regime move is relative to
its rolling volatility. Calibrated so a Z-aggregate of 2.0 (roughly
the 95 % band of a normal distribution) maps to a score of 100.
• Confluence (●●○ 2/3) – how many of the three horizons confirm the
fast-horizon regime. 3/3 is a strong multi-timeframe signal; 1/3 is
fast-only; 0/3 means no active regime on any horizon.
• Dwell – bars elapsed inside the current regime. Useful for spotting
exhausted vs. freshly-started regimes.
• Frequency – every regime's rolling share of the freqLen window,
letting you see at a glance which regime has dominated the current
macro cycle.
• Transitions – a compact log of the most recent regime changes.
=== SETTINGS (all inputs are grouped and collapsible) ===
• Symbols & Offset – pick any two yield tickers plus three lookback
windows (fast / mid / slow) for confluence.
• Detection – rolling window for frequency statistics,
maximum stored transitions.
• Display – background vs. bar coloring, transparency,
optional strength-coupled transparency.
• Regime selection– enable/disable any subset of the six regimes.
• Color palette – fully user-overridable regime colors.
• Dashboard – master toggle, compact mode (active regime only),
independent per-section toggles for header,
active+strength, confluence, dwell, yields,
legend, frequency, and transitions, plus
configurable position and text size.
=== HOW TO USE IT ===
• As a macro / risk-regime filter on SPX, NDX, DXY, TLT, HYG, BTC,
gold or any risk-sensitive instrument: the regime in force often
explains why cross-asset correlations are behaving the way they are.
• To disambiguate yield-curve headlines: a "curve is steepening"
print means something very different if it is a Bull Steepener vs.
a Bear Steepener; this indicator answers that question at a glance.
• To study historical regime transitions: switch background mode on
and scroll back through past cycles to see how regimes clustered
around recessions, pivots, and inflation shocks.
• The offset inputs let you tune sensitivity: 1 bar for intraday
regime nowcasting, 5–20 bars for swing and macro framing.
=== NOTES & LIMITATIONS ===
• Defaults to US02Y and US10Y but accepts any two yield symbols –
not hard-coded to U.S. Treasuries; works on Bund, Gilt, JGB curves
if the data is available on your plan.
• Regimes are evaluated on bar-close comparisons and can flip
intrabar on lower timeframes; use daily or weekly for stable macro
readings.
• The Strength score relies on rolling standard deviations over a
50-bar window. On low-liquidity / low-frequency data the σ estimate
can be unstable for the first 50 bars after loading.
• Multi-Horizon Confluence runs the raw regime detection on mid and
slow offsets, so slower horizons can confirm a faster signal even
when their Δcurve is small – this is by design, not a bug.
• The Steepener Twist and Flattener Twist cases are structurally
rarer than the four main regimes and often mark transitions rather
than trends – treat them as context, not as standalone signals.
• This is an analytical / visual tool, not a buy/sell system. It does
not generate entries, exits, or forecasts.
Indicator
Monte Carlo Risk Geometry Simulator [Aslan]Thanks to @KioseffTrading for the polyline retracing system and the plotting system as a whole🙏
♦️ What This Script Does
This is a Monte Carlo simulator for visualising and calculating the probability of a return based on risk geometry of the model (Risk %, RR, WR). It assesses the probability of returns by generating hundreds or thousands of possible outcomes using your win rate, risk-reward, and position sizing. Each line you see is a different plausible “future,” showing how your account could realistically evolve.
🔶 How To Use It
Input your strategy stats, run a large number of simulations, and focus on three things: how wide the equity curves spread, how deep drawdowns get, and the percentage of profitable outcomes. Then adjust your model and repeat.
🔷 Application in Prop Firm evaluations
Using the threshold system, you can see what risk geometry is most likely to pass a prop firm evaluation. Suprisingly, the most probable geometry for passing an eval can sometimes have a negative expected value!
♦️ Bottom Line
This script helps you move from “how much can I make?” to “how likely am I to profit?”
🔎 Monte Carlo Simulations Explained
Monte Carlo simulations are a method of modeling uncertainty by running many random versions of the same system to see all possible outcomes. In trading, instead of assuming one fixed result, it repeatedly simulates sequences of wins and losses based on your strategy’s statistics (like win rate and risk-reward). This creates a distribution of potential equity curves, showing not just what did happen, but could happen. It’s essentially a way to test probability and survival under randomness rather than relying on a single backtest. Monte Carlo simulations are widely used on quant trading desks around the world to model uncertainty, test strategy robustness, and estimate the probability distribution of trading outcomes under real-world randomness.
Indicator
Round Numbers [LuxAlgo] MES MNQhighlights major, medium, and minor round numbers
lets you turn each group on or off
lets you change spacing
lets you customize color, style, and width
works differently for MNQ and MES if you want
The clean way is to make:
MES: 100, 50, 25
MNQ: 1000, 500, 100
or let you enter your own values manually.
What this does
Detects MES and MNQ automatically if you enable presets
Draws round-number lines above and below current price
Lets you customize:
spacing
colors
width
line style
labels
how many levels to show
Best default settings
For your style, I’d use:
MES
Major: 100
Medium: 50
Minor: 25
MNQ
Major: 1000
Medium: 500
Minor: 100
Indicator
Indicator
Universal ATR Position Sizer + Volatility ContextOverview
The Universal ATR Position Sizer Pro is a comprehensive risk management tool designed for traders who need precision across multiple asset classes. Unlike standard position sizers, this indicator automatically detects symbol point values to provide accurate sizing for Futures, Forex, Stocks, and Crypto.
In addition to sizing, it provides a "Volatility Weather Report," comparing current market conditions to historical averages to help you decide if the market environment is currently high-risk or optimal.
Key Features
1. Triple-Timeframe Analysis
The table provides a bird's-eye view of volatility across three distinct layers:
Current Timeframe: Real-time sizing based on your active chart.
Custom Timeframe: A selectable higher timeframe (e.g., 1H or 4H) to help you align your risk with macro trends.
Daily Context: A deep dive into the daily range to see how "today" compares to the monthly average.
2. Smart "Vol Status" Context
Stop trading in the dark. The indicator calculates an ATR Relative Ratio to categorize the market:
LOW VOL (Blue): Market is tightening; watch for breakouts but beware of "chop."
NORMAL (Green): Volatility is within historical norms; standard strategy parameters apply.
HIGH VOL (Orange): Volatility is 20%+ above average; expect violent swings and consider reducing size.
3. Multi-Asset Logic
Built-in syminfo.pointvalue detection means you don't have to change settings when switching from ES (Futures) to EURUSD (Forex) or NVDA (Stocks). The math adjusts itself automatically.
How to Read the Table
Stop Distance: The physical distance of your stop loss based on your ATR multiplier.
Suggested Size: The exact number of units/contracts to trade to maintain your fixed dollar risk (e.g., $100 per trade).
% of Price: Shows the Daily ATR as a percentage of the asset's price. This helps you understand the "personality" and relative risk of the ticker.
Settings
ATR Settings: Customize the length and multiplier.
Custom TF: Set your preferred higher timeframe for secondary sizing.
Risk Amount: Enter the total dollar amount you are willing to lose if your stop is hit.
Round Down: A must-have for Futures and Stocks to ensure you never accidentally over-leverage due to fractional math.
Disclaimer: This indicator is a tool to assist in risk calculation. Always verify your position size with your broker's margin requirements before entering a trade.
Indicator
Mapa de Liquidaciones (OHLCV/Open Interest) MAPA DE LIQUIDACIONES
Indicador overlay que estima zonas de liquidación de posiciones
apalancadas (longs y shorts) mediante un mapa de calor.
FUNCIONAMIENTO
Calcula niveles teóricos por barra:
Long → precio × (1 − 1/leverage)
Short → precio × (1 + 1/leverage)
El volumen u Open Interest se acumula en cada nivel, mostrando
la densidad de posiciones en riesgo.
DATOS
Usa Open Interest real si está disponible
Si no, utiliza volumen como aproximación
Posibilidad de definir símbolo OI manual
COLORES
Verde → baja concentración
Amarillo→ media
Rojo → alta (nivel relevante)
Cada lado (long/short) se normaliza de forma independiente.
PARÁMETROS
Apalancamientos: 10x, 25x, 50x, 100x
Filas del mapa (resolución)
Ancho (barras)
Lookback histórico
LIMITACIÓN
Estimación basada en datos de PulseWire.
No usa liquidaciones reales de exchanges.
Indicator
Trend Close 1/6 Highlight (Daily Reset)Indicator Name: Trend Close 1/6 Highlight
Description:
This indicator highlights the first 6 bars of each trading day when the closing price is within the extreme 1/6 price range of that bar.
For a bearish bar (close < open) that closes in the lower 1/6 of its range (i.e., close ≤ low + (high-low)/6), a semi‑transparent light green rectangle is drawn from high to low, covering the entire price range of the bar.
For a bullish bar (close > open) that closes in the upper 1/6 of its range (i.e., close ≥ high – (high-low)/6), a semi‑transparent light pink rectangle is drawn from high to low.
Key features:
The count resets at the start of each new trading day (detected by a change in the day of the week).
Only the first 6 bars of the day are evaluated; no rectangles are drawn on later bars.
Rectangles are aligned precisely with the bar's time interval (time to time_close) using xloc.bar_time, so they do not extend into adjacent bars.
The background color transparency can be adjusted (default: 80/100).
No border is drawn (border_width = 0).
Use case:
Quickly spot bars where price closes extremely near the low (strong bearish momentum) or extremely near the high (strong bullish momentum) during the early part of the trading session.
Indicator
Reversal Probability & SignalsThis indicator is designed to forecast critical market turning points by predicting the formation of TOPs (Pivot Highs) and BOTTOMs (Pivot Lows).
To achieve this, the script utilizes a simplified K-Nearest Neighbors (KNN) machine learning algorithm built directly within Pine Script. By analyzing a wide spectrum of Commodity Channel Index (CCI) values, it calculates the real-time probability that the current price action will result in a structural Pivot reversal.
How It Works (The Engine)
The script functions as a real-time pattern recognition engine. It operates in three main steps:
Feature Extraction: It concurrently calculates 8 different lengths of the CCI (from very short to long-term periods like 10 to 200). This acts as the feature set of the current market momentum.
Data Collection (Training): Whenever the market makes a significant structural Top or Bottom (based on Pivot points), the script records the specific state of those 8 CCIs at that exact moment. It also collects random "non-target" samples to build a balanced historical database.
KNN Classification (Prediction): On every new bar, the algorithm calculates the mathematical Euclidean distance between the current 8 CCI values and the historically saved samples. It looks at the "K" nearest historical neighbors. If the majority of those closest historical neighbors were market bottoms, the indicator outputs a high "Bottom Probability."
Key Features
Dynamic K-Value Adjustment: To ensure stable and accurate calculations even shortly after applying the indicator (when the historical sample pool is still growing), the "K" value dynamically scales down based on the available data size and automatically adjusts to odd numbers to prevent tie-breaking ambiguity.
Two-Step Smart Signal Logic: To prevent premature entries during strong, ongoing trends, this script uses a dual-threshold confirmation system:
Standby: The probability must first surge above an Upper Threshold (Default: 80%), indicating extreme conditions.
Trigger: The actual signal is only plotted when the probability peaks and subsequently drops below a Lower Threshold (Default: 50%). This confirms that the extreme momentum has broken and the reversal is underway.
Target Selection: Easily switch the engine's focus between predicting a "BOTTOM" or a "TOP" via the settings panel.
Visual Enhancements & Alerts: Includes intuitive dynamic bar coloring (changing based on probability intensity), a clear histogram, distinct signal shapes on the chart, and fully integrated alert conditions for automation.
Settings & Configuration
Prediction Target: Toggle between BOTTOM (Pivot Lows) and TOP (Pivot Highs).
Feature Parameters (CCI): Customize the 8 periods used for momentum extraction. Default settings range from 10 to 200 to capture micro-fluctuations up to macro-trends.
KNN Model Settings: * K-Value: The baseline number of nearest neighbors to compare.
Max Samples: The memory limit for historical data points (higher = more stability, but heavier computation).
Signal Settings: Customize the Upper and Lower thresholds for the two-step signal generation.
How to Trade with It
Select your target: Decide if you are looking for long opportunities (BOTTOM) or short opportunities (TOP).
Watch the Buildup: Observe the histogram or candlestick colors. When the probability goes above 80%, the market is showing conditions highly similar to historical reversals. Do not enter yet.
Wait for the Trigger: Wait for the momentum to break. When the probability drops back below the 50% threshold, a triangle shape will appear on the chart. This is your signal that the reversal pattern is executing.
Disclaimer:
This script uses historical pattern matching and experimental mathematical models. It does not guarantee future results. Please use it in conjunction with broader market context, other technical indicators, and strict risk management.
Indicator
Indicator
BearMetricsBlackModifier pour le texte en noir
Rechercher BearMetric pour le script original. Je ne prend aucun mérite sur le fondement du code
Indicator
Statistical VWAP study: Session and RTH VWAPSession & RTH VWAP — Statistical VWAP Study
This indicator plots two independently calculated Volume Weighted Average Price lines — one anchored to a user-defined pre-market or custom session, and one anchored to the Regular Trading Hours (RTH) open — and combines them into a statistical study that tracks the relationship between the two lines over time. Beyond the two VWAP lines themselves, the indicator calculates a set of statistical deviation bands derived from the midpoint between both VWAPs, maintains a live stats table that tracks retest and crossover behaviour with timing data, and records win/loss statistics based on the directional relationship between the two lines at the close of each RTH session.
The indicator is designed for equity futures traders and anyone who trades instruments with a defined RTH session, though it will function on any market where session times can be configured. It is most useful on intraday timeframes, particularly 1-minute through 15-minute charts, where the two VWAP lines are meaningfully separated and the statistical bands have enough bar data to fill in during the session.
─────────────────────────────────────────────
HOW THE TWO VWAPs WORK
─────────────────────────────────────────────
The Session VWAP anchors to the start of a configurable pre-market or custom session each day and recalculates bar by bar from that anchor using the standard cumulative price-times-volume divided by cumulative volume formula. Because it anchors before the RTH open on most configurations, it captures the overnight sentiment and carry-forward context that the RTH VWAP does not see. The line resets each day at the session start and, uniquely, reanchors dynamically if price makes a new session high — meaning the anchor always sits at the highest point reached during the session rather than being fixed at the first bar. This makes the Session VWAP a high-anchored VWAP that tracks where the average transaction has occurred relative to the session's developing high.
The RTH VWAP anchors to the first bar of the Regular Trading Hours session each day — defaulting to 09:30 EST — and calculates forward from that point. It is a straightforward daily VWAP in the conventional sense, widely used by institutional participants as an execution benchmark. It resets at the RTH open every day regardless of overnight price action.
Both VWAPs have independent price source inputs, so you can, for example, run the Session VWAP on HLC3 and the RTH VWAP on the close, or set both to the same source. Both default to HLC3. Previous session VWAP lines can be displayed on chart for historical context, with the number of retained sessions configurable up to 100.
─────────────────────────────────────────────
THE ANCHOR AND DEVIATION BANDS
─────────────────────────────────────────────
Once both VWAPs are active during the RTH session, the indicator calculates a midpoint anchor on each bar as the simple average of the two VWAP values at that moment. This anchor represents an equilibrium level between the two measures — a price around which both institutional benchmarks are balanced. The anchor can be plotted as a standalone line if desired.
All statistical bands are then derived as offsets from this anchor, calculated from the distribution of bar-by-bar deviations of the price source from the anchor during the current RTH session. Each bar inside the RTH session contributes a deviation value (price minus anchor) and an absolute deviation value to a running intraday dataset that the band calculations draw from. Every band type resets at the RTH open and builds from scratch each session, meaning the bands are always describing the current day's price behaviour relative to the anchor rather than any historical average.
Symmetric Standard Deviation Bands (± 1σ and ± 2σ)
These are calculated using the volume-weighted variance of all bar deviations from the anchor during the session. The formula weights each bar's squared deviation by its volume, so high-volume bars contribute proportionally more to the width of the bands than low-volume bars. The result is a proper volume-weighted standard deviation, not a simple statistical standard deviation. The ± 1σ bands mark the range within which approximately 68% of volume-weighted price activity has occurred relative to the anchor, and ± 2σ marks roughly 95%. On a well-behaved session these bands will tend to expand gradually and consistently as the day progresses. A sudden widening indicates a volatile push away from the anchor with significant volume behind it.
Asymmetric Standard Deviation Bands
Rather than computing a single standard deviation across all deviations, the asymmetric bands split the deviation dataset into two groups: bars where price was above the anchor and bars where price was below the anchor. A separate volume-weighted variance is computed for each group, yielding an upper sigma and a lower sigma. The upper band sits at anchor plus the upper sigma, and the lower band sits at anchor minus the lower sigma. When the upper band is wider than the lower band, the session's upside volatility has been greater than its downside volatility — the distribution is stretched to the upside. The reverse indicates downside skew. This is a more honest representation of intraday volatility than symmetric bands when the session has a directional bias, since symmetric bands will always produce identical upper and lower widths regardless of where price has actually been spending its time.
Median Absolute Deviation Bands (MAD)
The MAD bands are calculated from the median of all absolute deviation values collected during the session. Rather than squaring deviations as standard deviation does, MAD takes the median of their absolute values, making it substantially more resistant to outlier bars. A single spike bar with a large deviation will pull the standard deviation bands outward significantly, but will have very little impact on the MAD bands if the majority of bars have remained close to the anchor. In practice, if the MAD bands are noticeably narrower than the ± 1σ bands, it suggests the session has had one or more sharp but brief excursions from the anchor while most activity has been tightly contained. If the two are similar in width, price volatility has been more evenly distributed throughout the session.
Percentile Bands (10th, 25th, 75th, 90th)
These bands are calculated by sorting the full array of per-bar deviations accumulated during the session and finding the deviation at each percentile using linear interpolation between adjacent values. The result is added to the anchor to produce the plotted level. The 25th and 75th percentile bands define the interquartile range — the zone within which the middle 50% of bars have traded relative to the anchor. The 10th and 90th percentile bands mark the outer boundaries that only 10% of bars have exceeded on each side. Unlike standard deviation bands, percentile bands make no assumption about the shape of the deviation distribution. They are purely empirical — they describe exactly where price has been during the session without any statistical model underlying them. On a trending session the percentile bands will be visibly asymmetric, sitting closer together on one side of the anchor and more spread on the other, directly reflecting the directional distribution of bars.
VWAP of Deviations
This is a single line calculated as the volume-weighted mean of all bar deviations from the anchor during the session. It is plotted as an offset from the anchor — if the line is above the anchor, it means that volume has been transacting above the anchor on a net basis throughout the day. If it is below, the heavier volume has been printing below the anchor. At the very start of the RTH session when both VWAPs are close to each other the line will be near the anchor, and it will drift in the direction where the heavier volume has been occurring as the session progresses. It functions as a volume-weighted bias indicator — a reading consistently above the anchor suggests buyers have been more active on a volume basis, and vice versa.
─────────────────────────────────────────────
CONFIGURATION — SESSIONS SETTINGS
─────────────────────────────────────────────
Time Zone sets the timezone used to interpret the Session window. The tooltip reminds you that GMT and UTC are equivalent. Match this to the timezone shown in the bottom right of your PulseWire chart. The default is GMT-4, which corresponds to US Eastern Daylight Time.
Session defines the start and end time of the window within which the Session VWAP is active and accumulating. The default is 0600-0900, representing the pre-market period from 6am to 9am Eastern. You can change this to any time window that suits your instrument and trading style. On instruments without an extended pre-market you might set this to your own session open or any other meaningful anchor time.
Highlight Session enables a background colour fill on bars that fall within the session window, making it easy to see which bars are contributing to the Session VWAP. The colour is configurable next to the toggle and defaults to a faint aqua.
─────────────────────────────────────────────
CONFIGURATION — ANCHOR SESSION VWAP SETTINGS
─────────────────────────────────────────────
VWAP Source sets the price input used for the Session VWAP calculation. The default is HLC3 (the average of high, low, and close), which is the conventional choice for VWAP calculations. Other available options include close, open, HL2, OHLC4, and HLCC4. Changing this will affect both the VWAP line itself and the deviation values used in the band calculations, since the bands use vsrc as their price input.
Session VWAP enables or disables the Session VWAP line on the chart. The colour and line width are set using the colour picker and width field next to the toggle.
Show Previous Session VWAPs enables the display of completed Session VWAP lines from prior days, drawn in the same colour as the live line. These give you a visual history of where previous sessions' VWAPs settled and how the current session compares.
Number of Previous Sessions controls how many prior session VWAP lines are retained on the chart. The range is 1 to 100, defaulting to 50. Higher values provide more historical context but may create visual clutter on longer lookback charts.
─────────────────────────────────────────────
CONFIGURATION — RTH VWAP SETTINGS
─────────────────────────────────────────────
Show RTH VWAP enables or disables the RTH VWAP line. The colour and width are set using the adjacent controls. The RTH VWAP defaults to purple at width 2, making it visually distinct from the thinner Session VWAP.
RTH Session Time (EST) sets the start and end of the RTH window using a session string in the format HHMM-HHMM, interpreted in the America/New_York timezone. The default is 0930-1600, representing the standard US equity market session. Change this for futures instruments that have different session boundaries, or for non-US markets where you want to define a custom RTH equivalent.
RTH VWAP Source sets the price input used specifically for the RTH VWAP calculation, independently of the Session VWAP source. It defaults to HLC3. Having separate source inputs means you can experiment with different price inputs on each line — for example running the RTH VWAP on the close while keeping the Session VWAP on HLC3 — or simply keep both on the same source for consistency.
─────────────────────────────────────────────
CONFIGURATION — STATS TABLE
─────────────────────────────────────────────
Show Stats Table enables or disables the on-chart statistics table.
Position sets where the table appears on the chart. Options cover all eight corners and edge-centre positions. The default is Top Right.
Text Size controls the font size used throughout the table. Options are Tiny, Small, and Normal. Small is the default and suits most screen configurations.
Max Days to Track sets the maximum number of completed RTH sessions the indicator retains in its historical arrays for statistical calculations. The range is 10 to 500, defaulting to 100. Increasing this provides more statistically stable averages but increases memory usage. All statistics in the table — win rate, retest averages, timing distributions, hourly breakdowns — are computed across however many sessions have been recorded up to this limit.
─────────────────────────────────────────────
CONFIGURATION — BAND LEVELS
─────────────────────────────────────────────
Each band type has a checkbox to enable it and one or more colour pickers to control how it appears. All bands are off by default. Each is described in detail in the statistical bands section above. The controls are:
Anchor (midpoint) — enables the midpoint line between the two VWAPs, with a single colour picker. Useful as a reference when evaluating the bands.
± 1σ (symmetric) — enables the symmetric ± 1 standard deviation bands, with a single shared colour applied to both the upper and lower line.
± 2σ (symmetric) — enables the symmetric ± 2 standard deviation bands, with a single shared colour.
Asymmetric σ (upper/lower) — enables the asymmetric bands with separate colour pickers for the upper and lower line, allowing you to visually distinguish upside from downside volatility.
MAD (± median abs dev) — enables the MAD bands with a single shared colour.
Percentile bands (10/25/75/90) — enables all four percentile bands with separate colour pickers for the inner pair (25th/75th) and the outer pair (10th/90th).
VWAP of deviations — enables the volume-weighted mean deviation line with a single colour picker.
─────────────────────────────────────────────
THE STATS TABLE — WHAT IT SHOWS AND HOW TO READ IT
─────────────────────────────────────────────
The table is divided into four sections. A yellow header row at the very top shows the total number of completed RTH sessions recorded and the maximum days setting, so you always know the sample size behind the statistics.
Sessions Coverage
The coverage row reads as "SESSIONS: X days | max tracked: Y". X is the number of completed RTH sessions the indicator has observed and recorded since being applied to the chart. Y is the Max Days to Track setting. Once X equals Y the oldest sessions begin dropping off as new ones are added, keeping a rolling window. On a 1-minute chart with 100 max days, the indicator will typically reach the maximum within the first few weeks of chart data.
Win / Loss
This section tracks whether the relative position of the two VWAPs at the end of the RTH session correctly predicted the directional close for that day.
The TODAY row shows the current live state: whether the RTH VWAP is currently above or below the Session VWAP (RTH ABOVE or RTH BELOW), and whether price is currently above or below the RTH open (BULL or BEAR). If the RTH session has not yet started, it shows AWAITING.
WIN RATE shows the percentage of completed sessions in which the end-of-day RTH VWAP position correctly predicted the directional close. A session is counted as a win when the RTH VWAP finished above the Session VWAP and price closed above the RTH open (a bullish alignment), or when the RTH VWAP finished below the Session VWAP and price closed below the RTH open (a bearish alignment). The detail column shows the raw count as wins over total sessions.
BULL/BEAR shows the breakdown of winning sessions by direction — how many of the wins were in the bullish alignment versus the bearish alignment. This helps identify whether the signal has directional asymmetry on your instrument.
STREAK shows whether the current streak is a run of wins or losses and how many consecutive sessions it has lasted.
Retests & Crossovers
This section measures two types of intraday behaviour: VWAP retests and VWAP crossovers.
A retest is recorded when a bar's wick crosses through one of the VWAPs but the bar's close remains on the same side it was on before the wick. In other words, price touches or briefly pierces the VWAP level but the candle does not close through it, indicating the level held. RTH RETEST counts retests of the RTH VWAP and SESS RETEST counts retests of the Session VWAP. The mean and median columns show the average and median number of these events per day across the recorded session history. A mean of 3.2 for RTH retests, for example, means the RTH VWAP is typically touched and rejected roughly three times per session.
A crossover is recorded when the RTH VWAP crosses above or below the Session VWAP on a confirmed bar. This is a stronger event than a retest because it means the two benchmarks have swapped relative positions. CROSSOVERS shows the average and median number of such crosses per day. On low-volatility days in a clearly directional instrument the crossover count may be zero or one. On ranging or volatile days it may be several.
Event Timing
This section answers the question of when during the RTH session these events tend to happen. For each of the three event types — RTH retest, Session retest, and crossover — it shows the average time, the median time, and the peak hour, all in EST.
The average time is the mean of the fractional hour at which each event has occurred across the full history, converted to a HH:MM display. The median time is the 50th percentile of that same distribution. The peak hour is whichever one-hour bucket between 09:00 and 15:00 has accumulated the most events in total across the session history.
If the median RTH retest time is 10:08 and the peak hour is 10h, that tells you retests of the RTH VWAP have historically been most concentrated in the first hour after the open. If the average and median are separated — say average is 11:30 but median is 10:45 — it suggests there is a tail of late-session events pulling the mean later, but most activity happens earlier.
Hourly Event Count
This section gives you the raw breakdown of event counts by hour, running from the 09:00 hour through to the 15:00 hour. Each row represents one hour and shows the total number of RTH retests, Session retests, and crossovers that have occurred during that hour across all recorded sessions. This is the full distribution from which the peak hour in the timing section is derived, and it lets you see the shape of that distribution rather than just the peak. An instrument where the hourly counts are spread fairly evenly across all hours behaves very differently to one where most events are concentrated in the 09:00 and 15:00 hours, and that pattern is immediately visible here.
─────────────────────────────────────────────
TIPS FOR EFFECTIVE USE
─────────────────────────────────────────────
Start with the two VWAP lines alone and observe how often the RTH VWAP and Session VWAP converge, diverge, and cross during your instrument's typical session. The relative position of the two lines at the open versus at midday and close is the core input to the win/loss tracking, so developing an intuition for how they interact on your specific instrument before enabling the bands is worthwhile.
The win rate statistic is a measure of historical alignment between the two VWAPs and the daily directional close — it is not a prediction of tomorrow's outcome. Its value is in telling you whether the two-VWAP relationship has had directional relevance on this instrument historically. A win rate significantly above 50% suggests the configuration carries predictive information worth paying attention to; near 50% suggests it has been essentially random.
For the statistical bands, start by enabling the symmetric ± 1σ and ± 2σ bands alongside the anchor line to get a baseline feel for the session's deviation range. Then enable the asymmetric bands on a few sessions where you noticed a strong directional bias to see how the upper and lower widths diverge. The MAD bands are most informative when compared directly against the ± 1σ bands — if MAD is substantially tighter it means the session has had outlier bars inflating the standard deviation that most of the session's activity did not participate in.
The VWAP of deviations line is a useful real-time bias read once you are familiar with it. In a session where the line has been consistently positive (above the anchor) since the open and has not reversed, the weight of volume is behind the bullish side of the anchor. A line that has drifted from positive to negative mid-session suggests a shift in volume-weighted participation, which often precedes or accompanies meaningful directional moves.
The timing data in the table is most useful when you have accumulated 50 or more sessions of history and are trading an instrument with a consistent intraday rhythm. Instruments with predictable open-range activity and a defined close pattern will show clear concentrations in the hourly breakdown. Instruments that are event-driven or highly macro-sensitive will tend to show flatter distributions.
The Max Days to Track setting has a meaningful effect on all statistics. A smaller value — say 20 or 30 — will make the statistics more responsive to recent conditions but noisier. A larger value — 200 or 500 — will produce more stable averages but may lag if the instrument's behaviour has changed regime. For most use cases 50 to 100 days strikes a reasonable balance.
On instruments where the pre-market session is not meaningful or does not exist, set the Session time window to a custom anchor of your choice — for example the overnight high or the globex open — and the Session VWAP will anchor from that point instead. The statistical framework operates identically regardless of what the session window represents.
─────────────────────────────────────────────
DISCLAIMER
─────────────────────────────────────────────
This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, or a trading recommendation of any kind. All statistical outputs — win rates, retest averages, timing distributions — are derived from historical data and are not indicative of future results. The user assumes full responsibility for any trading decisions made using this tool. Always apply your own analysis and risk management.
Indicator
SuperTrend Take-Profit Dimensions [AlgoAlpha]🟠 OVERVIEW
A multi-dimensional take-profit aid that scores how typical the current bar looks compared to past SuperTrend pivots, so you can tell when a trend has reached favorable exit conditions.
The indicator runs a standard SuperTrend and records every confirmed zigzag pivot that occurs during a matching-direction run. Tops go into a bull pool , bottoms into a bear pool . Each pivot is stored as a set of readings across several independent axes, such as relative volume , time of day , and price position inside the recent range .
On every bar, the current reading on each axis is compared to that historical pool. A blended score from 0 to 100 tells you how closely the current conditions resemble where past pivots in the same direction have clustered. The idea is to give trend followers a data-backed sense of when to start tightening up, rather than guessing an exit or using a fixed R-multiple.
The three built-in axes were chosen deliberately to be as uncorrelated as possible , each describing a different dimension of market context: volume (relative volume percentile), time (time of day), and price (position in recent range). Correlated inputs would double-count the same information and distort the blended score; picking axes that describe genuinely different aspects of the market means each one contributes independent evidence, and the score reflects how many distinct dimensions are currently in agreement.
🟠 CONCEPTS
SuperTrend — An ATR-based trailing stop that flips between bullish and bearish states. Controls which pool of historical pivots the script reads from.
Pivot pool — A rolling store of confirmed zigzag pivots, split by direction. Bull pool holds pivot highs that printed during bullish SuperTrend runs; bear pool holds pivot lows from bearish runs. Capped at 2000 entries per side .
Context axis — A 0–100 value measured at the pivot bar. The script ships with three built-ins ( relative volume percentile , time of day , position in recent range ) and one optional user-plugged signal.
Axis independence — The three built-in axes cover volume , time , and price respectively, chosen so each describes a structurally different part of the market. Low correlation between axes keeps the blended score from being dominated by any single factor.
Conditional histogram — For each active axis, the script walks its pool and keeps only pivots whose bins on every other active axis match the current bar. The survivors are binned to form a histogram.
Axis score — For one axis, the count of pivots in the current bar's bin divided by the count in the histogram's tallest bin, scaled to 0–100 . 100 means the current context sits in the densest part of past pivots.
Blended favourability score — Arithmetic mean of the active per-axis scores. This is what the gauge and table display.
Density-match scoring — The score measures how common the current context is among past pivots. It is not a forward probability and makes no claim about what happens next.
🟠 FEATURES
Right-side context profiles — Stacked mini histograms render to the right of price, one per active axis.
• Bar heights show how pivots in each axis's conditional pool distribute across bins.
• A dashed vertical line marks the current bar's bin on that axis, so you can see at a glance where today sits against history.
• Bar hue tracks the active SuperTrend direction.
Favourability gauge — A vertical gradient table in the bottom-right showing the blended score, with a chevron marking the current level. Green at the top, red at the bottom.
Favourability breakdown table — A two-column readout of each active axis's individual score out of 100, plus a final row that classifies the blended score as Good , Neutral , or Bad . Position and text size are configurable.
Bar coloring — Bars fade from neutral grey toward the opposing trend colour as the blended score rises toward 100, so the chart itself signals when the context is stretched.
Take-profit markers — Small orange markers print above or below the bar when the blended score hits 100 for the active SuperTrend direction.
Timeframe guard — The time-of-day axis disables automatically on daily and higher timeframes, where the reading has no meaning, and a banner explains this so the blended score stays honest.
Multi-dimensional scoring engine — Four independent axes feed into a single score, each conditioned on all the others.
• Three built-in axes can be toggled on or off individually.
• A fourth axis accepts any plot via source input , provided the series stays within 0–100 on all loaded bars.
• An on-chart warning prints if the custom signal leaves that range, and the axis is ignored until it is corrected.
Deliberately uncorrelated built-in axes — Volume ( relative volume percentile ), time ( time of day ), and price ( position in recent range ) cover three structurally different facets of market context. Keeping the axes independent means each one adds new information to the blend rather than reinforcing the others.
Alert conditions — Six alerts are included: SuperTrend bullish flip, SuperTrend bearish flip, score peak match, and crossovers into the Good , Neutral , and Bad bands.
🟠 HOW TO USE
Add the script to an intraday chart on a liquid instrument and let it run long enough to populate the pools. More history means more stable conditional histograms.
Let SuperTrend define the active regime. The script only scores in the direction of the current trend; bar coloring and take-profit markers respect that regime.
Read the gauge and breakdown table together. The gauge shows the blended level; the table shows which individual axes are pulling it up or down.
Use the right-side profiles as a sanity check. If the dashed current-bin marker is sitting on or near the tallest bar across most axes, the current context closely resembles past pivot contexts in that direction.
Treat high scores as a cue to tighten management, not as reversal signals. A reading of 100 means conditions match where pivots have historically clustered, not that the trend is guaranteed to end.
Adjust the zigzag pivot length to control how strict the pool is. Lower values admit more pivots ( bigger, noisier sample ); higher values keep only firmer pivots ( smaller, cleaner sample ).
Plug your own signal into the custom axis to test whether an existing 0–100 oscillator adds useful conditioning, such as an RSI or a normalised momentum reading. For best results, pick a signal that is not strongly correlated with the three built-ins, so the custom axis adds a new dimension rather than re-stating an existing one.
Enable only the alerts that fit your workflow. The band-crossover alerts fire once per transition , not on every bar inside a band.
🟠 LIMITATIONS
The pool holds every confirmed pivot during a matching-direction run, not only pivots that ended the trend. Intermediate pullbacks sit alongside genuine terminal pivots. Raising the zigzag pivot length filters the pool further if you want a cleaner sample.
On strongly trending symbols the pool is dominated by pullback pivots rather than true terminal exits, because strong trends have many small pullbacks and only one final top or bottom. On choppy symbols the ratio is more balanced. Read the score with this in mind.
The blended score is a density-match measure, not a forward probability . A high reading means today's context is common among past pivots of this direction. It does not predict that the trend is about to end.
The time-of-day axis has no meaning on daily and higher timeframes and is disabled automatically on those timeframes. A warning banner confirms when this is active.
The custom axis requires a source already scaled to 0–100 on every loaded bar. Values outside that range disable the axis and surface a warning. Toggling the custom axis on a live chart starts the range check from the current bar; reload the chart to validate against full loaded history .
Pools are capped at 2000 entries per direction , with the oldest entries dropped first. On very long intraday histories the effective lookback is symbol- and timeframe-dependent.
All scoring uses data up to and including the confirmation bar of each pivot; pivots themselves are detected with the standard zigzag confirmation lag, meaning the scoring population on any given bar reflects pivots confirmed at least zzLen bars earlier.
🟠 CONCLUSION
SuperTrend Take-Profit Dimensions combines a standard SuperTrend with a rolling pool of historical pivot contexts and scores the current bar against that pool across up to four independent axes spanning volume, time, and price. The output is a blended 0–100 favourability reading , a per-axis breakdown, and a set of context profiles that show where past pivots have clustered. It gives trend followers a structured, data-backed way to judge when the current context matches where trends have historically given back profit, without pretending to predict the next bar.
Indicator
Hash Dispersion Cone## Overview
The **Hash Dispersion Cone** is a forward-projecting statistical probability envelope built on realized volatility. Anchored to the current bar's close price, it projects where price is statistically expected to trade over the next N bars using log-normal volatility scaling — the same mathematical framework used by professional options desks and quantitative risk managers.
This is not a buy/sell signal generator. It is a **probability map** — a live, continuously recalculating field that shows the market's statistical boundaries given current realized volatility. When volatility is low, the cone is tight. When volatility is expanding, the cone widens in real time.
> *"Know your range before the market shows it to you."*
> — Hash Capital Research
---
## How It Works
### The Mathematics
The cone is constructed using the **square-root-of-time rule**, a foundational principle of financial mathematics. At each forward bar `t`, the projected price boundaries are calculated as:
```
Upper_k(t) = AnchorPrice × exp( +k × σ × √t )
Lower_k(t) = AnchorPrice × exp( −k × σ × √t )
```
Where:
- `k` = standard deviation multiplier (1 for 1σ, 2 for 2σ)
- `σ` = realized volatility per bar (selected method)
- `t` = number of bars forward
Using the **log-normal form** is intentional and correct. It keeps the cone asymmetric in price space — the upside boundary is always further from anchor than the downside boundary by an equal percentage amount. This reflects how asset prices actually behave: they cannot go below zero, but can theoretically rise without limit.
### Why the Cone Moves With Price
The cone repaints every bar because it is always anchored to the **current close**. This is by design. It answers the question: *"Given what volatility is right now, where could price go from here?"* — not where it could have gone from a past bar.
---
## Volatility Methods
Three realized volatility estimators are available. Each has distinct statistical properties suited to different market conditions.
### Close-to-Close (Default)
The standard log-return standard deviation:
```
σ = stdev( ln(Close / Close ), lookback )
```
Most widely understood. Can underestimate volatility on assets that gap frequently or have large intrabar swings. Best for: **daily timeframes, equities, stable assets**.
### Parkinson (High-Low)
Uses the high-low range instead of close-to-close returns:
```
σ² = mean / (4 × ln2)
```
Approximately **5x more statistically efficient** than Close-to-Close for the same lookback period. Captures intrabar volatility that close-to-close misses. Best for: **crypto, commodities, FX — any asset with large intrabar ranges**.
### Garman-Klass (OHLC)
The most efficient of the three estimators, using all four price points:
```
σ² = mean
```
Most accurate for intraday analysis where the open-to-close gap carries information. Best for: **intraday timeframes (1H, 4H), equities with significant opening gaps**.
---
## Inputs Reference
### Volatility Calculation
| Input | Default | Description |
|---|---|---|
| Lookback Period | 30 | Bars used to calculate σ. Lower = more reactive. Higher = smoother. |
| Volatility Method | Close-to-Close | Estimator used. See Volatility Methods above. |
| Vol Trend MA Length | 10 | SMA length applied to σ for regime classification. |
**Lookback Tuning Guide:**
- `10–20` bars → reactive, tracks recent volatility closely, cone resizes quickly
- `30` bars → balanced default, smooths out single-spike distortions
- `60–100` bars → slow-moving, regime-level volatility, stable cone width
### Projection
| Input | Default | Description |
|---|---|---|
| Forward Bars | 15 | How many bars ahead the cone projects. |
| Show 1σ Band | On | Displays ±1σ boundary (~68% probability zone). |
| Show 2σ Band | On | Displays ±2σ boundary (~95% probability zone). |
| Show Midline Anchor | On | Dotted horizontal line at anchor price. |
**Forward Bars Tuning Guide:**
- `5–10` bars → scalping and intraday setups
- `10–20` bars → swing trading (recommended for 4H/Daily)
- `20–50` bars → position trading and options expiry targeting
**Important:** Doubling forward bars does NOT double the projected range. Due to the √t rule, doubling projection bars widens the cone by only ~41%.
## Visual Guide
### Band Colors and Meaning
```
+2σ ──────────────────────────── Crimson solid (outer extreme, ~95%)
░░░░ TEAL FILL (upside risk zone) ░░░░
+1σ - - - - - - - - - - - - - - Green dashed (primary upside boundary, ~68%)
▓▓▓▓ NAVY FILL (highest-probability core) ▓▓▓▓
MID ····························· Grey dotted (anchor / flat scenario)
▓▓▓▓ NAVY FILL (highest-probability core) ▓▓▓▓
−1σ - - - - - - - - - - - - - - White dashed (primary downside boundary, ~68%)
░░░░ MAGENTA FILL (downside risk zone) ░░░░
−2σ ──────────────────────────── Crimson solid (outer extreme, ~95%)
```
### Three-Layer Fill System
**Navy Core (±1σ interior):** The highest-probability zone. Statistically, ~68% of all future closes are expected to land here. This is where price "wants" to stay in a low-volatility regime.
**Teal Upside Zone (+1σ to +2σ):** The upside risk corridor. Price entering this zone is statistically elevated — possible, but in the outer 14% of expected outcomes.
**Magenta Downside Zone (−1σ to −2σ):** The downside risk corridor. Mirror of the teal zone. Price here signals a statistically significant down-move.
---
## Trading Applications
### 1. Cone Width as Regime Filter
The most important signal is the **width of the cone itself**, not where price is within it.
- **Tight cone** = low volatility, compressed range → range-bound playbook (fade edges, mean revert to midline)
- **Wide cone** = high volatility, expanded range → momentum playbook (ride direction, wider stops)
Never take a counter-trend trade in a wide, expanding cone. Never chase a breakout in a tight, contracting cone.
### 2. Price at 1σ Edge = Mean Reversion Setup
When price reaches the projected +1σ or −1σ label price, it has statistically entered the outer 32% of expected outcomes.
**Setup:**
```
Condition 1: Vol Regime is STABLE (─)
Condition 2: Price has reached the ±1σ label level
Condition 3: Rejection candle confirms (wick, doji, engulf)
Entry: Fade the move back toward midline
Target: Anchor price (midline)
Stop: Just beyond the ±2σ label
R:R: Typically 2:1 to 3:1 depending on cone width
```
### 3. 2σ Touch = Extreme Signal
A touch of the ±2σ boundary represents a 2-standard-deviation move. Statistically, only ~5% of future closes are expected to exceed this level.
- In a **stable** or **contracting** regime: high-conviction mean reversion entry with defined risk to the 2σ line
- In an **expanding** regime: possible breakout continuation — wait for candle confirmation before fading
- Use the 2σ label price directly as a hard stop level for trades taken inside the cone
### 4. Vol Regime Arrow as Trade Filter
The regime classification in the dashboard acts as a meta-filter over all other signals.
- **▲ EXPANDING (red):** Do not counter-trend trade. Only take momentum entries in the direction of the move or stay flat. Cone edges are likely to be broken.
- **▼ CONTRACTING (green):** Volatility is compressing. A breakout is loading. Watch for the first expansion candle and trade the direction of the break. This is often the highest R:R setup the cone generates.
- **─ STABLE (white):** Range conditions active. Mean reversion setups at σ edges are highest probability in this state.
### 5. Stop Placement Reference
The σ label prices at the cone's right edge provide statistically-grounded stop levels:
- **Conservative stop:** Beyond ±2σ label (95% of moves contained)
- **Standard stop:** Beyond ±1σ label (68% of moves contained)
- **Tight stop:** A fixed percentage of the ±1σ distance
This gives every trade a volatility-adjusted stop rather than an arbitrary fixed-pip or percentage stop.
---
## Timeframe Recommendations
| Timeframe | Lookback | Forward Bars | Vol Method | Best Use |
|---|---|---|---|---|
| 5m / 15m | 20 | 10 | Garman-Klass | Scalping entries |
| 1H | 30 | 15 | Parkinson or GK | Intraday swing |
| 4H | 30 | 15 | Parkinson | Swing trading (default) |
| Daily | 30–50 | 20 | Close-to-Close | Position trading |
| Weekly | 20 | 10 | Close-to-Close | Macro range framing |
---
## Asset Class Notes
**Crypto (BTC, ETH, SOL, etc.):**
Parkinson is recommended over Close-to-Close due to large intrabar ranges common in 24/7 markets. Cone will be noticeably wider than equities at equivalent timeframes, reflecting structurally higher realized volatility. The 2σ touch setup is especially reliable on 4H BTC during STABLE regimes.
**FX:**
Parkinson works well. Forward Bars of 10–15 on 4H aligns well with typical intraweek swing durations. Cone width is generally tighter than crypto, making σ edge touches more frequent.
**Equities / Indices:**
Garman-Klass recommended for intraday. Close-to-Close is standard for daily and above. Be aware that equity close-to-close can underestimate true vol during earnings season — consider switching to Garman-Klass temporarily.
**Commodities:**
Parkinson preferred. Energy and agricultural commodities have gap and range behavior similar to crypto.
---
## Technical Notes
- The cone redraws on every bar close. It is anchored to the current close and always projects forward from the most recent confirmed price. This is expected behavior — not a repaint flaw.
- Fills are capped at 16 segments per zone to remain within Pine Script's linefill object limit (~50 total). At default 15 forward bars, all fills render completely.
- The annualization factor is automatically adjusted for timeframe: Daily (√252), Weekly (√52), Monthly (√12), and intrabar (derived from `timeframe.in_seconds()`).
- All price labels use comma-formatted output (e.g., `74,161.34`) for readability at large price scales.
---
## Disclaimer
The Hash Dispersion Cone is an educational and analytical tool. Statistical probability does not guarantee any specific price outcome. All trading involves risk. Past statistical behavior does not guarantee future results. This indicator does not constitute financial advice.
---
*Published on PulseWire by Hash Capital Research *
Indicator
Pattern Match Price ProjectionPattern Match Price Projection is a price forecasting tool built on historical analog analysis. It scans past market data to find segments of price action that closely resemble the most recent pattern, then uses what followed those similar setups to construct a forward projection. Instead of relying on a single historical match, the model aggregates multiple high-quality analogs and produces an averaged path, along with adaptive upper and lower bands that reflect the dispersion of those outcomes.
The projection is derived from return-based pattern matching, with optional normalization to focus on structural similarity rather than magnitude. This allows the model to identify recurring behaviors across different volatility regimes and price levels. The result is a forward estimate that reflects how the market has historically behaved after similar conditions, rather than a purely reactive or lagging indicator.
A visual overlay of the current pattern is included to provide context for what the model is evaluating in real time, making it easier to interpret why a projection is being generated. The forecast itself can be anchored either to the most recent closing price or to a smoothed price reference, depending on preference. Non-repaint mode ensures the projection remains stable during an active candle, while live mode allows it to update dynamically as price evolves.
This tool is best used as a contextual framework for anticipating potential price paths based on historical precedent. It does not attempt to predict exact outcomes, but instead highlights probabilistic structure derived from prior market behavior.
Indicator
Extended Inside Bar Range (by Shadow Quant Trader)This indicator identifies and highlights extended inside bar structures based on a single mother candle.
Unlike traditional inside bar indicators that only mark the immediate inside candle, this script tracks the entire consolidation range defined by the mother candle and highlights all subsequent candles that remain within its high–low range.
🔶 Key Features:
Detects the initial mother candle
Highlights all candles inside the mother candle range
Continues marking candles until a breakout occurs
Ignores nested inside bars and maintains the original range
Helps visualize price compression and breakout zones
🔶 How it works:
When an inside bar is detected, the previous candle becomes the mother candle
All following candles are marked as long as they remain within that range
The sequence ends only when price breaks above or below the mother candle
🔶 Use Cases:
Identify consolidation before breakouts
Spot volatility contraction setups
Improve price action analysis
Credits:
Developed by Shadow Quant Trader
Indicator
Kelly Criterion CurveThe Kelly Criterion Curve indicator gives you the leverage/return tradeoff by displaying a bell curve with growth and leverage. This indicator shows where you are on the risk curve depending your allocation/leverage used and the optimal leverage to use in any asset.
What Does It Show?
The indicator plots the Kelly growth function:
g(f) = μ·f - 0.5·σ²·f²
Where:
g(f) = Expected growth rate at leverage f
μ = Annualized return
σ = Annualized volatility
f = Leverage multiplier
The curve peaks at the Optimal Kelly leverage (full Kelly) and then declines, showing that:
Too little leverage = underutilized capital
Too much leverage = volatility drag destroys returns
The curve is dynamically divided into zones based on your asset's return profile:
Underinvesting (Green) - Too conservative, underutilized capital
Optimal Sizing (Teal) - Sweet spot for position sizing
High Risk (Yellow) - Diminishing returns, high volatility drag
Never Logical (Red) - Risk outweighs reward
Suicidal (Black) - Negative expected returns
Position Markers
★ Kelly Optimal (Green/Red) - Maximum long-term log growth leverage
½ Kelly (Yellow) - Conservative sizing (recommended most times)
Settings for Kelly Calculation
Lookback Period - Historical data window for calculations (default: 252 = 1 year)
Annual Trading Days - For annualization (default: 252)
Use Log Returns - More accurate for compounding (recommended: ON)
Curve Smoothness (20-200) - Number of points on curve (default: 100)
Maximum Leverage Display (2-10x) - X-axis range
Show Short Positions - Display negative leverage for short strategies. Note the chart is not fully optimized for shorts.
Show Optimal Kelly Marker - Mark optimal leverage on curve
Show Half Kelly Marker - Mark conservative leverage
How to Use
Look at Optimal Kelly - This is the theoretical maximum for the period analyzed
Use Half Kelly for conservative sizing
Check which risk zone your position falls into
If your leverage is in the High Risk zone → Consider reducing
If you're in Never Logical or Suicidal → I wish you good luck because you will need a lot
If you're in Underinvesting → You may be too conservative
IMPORTANT
The indicator is based on past returns and volatility. It CANNOT predict:
Market crashes
Regime changes
Black swan events
If you use Optimal Kelly and suddenly there's a crash, you are toasted.
Full Kelly maximizes long-term growth but can experience large drawdowns
Most traders use ¼ to ½ Kelly for risk management
You should almost never use full Kelly, unless you are extremely confident
Remember leverage amplifies gains and losses
Notice how Max Growth isn't simply Ann. Return × Leverage
The formula accounts for volatility drag (the cost of using leverage)
Higher volatility = lower optimal leverage
The Kelly Criterion was developed by John L. Kelly Jr. in 1956 for information theory and later adapted for gambling (card counting for example, pioneered by Edward O. Thorp), and investing.
Optimal Leverage:
f* = μ / σ²
Expected Growth Function:
g(f) = μ·f - 0.5·σ²·f²
This is a quadratic function that forms the bell curve you see on the chart.
This indicator pairs perfectly with my other indicators:
Kelly Optimal Leverage Indicator
Jensen's Inequality + Kelly Leverage
Multi-Leverage VAR/VaG Indicator
For deeper insights on Kelly Criterion and optimal leverage:
Read my article: Unlock the Power of Monte Carlo
Read these papers:
Alpha Generation and Risk Smoothing using Managed
Volatility
Leverage for the Long Run - A Systematic Approach to Managing Risk and Magnifying Returns in Stocks
Trading with leverage involves substantial risk of loss.
The Kelly Criterion provides a theoretical framework - actual trading requires additional risk management, market analysis, and psychological discipline.
Some examples of using the Kelly Criterion Curve:
Russel 2000, last 500 days Kelly curve
Here's you can see that the optimal sizing over the last 500 days would have been around 1.7x leverage and that full Kelly is 3.4x leverage.
While Russel 2000 returned 16%, full Kelly would have returned 27.8%, and more that full Kelly (3.4x leverage) would lower the returns.
Berkshire Hathaway, last 1000 days Kelly curve
BRK stock optimal Kelly (full Kelly) is 2.5x for the last 1000 trading days. To reduce volatility, one could use 1/2 Kelly which is 1.25x leverage.
Bitcoin, last 2000 trading days Kelly curve
Very interestingly, the indicator tells us not to leverage Bitcoin. Even a 2x leverage can lead to ruin given its volatility, and in fact, in 2025 many traders got liquidated while leveraging Bitcoin by 2x.
Let me know if you have questions, suggestions and comments.
- Henrique Centieiro
Indicator
Correlation Thermal Matrix [ShigemiQuant]What's hidden in your portfolio?
Two "diversified" positions can silently carry the same risk — but a standard correlation table won't show you the structure behind it. Correlation Thermal Matrix (CTM) goes further: it builds a live pairwise heatmap for up to 15 symbols, then applies K-Means clustering to automatically group symbols that share similar correlation behavior. The result is a block-diagonal matrix where hidden risk clusters become immediately visible — something no other public PulseWire indicator currently offers.
━━ What It Does ━━
CTM calculates pairwise Pearson correlation coefficients for up to 15 symbols and renders them as a color-coded thermal matrix directly on your chart. Red cells indicate strong negative correlation (-1.0), white indicates near-zero, and blue indicates strong positive correlation (+1.0).
Beyond the heatmap, a K-Means algorithm analyzes each symbol's full row of correlations — its "correlation profile" — and groups symbols with similar profiles into clusters. The matrix is then reordered so that clustered symbols sit adjacent to each other, separated by clear visual dividers. This block-diagonal structure reveals the hidden architecture of your watchlist at a glance.
━━ Key Features ━━
K-Means Clustering (ML) — Automatically groups symbols whose correlation profiles are similar. Adjustable from K=2 to K=5 clusters (default K=3). Powered by MLMatrixLib.
Block-Diagonal Sorting — Clustered symbols are placed adjacent to each other with separator rows/columns at cluster boundaries, making structural patterns impossible to miss.
Live Correlation Heatmap — Pairwise correlations for up to 15 symbols, updated every bar. Manual Pearson calculation bypasses ta.correlation() limitations for full flexibility.
3 Built-in Presets + Custom Mode — FX Majors (12 pairs including EURUSD, GBPUSD, USDJPY), US Stocks (AAPL, MSFT, GOOGL and more), Crypto (BTC, ETH, SOL and more), or define your own symbols entirely.
Auto Duplicate Skip — If your chart symbol already exists in the preset, CTM automatically removes the duplicate so no slot is wasted.
Flexible Display — Choose table position (9 locations), text size (Tiny / Small / Normal), and toggle numeric values on or off.
Open Source — Full source code available under Mozilla Public License 2.0. Read it, learn from it, build on it.
━━ How to Use ━━
Step 1 — Add CTM to any chart. Select a preset (FX Majors / US Stocks / Crypto) or switch to Custom and enter your own symbols.
Step 2 — Read the heatmap. Deep blue cells = highly correlated pairs. Deep red = inversely correlated. White = independent. If two positions you hold are deep blue, you are more concentrated than you think.
Step 3 — Check the cluster blocks. Symbols inside the same block share similar correlation behavior. Symbols in different blocks offer genuine diversification.
Step 4 — Adjust the correlation period (default 20 bars) to match your trading horizon. Shorter periods capture recent regime shifts; longer periods reveal structural relationships.
Step 5 — Watch for changes. When a pair that was previously uncorrelated suddenly turns blue, this often signals a regime change — reassess your exposure accordingly.
━━ Parameters ━━
Parameter Default Range / Options
Correlation Period 20 5 - 100 bars
Cluster Count (K) 3 2 - 5
Symbol Preset FX Majors FX Majors / US Stocks / Crypto / Custom
Table Position Top Right 9 chart positions
Text Size Tiny Tiny / Small / Normal
Show Values On On / Off
━━ Practical Applications ━━
Concentration risk detection — Holding EURUSD and GBPUSD simultaneously? If their correlation reads +0.92, your effective exposure is nearly doubled. CTM makes this visible before the drawdown does.
Diversification discovery — Symbols in separate clusters behave independently. For example, if BTC and ETH land in Cluster 1 while SOL sits in Cluster 2, SOL may offer genuine diversification against the BTC/ETH group. Use cluster membership to build positions that don't collapse together.
Regime change early warning — A correlation that breaks from its historical pattern signals a structural shift in the market. Monitor cluster membership over time — when a symbol migrates from one cluster to another, it deserves attention.
━━ Suggested Workflow ━━
1. Detect risk clusters (CTM) — Identify which of your positions share correlated behavior.
2. Find independent momentum (Multi-Symbol Momentum Screener) — Screen for momentum signals, then cross-check with CTM to confirm those signals come from different clusters.
3. Size by real exposure (Smart Position Sizer) — Allocate position size based on per-cluster exposure rather than per-symbol, so correlated groups don't silently dominate your book.
━━ About ShigemiQuant ━━
ShigemiQuant builds open-source quantitative tools focused on risk management and portfolio intelligence. Every script is designed to solve a real trading problem — no repainting, no black boxes, fully readable source code.
━━ Changelog ━━
v1.0 — Initial release. Live correlation heatmap with K-Means clustering, 3 presets, block-diagonal sorting, and auto duplicate skip.
Indicator
Session Levels IQ [TradingIQ]Hello Traders!
🔹 Session Levels IQ
Session Levels IQ is a session-based percentage grid tool designed to map how far price typically travels away from each session open.
Instead of treating a session as a simple open-high-low-close range, this tool builds a structured level framework around the session open and tracks which distances tend to get reached, how often they get reached, and what price typically does after touching them .
Think of it as a way to study session expansion behavior around the open .
This indicator records historical observations to show what typically happens.
It’s not a strict probability model, but more of a history book of past behavior.
session-based percentage levels built outward from the open
custom session or timeframe-based session construction
hit-rate tracking for each distance level
typical move-after-hit measurement
normal vs unusual level zoning
optional coloring by historical hit rate or move-after-hit
reference price line for inspecting post-hit behavior
🔹 What the tool shows
🔸 Session-centered level grid
Each session begins from its opening price, and the script builds levels outward in configurable percentage intervals.
This creates a structured grid above and below the session open, helping you visualize how price expands relative to where the session started.
This helps reveal:
how far price tends to travel from the session open
which percentage distances are reached most often
how session expansion behaves over time
🔸 Historical hit rate by level
The script tracks whether each percentage level gets touched across completed sessions.
Over time, this produces a running statistical view of how often price reaches specific distances from the open.
This allows you to observe:
which distances are commonly reached
which distances are less typical
where session expansion begins to become unusual
🔸 Typical move after hit
In addition to tracking whether a level is reached, the script also records what price typically does after touching that level.
For levels that get hit, it measures the median follow-through after contact.
This helps show:
whether certain levels tend to lead to larger continuation
whether some levels produce relatively small follow-through
how post-hit behavior differs across the grid
This is not just about whether price gets somewhere.
It is also about what tends to happen once it gets there .
🔸 Normal vs unusual zones
A configurable normal range defines which distances from the open are considered relatively typical and which fall outside that range.
Levels inside this zone are treated as normal, while levels beyond it are treated as more unusual.
This helps identify:
common session movement areas
stretched or less typical expansion zones
where price is trading beyond its more ordinary session behavior
🔸 Level coloring modes
The script can visually color levels in different ways depending on what you want to study.
Available modes include:
By Hit Chance
By Move After
None
With hit-chance coloring, levels are shaded based on how frequently they are reached.
With move-after coloring, levels are shaded based on the magnitude of the typical move after price touches them.
This makes it easier to spot:
frequently reached levels
less common extension areas
levels associated with larger follow-through
🔸 Custom session support
You can build the framework using either:
a standard session timeframe such as 1D
a fully custom intraday session window
This makes the tool flexible for traders who want to study:
daily opens
custom market sessions
specific trading windows
🔸 Whole-number level emphasis
The script can optionally emphasize whole-number percentage distances so that major percentage thresholds stand out more clearly on the chart.
This can help when you want to quickly distinguish:
major percentage levels
minor intermediate levels
cleaner structural reference points
🔸 Reference price line
An optional draggable reference line lets you place a price directly onto a level and inspect the typical move after that level is hit.
This gives you a visual way to explore:
how levels behave after being reached
which zones tend to continue further
which levels show more limited follow-through
This feature is best viewed as exploratory context , not as a standalone signal.
🔸 Session range box
The script can also draw a box around the current session’s working range, helping frame the active expansion area as the session develops.
This gives additional context for:
the current session’s high-to-low development
where the grid sits relative to the active range
how much of the session’s expansion has already formed
🔹 How to read it
Each component provides a different layer of session information:
Session open → anchor point for the grid
Percentage levels → structured expansion distances from the open
Hit chance → how often a level gets reached across sessions
Move after hit → typical follow-through once a level is touched
Normal range → common vs unusual expansion territory
Reference line → exploratory view of post-hit behavior
🔹 Why this tool is useful
It gives you:
a structured way to study session expansion around the open
historical context for which distances are commonly reached
visibility into which extensions are relatively unusual
insight into what price typically does after contacting a level
a contextual framework for session movement analysis
🔹 Best use cases
studying how far sessions typically expand from the open
identifying common vs stretched extension zones
comparing likely and unlikely distance levels
adding structure to open-based session analysis
exploring how price tends to behave after touching key percentage levels
🔹 Important note
This tool is based on historical session behavior and percentage-distance tracking.
That means:
it is descriptive, not predictive certainty
results depend on the instrument and timeframe being analyzed
smaller level spacing creates more detail, but also more density
typical move-after-hit is informational and should not be treated too literally
🔹 Inputs you can customize
The script includes flexible controls such as:
custom session toggle
custom session time
session timeframe
level spacing percentage
normal range percentage
label detail level
label size
label side
show all stored levels
whole-number level emphasis
session range box display
level coloring mode
reference price line
Closing Notes
Session Levels IQ is built to shift the focus from simply asking where price is now to asking how far price has historically tended to travel from a session open, how often those levels are reached, and what usually happens after contact .
It helps turn session expansion into a more structured and measurable framework , so you can view open-based movement with more context than raw candles alone.
Thank you for checking it out and thank you PulseWire!
Indicator























