Market Correlation Matrix [NikaQuant]Market Correlation Matrix
A real-time correlation dashboard that displays Pearson correlation coefficients between the current chart symbol and up to 6 user-defined comparison symbols.
═══ FEATURES ═══
• Track correlations for up to 6 symbols simultaneously (default: BTCUSDT, GOLD, SPX, DXY, US10Y, QQQ)
• Heatmap-colored table with intuitive color coding from strong positive (green) to strong negative (red)
• Correlation change tracking — see how correlations are shifting over a configurable lookback period
• Visual strength bars showing absolute correlation magnitude at a glance
• Signal classification labels: STRONG+/-, MOD+/-, WEAK+/-, NEUTRAL
• Built-in alerts for strong positive/negative crosses (±0.7) and zero-line crosses
• Fully customizable: table position, text size, all colors, border styling
═══ HOW IT WORKS ═══
The indicator calculates Pearson correlation over a user-defined period (default: 50 bars) between the chart’s close price and each comparison symbol’s close price. It then renders a compact table showing:
1. Symbol — Ticker of the comparison asset
2. Corr — Current correlation value (-1 to +1)
3. Change — How much the correlation shifted vs N bars ago (with directional arrows)
4. Strength — Block-style visual bar representing absolute correlation
5. Signal — Classification from NEUTRAL to STRONG+/-
═══ SETTINGS ═══
Symbols: Configure up to 6 comparison symbols (leave blank to skip)
Correlation Period: Lookback length for Pearson calculation (default: 50)
Change Lookback: Compare current vs past correlation (default: 10 bars)
Display: Table position, show/hide title
Style: Full color customization for heatmap, headers, borders, and change indicators
═══ ALERTS ═══
• Strong positive correlation cross (above +0.7) per symbol
• Strong negative correlation cross (below -0.7) per symbol
• Any symbol crossing the zero line
═══ USE CASES ═══
• Monitor intermarket relationships in real time
• Identify regime changes when correlations break down or strengthen
• Confirm or filter trade setups using cross-asset correlation context
• Track USD, bonds, equities, and crypto correlations from a single chart Indicator

Focus Bars [Kioseff Trading]Hello Traders!
🔹 Focus Bars
Focus Bars is a lower-timeframe reconstruction tool designed to break each candle into a price-based internal structure .
Instead of viewing a bar as a single OHLC print, this tool redistributes intrabar participation across price levels, showing where activity, delta, and directional pressure concentrated inside the bar itself .
Think of it as a way to look inside the candle .
intrabar participation distributed by price level
buy vs sell pressure mapped inside each bar
delta-driven visualization of internal structure
volume-based or delta-based profile sizing
stacked recent bars for direct comparison
lower timeframe reconstruction of candle internals (up to 1 tick)
🔹 What the tool shows
🔸 Focus Bar Structure
Each visible bar is reconstructed using lower timeframe data and divided into configurable price rows.
This allows the script to build an internal map of activity inside the candle, showing how participation distributed throughout its range.
This helps reveal:
where activity concentrated inside the bar
which price regions attracted the most interaction
how the bar built from low to high
🔸 Directional participation
The script estimates directional pressure using lower timeframe price movement and distributes that pressure across the bar’s traded range.
This allows you to observe:
where buying pressure was strongest
where selling pressure dominated
how directional activity distributed through the candle
Instead of treating the candle as one net result, Focus Bars breaks it into a layered participation structure .
🔸 Volume mode
In its default form, the profile width reflects total intrabar participation at each price level.
This helps identify:
high activity zones inside the bar
areas where the market spent more effort
internal high-interest regions
This mode focuses on where the bar traded most actively , regardless of which side was dominant.
🔸 Delta Bars mode
When Delta Bars mode is enabled, the visualization shifts from general activity to directional imbalance .
Positive delta levels extend one way, while negative delta levels extend the other, helping expose where directional pressure accumulated inside the bar.
This makes it easier to see:
which prices were dominated by buyers
which prices were dominated by sellers
where internal imbalance became most extreme
This mode is about pressure and imbalance , not just participation.
🔸 Recent bar stacking
The script displays multiple recent reconstructed bars side by side, allowing you to compare internal structure across the most recent candles.
This helps reveal:
whether participation is shifting higher or lower
whether recent bars are building similarly or differently
how internal pressure changes from one bar to the next
Rather than looking at candles in isolation, you get a stacked structural view of recent bar development.
🔸 Price-row resolution
Each bar is divided into a configurable number of rows.
Higher row counts provide finer structural detail, while lower row counts simplify the visualization.
This lets you control the balance between:
detail
clarity
performance
🔸 Lower timeframe reconstruction
The script uses lower timeframe data to estimate how participation distributed through each candle.
Granularity can be selected between:
1-minute
1-second
1-tick
This allows the internal structure to become more detailed as lower granularity data becomes available.
🔸 Buy / sell volume labels
Each price row includes separate displayed values for:
sell-side participation
buy-side participation
This gives a direct read on how activity distributed at each level, rather than relying only on color or profile width.
🔸 Gradient-based intensity
Color gradients help represent the magnitude of participation and directional pressure at each price level.
This makes it easier to spot:
high-intensity zones
low-interest areas
strong directional concentrations
Stronger color intensity reflects stronger internal participation or imbalance.
🔹 How to read it
Each component gives a different layer of information:
Candle body / wick → the outer structure of the bar
Profile width → where participation concentrated
Delta mode → where directional imbalance built
Buy / sell labels → how each side contributed at a level
Stacking → how internal structure changes bar to bar
🔹 Why this tool is useful
It gives you:
a way to look inside candles instead of only at candle outcomes
price-based intrabar participation mapping
clear visualization of internal volume and delta structure
context for where buying or selling pressure concentrated
a deeper structural view of recent bar development
🔹 Best use cases
analyzing internal candle structure
comparing recent bars side by side
spotting hidden participation concentrations
finding where directional pressure built inside a move
adding lower-timeframe context to bar-by-bar analysis
🔹 Important note
This tool uses lower timeframe data to reconstruct intrabar structure.
This means:
it is an approximation of internal order flow
accuracy depends on available lower timeframe data
selected granularity impacts precision
different symbols and data feeds may produce different levels of detail
🔹 Inputs you can customize
The script includes flexible controls such as:
granularity selection
bar count to display
row resolution
volume mode vs Delta Bars mode
color customization
display offset
Closing Notes
Focus Bars is built to shift the focus from how a candle finished to how it developed internally .
It helps reveal not just what the bar looked like from the outside, but where participation and pressure were concentrated inside it .
Thank you for checking it out!
Indicator

Indicator

Alien The Bayesian Follower [by Oberlunar] Alien The Bayesian Follower 👁⭐
— Bayesian Gating Filter by Oberlunar
Alien The Bayesian Follower by Oberlunar is a permission layer for execution engines. At its core sits a conjugate Bayesian update that continuously revises the expected edge of each trading cell as live evidence accumulates, and automatically disables cells whose edge has decayed. Empirically, for most of the time, when a long/short gate is active, the price goes in the opposite direction or straight in the trend. Use it at 30 m, with lower TF at 15 m and trade on pullbacks.
The state space is built by crossing three fixed methodologies: a 5-class daily Regime Classifier built on Kaufman Efficiency Ratio, lag-1 autocorrelation of returns, and ATR ratio; a Dragon momentum composite aggregating EMA, RSI, MACD, and TRIX into 5 buckets; and a Pulsar flow composite aggregating OBV, CVD, and price-vs-flow divergences into 5 buckets. The full 5×5 Dragon × Pulsar grid is evaluated only inside the MIXED regime, where four specific bucket combinations carry a statistically significant edge after Bonferroni correction across all 25 cells.
The four surviving cells correspond to two long setups and two short setups. The strongest long edge sits at the intersection of strong bullish momentum and still-neutral flow — the pre-alignment phase where price has turned but order flow hasn't fully confirmed. Full alignment between momentum and flow tends to mark exhaustion. The same asymmetry holds in reverse for the short cells.
Each surviving cell carries a Normal prior representing its expected edge and the uncertainty around it. The Bayesian engine is the heart of the indicator: as the script runs, every walk-forward observation matching a cell updates that cell's prior through a conjugate Normal-Normal step, producing a posterior that shrinks prior and live evidence together via precision weighting. When live samples are few, the posterior stays close to the prior, and the cell relies on its original estimate. When live samples accumulate, the posterior tracks reality and the original prior fades.
Each cell is then assigned a status based on its posterior credible interval. **BORN** means not enough live data yet. **OK** means the credible interval excludes zero with the expected sign and the magnitude remains close to the prior. **DRIFT** means the sign is still correct, but the edge has weakened substantially. **DEAD** means the credible interval includes zero, or the sign has inverted — the cell has lost its edge and is automatically blocked from firing. This is the core defensive feature: strategies decay, and when one of the four cells decays, the Bayesian engine stops trusting it without any manual intervention.
Alerts in strict mode restrict firing to primary cells only (±2).
Permissive mode allows secondary cells (±1) as well.
The dashboard shows the live state of all four cells side by side: prior, posterior with credible interval, sample count, and status. Everything else — the cyberpunk palette, the segmented trend wedges in stay-out zones, the optional alien mascot rotating to follow the local trend — is visual feedback layered on top of the same Bayesian rule.
Enjoy,
By Oberlunar 👁⭐ Indicator

Edo Liquidity ZonesEdo Liquidity Zones — Volume-Filtered Liquidity Zone Tracker with Real-Time State Classification
Markets move between zones where liquidity has concentrated. Identifying those zones — and knowing whether they are still active, have been tested, or have already been absorbed — gives traders immediate structural context before making any decision.
Edo Liquidity Zones automates that process entirely. The indicator detects relevant price pivots, filters them by normalized volume strength, and draws liquidity zones directly on the chart. Each zone updates its state in real time as price interacts with it, giving you a live picture of where liquidity stands at any given moment.
What the indicator does
Most traders identify key levels manually — marking swing highs and lows, estimating where volume has been significant, and updating those levels every time the market moves. Edo Liquidity Zones handles all of this automatically.
The indicator scans for pivot highs and pivot lows using Pine Script's native pivot detection. Each pivot is then evaluated against a normalized volume filter. Only pivots that exceed the selected volume threshold generate a zone. This keeps the chart clean and ensures that every visible zone has meaningful volume backing it.
Each validated pivot generates a complete liquidity zone: a price box defining the zone area, a horizontal line extending to the right while the zone remains untouched, a volume label showing the pivot volume, and a state label with the exact price level centered inside the box.
Zone color intensity
Not all zones carry the same weight. The color intensity of each zone scales with the normalized volume of its pivot. A zone formed on exceptionally high volume appears with a dense, solid color. A zone formed on lower relative volume appears more transparent.
This visual differentiation lets you assess zone quality at a glance, without reading any numbers. The stronger the color, the more significant the volume concentration behind that level.
Zone states
Every zone is evaluated bar by bar and classified into one of three states:
Active — The zone is intact. Price has not interacted with it since formation. The horizontal line extends to the right in real time. The liquidity at this level is still available.
Tested — Price has penetrated the zone with a wick or candle body but closed without breaking through. The zone remains active but has received pressure. The box border darkens to reflect the interaction.
Taken — Price closed beyond the level. The liquidity accumulated at that zone has been absorbed by the market. The line becomes dashed, the zone fades visually, and the state label updates to Taken.
Information panel
The panel in the top-right corner — position configurable — displays three blocks of real-time data:
A zone count by state showing how many zones are currently Active, Tested, and Taken on the visible chart.
Nearest Resistance showing the closest active or tested resistance zone above the current price, with its exact price level, the percentage increase required to reach it, and the volume backing that zone.
Nearest Support showing the closest active or tested support zone below the current price, with the same three data points: exact price, percentage decrease to reach it, and zone volume.
This panel gives you an immediate read of the liquidity landscape without having to scan the chart manually.
Settings
Core Settings
Pivot Length controls how many candles are required on each side to confirm a valid pivot. Higher values produce fewer but more structurally significant zones. Range: 5 to 50. Default: 10.
Max Zones sets the maximum number of zones visible simultaneously. The oldest zones are removed automatically when the limit is exceeded. Range: 1 to 50. Default: 10.
Volume Filter sets the minimum normalized volume strength required for a pivot to generate a zone. Off displays all pivots regardless of volume. Low, Mid, and High progressively raise the quality threshold. Default: Mid.
Show Volume Label enables or disables the volume label outside each box.
Show Zone State enables or disables the state and price label inside each box.
Style
Resistance Color and Support Color define the base colors for each zone type. Default: red for resistance, green for support.
Zone Opacity % controls the overall transparency of the boxes and their visual elements. Default: 70%.
Label Size sets the size of all labels. Options: Small and Medium.
Theme Mode adapts the panel and label colors to the chart background. Options: Dark and Light.
Panel
Show Panel enables or disables the information panel.
Panel Position sets the corner where the panel appears. Options: Top Right, Top Left, Bottom Right, Bottom Left. Default: Top Right.
Panel Size sets the text size of the panel. Options: Small and Medium.
Use cases
Before evaluating any setup, use the indicator to map the active zones closest to the current price. Knowing whether price is approaching a dense liquidity area or moving through cleared territory is structural context that should precede any other analysis.
In swing trading, the zones provide natural reference levels for entries, targets, and stop placement based on where the market has previously shown meaningful volume activity.
A high-volume Active zone that has held across multiple sessions without being tested represents a level the market has not yet challenged. A Tested zone that has not been absorbed carries additional relevance as a potential reaction area.
When a zone transitions from Active to Taken, the market has consumed the liquidity at that level. Whether this signals continuation or exhaustion depends on the broader structural context, but the event itself is significant and worth noting in any analysis.
Alerts
The indicator includes two configurable alerts:
Resistance Taken — triggers when price closes above an active resistance zone.
Support Taken — triggers when price closes below an active support zone.
To configure alerts, right-click on the indicator name on the chart and select Add alert.
Open source
Edo Liquidity Zones is released as an open-source indicator. The full script is publicly available and can be studied, modified, and integrated into any workflow directly within PulseWire.
The default configuration is optimized for immediate use across multiple timeframes and asset classes.
Important
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. It should always be used within a broader trading framework that includes proper risk management.
Indicator

Initial Balance | TradeSymmetryIf you trade across multiple asset classes on lower timeframes, you know the frustration: every time you switch from US Equities to Metals or Forex, you have to manually adjust your Initial Balance (IB) timings. Furthermore, standard Multi-Timeframe (MTF) indicators often break, clutter your chart with overlapping text, or randomly delete your Higher Timeframe levels due to Pine Script memory limits.
We engineered the Initial Balance to solve these exact problems. This is a robust, institutional-grade structural tool designed to map the Initial Balance and True Open levels automatically, regardless of what chart you are looking at.
🔥 Core Features & Engineering:
🤖 Smart Asset Auto-Detection
Stop changing your settings every time you change your chart. The built-in detection engine reads your ticker symbol and automatically applies the correct New York (EST/EDT) Initial Balance window:
US Equities / Indices (ES, NQ, SPY, etc.) ➡️ 09:30 - 10:30 EST
Metals & Bonds (GC, SI, ZN, etc.) ➡️ 08:20 - 09:20 EST
Energy (CL, NG, etc.) ➡️ 09:00 - 10:00 EST
Forex & FX Futures (EURUSD, 6E, etc.) ➡️ 08:00 - 09:00 EST (NY Session)
Note: Includes a sleek info panel in the bottom right so you always know which session is active. Manual overrides are also available.
⏱️ Absolute Time Anchoring
A common flaw in Pine Script is that drawn lines will shift horizontally when you switch timeframes (e.g., from 1m to 15m). This script anchors every box, line, and label to exact absolute UNIX timestamps. Your levels stay permanently locked to the exact same pixel, irrespective of the timeframe you are viewing.
🧠 Priority Memory Manager (GC Protection)
PulseWire enforces a strict 500-line limit per script. When standard scripts hit this limit, they blindly delete your oldest lines—often ruining your long-term charts. We built a custom Garbage Collection (GC) pruner that constantly monitors line count. If the chart gets too heavy, it safely deletes only the oldest historical days, permanently protecting your current setups.
📊 Included Levels:
Initial Balance High & Low (IBH / IBL)
Intermediate Midpoint (50% / IBM)
Standard Extensions (IBH+Δ, IBL-Δ)
Double Extensions (IBH+2Δ, IBL-2Δ)
Fractional Extensions (IBM+Δ/2, IBM-Δ/2)
Indicator

Strategy

VIX Engine [DAFE]VIX Engine
A Multi-Dimensional Market Fear & Risk Analysis System
🎓 THEORETICAL FOUNDATION
The VIX Intelligence Engine (VIX-IE) is a comprehensive dashboard and analysis framework designed to deconstruct the VIX and its related products into actionable market intelligence. It operates on the principle that the VIX is not a simple number to be read, but a complex signal to be analyzed across multiple dimensions: its level, its rate of change (slope), its term structure, and its relationship to the market's actual (realized) volatility.
This engine synthesizes these dimensions into a clear, 7-regime classification model and a forward-looking transition probability, providing a sophisticated gauge of market risk, fear, and potential inflection points.
Architectural Pillars
Pillar 1: VIX Term Structure Analysis
The engine analyzes the relationship between the spot VIX (30-day implied volatility) and its futures contracts (VIX9D and VX1). This "term structure" is a powerful indicator of market stress.
Contango: Futures are priced higher than the spot VIX. Typically associated with calm, bullish, or range-bound markets.
Backwardation/Inversion: Futures are priced lower than the spot VIX. A classic sign of immediate fear and market stress, often seen during sharp sell-offs.
Pillar 2: Volatility Surprise (Implied vs. Realized)
This is a critical component for identifying mispricings in fear. The engine compares the market's expected volatility (VIX - Implied Vol) against its actual volatility (Realized Vol), calculated using the statistically robust Parkinson and Yang-Zhang estimators. The difference is the "Volatility Risk Premium" or "Surprise."
Fear Overpriced: The VIX is significantly higher than realized volatility. The market is paying a high premium for protection, often seen near panic bottoms.
Fear Underpriced: The VIX is significantly lower than realized volatility. This indicates complacency and can be a potent warning sign before a significant market decline.
Pillar 3: The 7-Regime Classification Model
The engine synthesizes all data points—VIX level (Z-Score), VIX slope, term structure state, and volatility surprise—into a single, easy-to-understand classification model with seven distinct volatility regimes:
Compression: Extremely low and falling volatility. Risk is low, but energy is building.
Low Vol: Calm market conditions, often conducive to bullish trends ("risk-on").
Normal: A neutral, balanced state of market volatility.
Elevated: Volatility is rising, indicating growing uncertainty or concern.
Expansion: A confirmed high-volatility environment, typical of active trends or sell-offs.
Panic: Extreme, upward-spiking volatility and inverted term structure. Classic market crisis conditions.
Euphoria: An anomalous state of high but falling volatility from an extreme peak, often marking a "volatility crush" after a panic event.
Pillar 4: The Transition Probability Engine
This forward-looking module quantifies the likelihood of a regime change in the near future. It analyzes the acceleration of the VIX term structure slope and realized volatility, along with mean-reversion pressure, to generate a probability score (0-100%). A high transition probability serves as an early warning to tighten stops, reduce size, or anticipate a shift in market character.
Pillar 5: Footprint Delta & Danger Scoring
Footprint Integration (Optional): When available, the engine incorporates real order flow data (delta) to enhance its analysis, particularly in detecting absorption which can add to the overall danger score.
Danger Score: The final output is a single, normalized score from 0-100 that consolidates all risk factors. It provides a simple, quantifiable measure of the total systemic risk present in the market at any given moment.
🔧 COMPREHENSIVE INPUT SYSTEM
VIX Engine
Z-Score Lookback: The normalization period for all calculations. It defines the baseline for "normal" VIX behavior. Shorter periods are more adaptive to recent market character; longer periods provide a more stable, long-term baseline.
Realized Vol Lookback: The lookback period for the Parkinson and Yang-Zhang realized volatility calculations.
Display Layers & Detection Overlays
These inputs provide granular control over the indicator's visual elements. You can toggle each individual data layer in the lower pane (e.g., VIX Z-Score, Term Structure) and each on-chart overlay (e.g., Regime Dots, Transition Warnings, Confluence Bubble).
Visualization & Dashboard
Visualization Mode: Choose from four distinct rendering styles for the lower pane, from a classic multi-line graph (Layered Analysis) to a color-coded Regime Heatmap.
Dashboard on Price Chart: A unique feature allowing you to move the entire detailed dashboard from the indicator pane onto the main price chart, perfect for keeping your eyes on price action.
🎨 ADVANCED VISUAL SYSTEM
The VIX-IE presents its data through a dual-pane system for comprehensive analysis.
Indicator Pane Visualization
This lower pane provides a deep dive into the engine's components. Depending on the Visualization Mode selected, it can display:
Key Metrics: Normalized plots of the VIX Z-Score, VIX Slope, Term Structure, Volatility Surprise, Transition Probability, and the composite Danger Score.
Regime Heatmap: A color-coded strip that visually represents the current volatility regime, with color intensity indicating the confidence of that classification.
On-Chart (Overlay) Visuals
These elements bring the intelligence directly onto your price chart for immediate context.
Regime Dots: A colored circle appears above each bar, indicating the active volatility regime. Its opacity reflects the engine's confidence in that classification.
Warning Dots: Specific markers appear below the bars to signal critical events: a purple dot for a high Transition Warning , a gold dot for Fear Overpriced , and a red dot for the dangerous Fear Underpriced condition.
The Confluence Bubble: This is the primary real-time element. A single, dynamic label that follows the most recent price, providing a continuously updated summary of the most critical intelligence. It displays the net bullish/bearish bias, the current regime, key VIX metrics, and the composite Danger Score.
📊 DASHBOARD
The dashboard provides a command-center view of the entire VIX ecosystem.
VIX Family: Displays the live values for VIX, VIX9D, and VX1, along with a data confidence score that alerts you if the data feed becomes stale.
Footprint & Instrument: Shows the status of the footprint engine and provides an automated analysis of the instrument you are trading, including its typical sensitivity to VIX changes.
Volatility Regime: Details the current regime, its duration, and the confidence score.
Term Structure: Breaks down the state of the futures curve (Contango/Backwardation), the slope percentage, and the degree of any inversion.
Vol Surprise: Compares Implied vs. Realized volatility and displays the statistical "Surprise Z-Score."
Transition Engine: Shows the calculated Transition Probability and the model's prediction for the next likely regime.
Danger Section: Displays the final composite Danger Score (0-100) and its corresponding text-based rating (Low, Moderate, High, Extreme).
🚀 PRACTICAL APPLICATION & TRADING STRATEGIES
The VIX-IE is not a direct buy/sell signal generator. It is a sophisticated risk and context overlay designed to improve decision-making.
Strategy 1: Regime as a Strategic Bias
Use the 7-Regime classification as a filter for your primary strategy.
Long-Only Context: Favor taking long setups during Low Vol and Compression regimes, where "risk-on" behavior is prevalent.
Short-Only Context: Favor taking short setups during Expansion and Panic regimes, when fear is dominant.
Caution/Range Context: Be more selective and reduce size during Normal and Elevated regimes, where the trend may be less clear.
Strategy 2: Volatility Surprise as a Contrarian Tool
The mispricing of fear is a powerful contrarian indicator.
Finding Bottoms: A "Fear Overpriced" signal during a sharp sell-off often occurs near points of panic capitulation and can signal a potential market bottom.
Anticipating Tops: A "Fear Underpriced" signal during a complacent rally is a significant warning sign. It indicates market participants are not hedged for a downturn, making the market vulnerable to sharp declines.
Strategy 3: The Danger Score as a Risk Management Overlay
Use the 0-100 Danger Score as a dynamic input for your position sizing.
Low Danger (< 30): Normal risk parameters and position sizing can be applied.
Elevated Danger (30-60): Consider reducing position size by a set amount (e.g., 25-50%).
High/Extreme Danger (> 60): Consider significantly reducing size, avoiding new positions, or focusing only on hedging strategies.
⚖️ RESPONSIBLE USAGE & LIMITATIONS
Context, Not Signals: The VIX-IE provides environmental context. A "Low Vol" regime does not guarantee price will go up; it simply indicates the statistical environment is favorable for such moves.
Data Dependency: The indicator's performance is dependent on a reliable data feed for CBOE symbols (VIX, VIX9D, VX1!). A "Stale Data" warning will appear if the connection is lost, and the engine will switch to a realized-volatility fallback mode.
Not for All Instruments: The VIX has a strong inverse correlation with US equity indices (ES/SPY, NQ/QQQ). Its correlation with other assets like crypto, commodities, or individual stocks can vary and may be less reliable.
🔮 CONCLUSION
The VIX Intelligence Engine transforms the VIX from a simple chart into a multi-dimensional dashboard for professional risk assessment. By systematically analyzing its term structure, its relationship with realized volatility, and the acceleration of its components, the VIX-IE provides a level of insight that is not attainable by looking at a single VIX value. It serves as a perpetual guide to the market's psychological state, empowering traders to make more sophisticated, context-aware decisions about when to apply risk, when to be cautious, and when to anticipate a fundamental shift in the market's character.
— Dskyz, Trade with insight. Trade with anticipation. (Don't follow the trend, be the trend) Indicator

Indicator

SmartFlow Position SizerSmartFlow Position Sizer automatically calculates your lot size based on account balance, risk percentage, and stop loss distance. Just click twice — Entry and SL — and let the math do the work. No spreadsheets. No guessing. Trade with discipline.
═══════════════════════════════════════
█ WHAT IT DOES
This indicator solves the most common mistake in trading: incorrect position sizing .
You set your account balance and risk %. Then click your Entry and Stop Loss directly on the chart. The indicator instantly calculates:
Lot size — based on your risk tolerance and SL distance
Take Profit — auto-calculated from your R:R ratio
P&L in USD — expected profit and max loss displayed
ATR volatility — current vs average ATR to gauge market conditions
Long/Short auto-detection — determined by Entry vs SL position
═══════════════════════════════════════
█ HOW TO USE
Step 1 — Add the indicator to your chart
Step 2 — Click on the chart to set your Entry Price (1st click)
Step 3 — Click again to set your Stop Loss (2nd click)
That's it. The table and SL/TP zones appear immediately.
Drag the Entry or SL line to adjust — all calculations update in real time
Change R:R ratio in settings to move the TP level
Long or Short is detected automatically — no manual selection needed
Works in future (empty) chart areas — plan trades before price arrives
═══════════════════════════════════════
█ TABLE DISPLAY
The on-chart table shows everything at a glance:
ATR — current ATR value with period
ATR Avg — average ATR for volatility comparison
Vol Ratio — current ATR / average ATR (orange when elevated)
Balance — your account balance in USD
Risk % — max loss percentage per trade
Entry — entry price with LONG/SHORT label
Lot — calculated position size
R:R — risk-to-reward ratio
TP — take profit price and expected profit in USD
SL — stop loss price and max loss in USD
═══════════════════════════════════════
█ VISUAL ZONES
White line — Entry price
Red zone — SL area (loss zone) with dollar amount on label
Green zone — TP area (profit zone) with dollar amount on label
Zones are drawn between your click positions, not fixed to the latest bar. This means you can place Entry and SL anywhere on the chart — including future empty areas — to plan trades visually before price arrives.
═══════════════════════════════════════
█ LOT CALCULATION FORMULA
Lot = (Balance × Risk%) / (SL Distance × Contract Size)
Example: $10,000 balance, 2% risk, SL distance = $20, contract size = 100
→ Lot = ($10,000 × 0.02) / ($20 × 100) = 0.10 lots
The result is rounded down to the nearest 0.01 to avoid exceeding your risk limit.
═══════════════════════════════════════
█ SETTINGS
Account Settings
Balance (USD) — Your account balance. Default: 10,000
Risk per Trade (%) — Max loss per trade. Default: 2%
Contract Size (per Lot) — MT5 contract size. XAUUSD = 100. Adjust for your broker
Take Profit
R:R Ratio — TP is calculated as SL distance × this value. Default: 1.5
ATR Volatility
ATR Period — Default: 14
ATR Average Period — For comparing current volatility vs average. Default: 50
Display
Table position (4 corners), text size, SL/TP zone toggle
═══════════════════════════════════════
█ NOTES
Works on any instrument — Gold, Forex, Crypto, Indices
Designed for MT5/MT4 lot sizing — adjust Contract Size for your broker
ATR volatility ratio turns orange when current ATR exceeds 1.5x the average — a visual warning that volatility is elevated
All calculations use USD-denominated accounts
Drawing positions use time-based coordinates, enabling placement in future chart areas
Indicator

Indicator

Indicator

Phase Entropy Oscillator [LliterH]█ OVERVIEW
The Phase Entropy Oscillator fuses five layers of applied mathematics — Phase Space dynamics, Conditional Shannon Entropy, the Hurst Exponent, Angular Velocity, and a multiplicative Conviction Score — into a single analytical framework.
It answers three questions no traditional oscillator addresses:
1. What is the market DOING? (Impulse or Exhaustion?)
2. Should I TRUST it? (Information or Noise?)
3. Will the current behavior PERSIST? (Trending or Mean-Reverting?)
Most oscillators measure magnitude: "how overbought" or "how oversold." This one measures the physics of price movement, the statistical quality of that movement, and whether the market has exploitable memory. The result is an oscillator that literally fades itself to gray when the math says "don't trust this."
█ THE MATHEMATICS
🌀 Pillar 1 — Phase Space (Classical Mechanics)
In physics, a system's state is fully described by its position and velocity. Plotting velocity against acceleration creates a "phase portrait" — a map of the system's dynamics independent of time.
Applied to price:
• Velocity = first derivative of smoothed price (rate of change)
• Acceleration = second derivative (rate of change of velocity)
• Both are z-score normalized for cross-instrument comparability
The phase portrait decomposes price action into four quadrants:
Q1 (+vel, +acc) → IMPULSE UP Rising and speeding up
Q2 (+vel, −acc) → EXHAUSTION UP Rising but decelerating
Q3 (−vel, −acc) → IMPULSE DOWN Falling and speeding up
Q4 (−vel, +acc) → EXHAUSTION DOWN Falling but decelerating
Key insight: most retail traders enter during Q2 or Q4 (exhaustion — "chasing the move"). The phase portrait exposes this by showing that acceleration has already reversed while price still moves in the original direction.
Phase Magnitude = sqrt(vel² + acc²) — the distance from the origin. Three regimes:
• ORBIT (low magnitude) → near attractor = ranging
• DRIFT (medium) → transitional
• ESCAPE (high magnitude) → leaving attractor = breakout
🔬 Pillar 2 — Conditional Shannon Entropy (Information Theory)
Standard Shannon Entropy H(X) measures total uncertainty. This indicator computes CONDITIONAL entropy H(X|Y) — uncertainty of the current return GIVEN the previous return.
Implementation: a bins × bins transition matrix T captures the Markov structure of price returns:
H(X) = −Σ p(i) · log₂(p(i)) → marginal uncertainty
H(X|Y) = −Σ p(i,j) · log₂(p(i,j) / p(j)) → conditional uncertainty
The Entropy Rate Ratio R = H(X|Y) / H(X) reveals market memory:
R → 1 : memoryless — past doesn't help
R → 0 : strong memory — past predicts future
Memory Strength = 1 − R, displayed as percentage.
This is, to our knowledge, the first PulseWire indicator to compute conditional entropy with a transition matrix.
Integration: conditional entropy modulates the COLOR of all phase elements. High entropy → gray. Low entropy → vivid colors. The indicator displays its own confidence.
📐 Pillar 3 — Multi-Scale Hurst Exponent (Fractal Analysis)
H > 0.5 → persistent (trending)
H = 0.5 → random walk (no memory)
H < 0.5 → anti-persistent (mean-reverting)
Uses multi-scale R/S analysis (Mandelbrot & Wallis, 1969):
1. Four scales: n, n/2, n/4, n/8
2. Non-overlapping segments per scale
3. R/S averaged per scale
4. Linear regression of log(R/S) vs log(scale)
5. Slope = Hurst exponent
🌀 Pillar 4 — Angular Velocity (ω)
ω = |Δθ/Δt| where θ = atan2(acc, vel). Measures how fast the system rotates between quadrants:
CHOPPY (z > 1.0) → rapid rotation = whipsaw
STABLE (z < −0.5) → sustained direction = real trend
High magnitude + STABLE = strong breakout.
High magnitude + CHOPPY = false escape.
📊 Pillar 5 — Multiplicative Conviction Score
Conviction = (Magnitude × Entropy × Hurst × Angular × Memory) ^ (1/5) × 100
Geometric mean enforces AND logic: ALL must confirm. One weak factor drags everything down.
█ FEATURES
• Phase magnitude oscillator (± mirror) colored by quadrant × entropy
• Four-quadrant classification with entropy-modulated coloring
• Three phase regimes: ESCAPE / DRIFT / ORBIT
• Conditional entropy with transition matrix + Memory Strength
• Multi-scale Hurst via R/S regression (4 scales)
• Angular velocity with CHOPPY/STABLE classification
• Multiplicative Conviction Score (0–100)
• Per-quadrant colored trajectory trail
• Triple-confirmed escape markers (entropy + Hurst + angular)
• Detail Mode toggle for velocity/acceleration lines
• Clean 6-row dashboard with all metrics
• Candle coloring by phase quadrant × entropy
█ HOW TO READ IT
Default view shows two elements:
1. THE MAGNITUDE (thick colored ± lines)
How far the system is from equilibrium. Inside gray zone = ranging. Beyond dashed lines = breakout. The COLOR tells you the quadrant (green/red = impulse, orange/blue = exhaustion). GRAY means entropy is high — don't trust it.
2. THE TRAIL (colored segments behind magnitude)
Each segment colored by its bar's quadrant. Tight segments near zero = range. Expanding outward = trend. Color changes along trail = quadrant transitions.
For advanced analysis, enable "Detail Mode" to see velocity and acceleration z-score lines.
█ YOUR STATISTICAL EDGE — HOW TO USE IT
This indicator does not generate buy/sell signals. It gives you something more valuable: it tells you WHEN your signals have statistical backing, and WHEN they don't.
Here is the decision framework:
─── BEFORE ENTERING A TRADE ───
Ask: "Does the environment favor my signal?"
✅ ENTER when:
• Conviction > 50
• Quadrant is Q1 (long) or Q3 (short) — the move is ACCELERATING
• H(X|Y) shows ORDER or MIXED (not NOISE)
• Memory > 20% — the market has exploitable structure
• Hurst shows PERSIST — trend continuation is statistically favored
• ω shows STABLE — trajectory is sustained, not whipping around
⛔ SKIP when:
• Conviction < 20 — all five layers say "no edge"
• H(X|Y) shows NOISE — you are trading a coin flip
• Quadrant is Q2 or Q4 — you are chasing an exhaustion move
• Hurst shows REVERT — breakouts will likely fail
• ω shows CHOPPY — high whipsaw probability
─── WHILE IN A TRADE ───
🔄 Watch for quadrant transitions:
• Q1 → Q2 (impulse → exhaustion up): tighten stop or take partial
• Q3 → Q4 (impulse → exhaustion down): tighten stop or take partial
• Magnitude dropping back into ORBIT zone: the move is over
⚠️ Watch Memory dropping below 10%:
The market is losing its predictable structure. Reduce exposure.
─── PRACTICAL EXAMPLES ───
SCENARIO A — London Session Open, GBP/USD M15:
Your price action setup gives a long signal.
Dashboard: Conviction 72, Q1 Impulse, ESCAPE 2.4σ, ORDER, Memory 38%, PERSIST, STABLE.
→ ALL five layers confirm. Execute with full position size.
SCENARIO B — Same setup, different day:
Dashboard: Conviction 11, Q4 Exhaust, ORBIT 0.3σ, NOISE, Memory 8%, RANDOM, CHOPPY.
→ The market is a coin flip with no memory. Skip.
SCENARIO C — You're already long, price is rising:
Dashboard shifts from Q1 to Q2. Magnitude starts dropping toward orbit zone.
→ The acceleration has reversed. Price still rising but losing energy. Take partial profits.
The edge is not in the indicator predicting direction. The edge is in NOT TRADING when the statistical environment is unfavorable. Most traders lose money during NOISE + CHOPPY + RANDOM regimes. This tool keeps you out of those conditions.
█ UX DESIGN PRINCIPLES
This indicator follows three design principles:
1. Progressive Disclosure (Edward Tufte, "The Visual Display of Quantitative Information", 1983)
Default view is minimal: magnitude + trail + dashboard. Detail Mode reveals velocity/acceleration lines. The user sees only what they need, when they need it.
2. Data-Ink Ratio (Tufte, 1983)
Every visual element carries information. Entropy and Hurst are in the dashboard, not plotted — their scale would be crushed against magnitude's range, creating noise without insight.
3. Confidence-Modulated Display
The indicator fades its own colors to gray when entropy says the data is unreliable. This is "honest visualization" — the tool communicates its own limitations in real time, preventing overconfidence.
█ PARAMETERS
Phase Space:
• Source (default: close)
• Derivative Smoothing (default: 5)
• Normalization Window (default: 50)
Shannon Entropy:
• Entropy Window (default: 20) — must be ≥ bins²
• Distribution Bins (default: 4) — matrix = bins² cells
• Noise Threshold (default: 0.85)
• Trend Threshold (default: 0.50)
Hurst Exponent:
• Hurst Window (default: 80) — 4 sub-scales internally
Phase Thresholds:
• Escape (default: 2.0σ)
• Orbit (default: 0.5σ)
• Min Confidence for Markers (default: 0.3)
Trail:
• Show Trail (default: on)
• Trail Length (default: 25 bars)
Visualization:
• Detail Mode (default: off) — shows vel/acc lines
• Color Candles (default: on)
█ RECOMMENDED USAGE
• Liquid instruments: Forex majors, indices, Gold, large-cap crypto
• Timeframes: M15–H4 intraday, D1 swing
• Not a standalone system — it qualifies your signals
█ PERFORMANCE NOTES
Optimizations applied:
• var array reuse (zero allocation per bar)
• Merged R/S passes (2 instead of 3)
• Pre-computed constants (LOG2, PI, DEG_CONV)
• Unrolled Hurst scales (no array overhead)
• Trail only on last bar
Reduce Hurst Window from 80 to 60 if performance warnings appear.
█ ACKNOWLEDGEMENTS
• Phase Space: classical mechanics and dynamical systems theory
• Shannon Entropy: Claude E. Shannon (1948)
• Conditional Entropy: information-theoretic Markov chain analysis
• Hurst Exponent: Benoit Mandelbrot & James Wallis (1969)
• UX Design: Edward Tufte, "The Visual Display of Quantitative Information" (1983)
• The integration of conditional entropy with phase space — making an indicator modulate its own display based on statistical confidence — is original to this publication
█ WHAT THIS INDICATOR IS NOT
• NOT a buy/sell signal generator
• NOT a predictor of future direction
• NOT a replacement for your system — it qualifies it
• NOT for non-standard charts (Heikin Ashi, Renko)
• All readings are inherently lagging
• Conviction Score is a confluence filter, not a backtested edge
█ DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Past performance is not indicative of future results. Trading involves substantial risk of loss and is not suitable for every investor. Always conduct your own research and consult a qualified financial professional before making any trading decisions. The author is not responsible for any losses incurred from the use of this tool. Indicator

Naive Bayes DNA Heatmap | GainzAlgoThe Naive Bayes Volume Heatmap is a predictive analytical suite that moves beyond traditional lagging indicators. While a standard RSI or MACD simply tells you where price has been, this system uses Gaussian Machine Learning to determine the statistical probability of where price is going.
By analyzing the Volume of a candle, the internal distribution of volume, delta, and price force, the indicator visualizes market sentiment as a multi-layered heatmap. It allows traders to see whether the current price action is backed by institutional flow or is simply noise.
Core Logic: The Naive Bayes Engine
The brain of the system is a Gaussian Naive Bayes (GNB) classifier. This is a machine learning algorithm that calculates the probability of an event based on prior conditions.
How it Learns
The model continuously "trains" itself on a lookback window (default 500 bars). It analyzes two primary features:
Intensity (Feature 1): Relative Volume (1m mode) or Net Delta (Footprint mode).
Directional Force (Feature 2): The relationship between price spread and volume (1m mode) or POC Distance (Footprint mode).
Here is the self contained function that does the heavy lifting of the probability analysis:
f_naive_bayes(float feat1, float feat2, float target, int len) =>
m1_f1 = ta.sma(target > 0 ? feat1 : na, len), m1_f2 = ta.sma(target > 0 ? feat2 : na, len)
m0_f1 = ta.sma(target <= 0 ? feat1 : na, len), m0_f2 = ta.sma(target <= 0 ? feat2 : na, len)
v1_f1 = math.pow(ta.stdev(target > 0 ? feat1 : na, len), 2), v1_f2 = math.pow(ta.stdev(target > 0 ? feat2 : na, len), 2)
v0_f1 = math.pow(ta.stdev(target <= 0 ? feat1 : na, len), 2), v0_f2 = math.pow(ta.stdev(target <= 0 ? feat2 : na, len), 2)
p1 = nz(ta.sma(target > 0 ? 1.0 : 0.0, len), 0.5)
l1 = f_pdf(feat1, nz(m1_f1), nz(v1_f1)) * f_pdf(feat2, nz(m1_f2), nz(v1_f2)) * p1
l0 = f_pdf(feat1, nz(m0_f1), nz(v0_f1)) * f_pdf(feat2, nz(m0_f2), nz(v0_f2)) * (1.0 - p1)
prob = nz(l1 / (l1 + l0 + 0.000001), 0.5)
This function is the engine of the indicator. It implements a Gaussian Naive Bayes Classifier directly in Pine Script to calculate the real-time probability of a bullish move.
Here is a breakdown of how this code processes market data:
Class Separation (The "M" and "V" Variables)
The function splits historical data into two buckets based on the target (Price Action):
Bucket 1 (Bullish): Data from bars that closed green.
Bucket 0 (Bearish): Data from bars that closed red.
It then calculates the Mean (m) and Variance (v) for each feature within those buckets. This creates two distinct "profiles"—essentially a mathematical fingerprint of what a Bullish bar looks like versus a Bearish one.
Bayesian Inference (The Result)
Finally, it applies Bayes' Theorem to combine these likelihoods with the Prior Probability (p1)—which is simply the historical win rate of green bars over the lookback period.
The final prob is a normalized value between 0 and 1. If the result is 0.85, the model is signaling an 85% statistical probability that the current market conditions align with historical bullish reversals.
The Math
As discussed above, the engine uses the Probability Density Function (PDF) to map these features onto a bell curve. It asks: "In the past, when we saw this specific volume intensity and this specific price force, how often did the next bar close green versus red?"
The result is a Win Probability %. If the probability is >50%, the bias is Bullish; <50% is Bearish.
The Heatmap
The Heatmap is a vertical stack of 20 independent probability layers.
Multi-Horizon Smoothing: Each layer represents a different generation of the Naive Bayes calculation, ranging from ultra-fast (5-bar smoothing) to long-term (100-bar smoothing).
Specialized Features
The Power Index (The White Line)
The Power Index is your Confluence Meter . It scans all 20 layers of the data and counts how many are currently signaling a trend above a 60% threshold.
A spiking Power Index indicates that the trend is synchronizing across all time horizons, a high-probability entry signal.
Footprint Mode vs. 1-Minute Mode
1-Minute Precision: When active, the script uses request.security_lower_tf to deconstruct the current chart bar into 1-minute slices. It finds the "hidden" intent inside the candle that standard indicators miss.
Footprint Analysis: This mode hooks into raw Exchange Order Flow. It calculates Aggressive Buying vs. Aggressive Selling to feed the Naive Bayes engine the most "raw" data possible.
The sidebars: Unique to Footprint mode, these wide neon bars appear to the right of the heatmap.
Real-Time Volume Scaling: The bars grow and shrink based on the current bar's Buy/Sell volume ratio.
Divergence Spotting: If the Heatmap is bright Aqua (Bullish) but the Pink Sell Box is 80% full, you are witnessing Absorption, big players are absorbing the selling, often leading to a massive squeeze.
How to Use the Suite
The Elite Entry
Identify the Bias: Check the NB Probability in the table. You want to see >65% for a high-probability trade.
Confirm the Match: Ensure the heatmap layers are expanding (moving from the dark center toward the bright edges).
Check the Power Index: Wait for the white line to curve upward, confirming momentum is stacking.
The Signal: When the "NB SIGNAL" cell in the table flips to ELITE LONG or ELITE SHORT, the statistical edge is at its peak.
The Elite Exit
Exit when the inner layers of the heatmap turn back to Midnight Charcoal or the opposite color. This indicates that the immediate heartbeat of the trend has faded, even if the longer-term layers are still colored. Indicator

OTC Buy Signal: Name Change & SplitsOTC Buy Signal: Name Change & Splits
This script is a simple event-driven tool designed for traders who monitor OTC equities for corporate actions that may affect price behavior, sentiment, or speculative interest.
The main focus of the script is split activity, with specific logic for forward splits and reverse splits. It is intended to help visually identify situations where a stock may become relevant again after a qualifying event, while also filtering out symbols that have recently undergone reverse splits.
In many OTC names, corporate actions can matter just as much as technical structure.
This script tracks stock split data and applies a basic event filter:
• Forward splits can be treated as buy signals
• Reverse splits are treated as caution events
• A user-defined exclusion period blocks signals after a reverse split
The purpose is to reduce noise and avoid immediately qualifying symbols that may still be in a weaker post-reverse-split phase.
How It Works
The script requests split data directly from PulseWire’s corporate actions feed and evaluates the split ratio:
• Ratio greater than 1.0 = forward split
• Ratio less than 1.0 = reverse split
When a reverse split is detected, the script stores the event time and begins an exclusion window based on the number of days selected in settings.
If forward split signals are enabled, a buy signal will only print when the symbol is outside that exclusion period.
Signal Logic
Buy Signal
• Triggered by a forward split event
• Only valid if the chart is outside the reverse split exclusion window
Reverse Split Warning
• Printed when a reverse split occurs
• Used as a visual warning and as the starting point for the exclusion timer
Exclusion Zone
• The chart background is shaded during the exclusion period after a reverse split
• This makes it easier to visually confirm when signals are being suppressed
Visual
• Buy markers below price for qualifying events
• Reverse split markers above price
• Background highlight during the exclusion window
• Alert conditions for both buy signals and reverse split warnings
Important Limitation
This script can detect split events through PulseWire’s corporate action data, but it does not automatically detect historical name changes unless those changes are reflected through ticker or corporate action behavior.
Because of that, the script is best understood as a split-based OTC event tracker rather than a full name-change detection system.
Use Cases
This tool may be useful for:
• OTC traders screening for event-driven setups
• Monitoring forward split activity
• Avoiding recent reverse split names
• Building a broader OTC watchlist process
Notes
This is a specialized filter, not a full trading system.
It is best used alongside:
• Manual OTC research
• Corporate action review
• Chart structure and liquidity analysis
• Risk management
As always, event-based setups should be validated with additional context before acting on them. Indicator

Indicator

Caldera Deviation Cloud [JOAT]Caldera Deviation Cloud
Introduction
The Caldera Deviation Cloud is an open-source statistical deviation band system that fuses anchored VWAP with Z-score adaptive band widths, Keltner ATR blending, and higher-timeframe volatility expansion into a unified probability envelope overlay. Instead of using a single method to calculate band width, CDC triple-blends VWAP standard deviation, statistical standard deviation, and ATR-based Keltner width — whichever produces the widest reading dominates, ensuring the bands never underestimate true market dispersion. The result is a layered cloud with inner (1-sigma, ~68% probability) and outer (2-sigma, ~95% probability) envelopes that adapt to both local and macro volatility conditions.
What makes this indicator distinct from standard Bollinger Bands or VWAP bands is the fusion approach: it does not rely on a single deviation method. It also reverse-engineers historical Z-score reversal points into dynamic "fossil" support and resistance levels — price zones where statistical extremes have historically triggered reversals.
Core Engine: Adaptive Deviation Fusion
The band width calculation blends three independent deviation measurements:
float baseAdapt = na(vwapStdev) or vwapStdev <= 0 ? statDev : math.max(vwapStdev, statDev * 0.5)
float keltBlend = useKelt ? math.max(baseAdapt, keltW * 0.6) : baseAdapt
float adaptDev = keltBlend * macroMult
VWAP Standard Deviation: Derived from the anchored VWAP calculation (session, weekly, monthly, or quarterly reset). This captures volume-weighted price dispersion around the institutional fair value line.
Statistical Standard Deviation: Classic standard deviation of closing prices over a configurable lookback (default 100 bars). This provides a pure statistical measure of price dispersion.
Keltner Thermal Envelope: ATR-based width (EMA of close with ATR multiplier) that captures range-based volatility. When enabled, this prevents the bands from being too narrow during periods where price moves are large but close-to-close deviation is small.
The wider of these three measurements is used as the base deviation, then multiplied by a macro volatility factor derived from the higher timeframe.
Probability Lattice (Z-Score Engine)
The Z-score engine computes how many standard deviations price is from its statistical mean, then smooths the result with VWMA for visual clarity:
Z-Score: (close - SMA) / StdDev, smoothed with VWMA
Mean Reversion Velocity: The rate of change of the Z-score, classified as EXPANDING (moving away from mean), CONTRACTING (returning toward mean), or STALLED
Dynamic State: SHELL BREACH OB/OS (beyond historical reversal averages), ELEVATED/DEPRESSED (beyond 1 sigma), or EQUILIBRIUM (near mean)
Reversal Archaeology (Fossil Levels)
This is one of CDC's most distinctive features. The indicator detects Z-score pivot highs and pivot lows, filters them by a minimum threshold (default 1.5 sigma), and accumulates them into rolling arrays. The average of these historical reversal Z-scores is then reverse-engineered back into price levels:
Fossil Resistance = VWMA(Mean + AvgTopReversalZ * StdDev)
Fossil Support = VWMA(Mean + AvgBotReversalZ * StdDev)
These "fossil levels" represent the price zones where, on average, the market has historically found statistical extremes significant enough to trigger reversals. They shift dynamically as new reversal data accumulates and old data rolls off.
Macro Volatility Lens (HTF Expansion)
When enabled, the indicator fetches standard deviation data from a higher timeframe (default 60-minute) and compares it to its own EMA. When macro volatility exceeds its average, the bands widen proportionally:
macroMult = 1 + htfFactor * max(0, (htfStdev - htfAvgDev) / htfAvgDev)
This prevents the bands from being too tight during periods of elevated macro uncertainty, even if the local timeframe appears calm. The security calls use lookahead=off to prevent repainting.
Visual Elements
Equilibrium Spine: The VWMA-smoothed center line (VWAP or statistical mean), plotted as a prominent purple line representing fair value.
Core Envelope (Inner Bands): 1-sigma bands representing the ~68% probability zone. Color shifts dynamically based on price position within the cloud using color.from_gradient.
Shell Envelope (Outer Bands): 2-sigma bands representing the ~95% probability zone. Price beyond these levels is statistically extreme.
Nebula Gradient: A 10-layer gradient fill system creates a smooth visual transition from the spine outward through the core and shell envelopes. Upper layers use distribution (bearish) tones, lower layers use accumulation (bullish) tones.
Fossil Levels: Cross-style plots marking the reverse-engineered support and resistance from Z-score reversal history.
Signal Architecture
CDC generates four signal types, all confirmed-bar only:
SHELL BREACH: Price exceeds the outer (2-sigma) envelope — a statistically extreme event. Upper breach suggests distribution extreme, lower breach suggests accumulation extreme. Tooltip includes the sigma multiplier and current Z-score.
CORE DRIFT: Price enters the zone between the inner and outer envelopes — elevated deviation but not yet extreme. This serves as an early warning before a potential shell breach.
Command Panel (Dashboard)
A 10-row monospace dashboard displays:
LATTICE: Current smoothed Z-score value
STATE: Statistical classification (Shell Breach OB/OS, Elevated, Depressed, Equilibrium)
REV VEL: Mean reversion velocity direction (Expanding, Contracting, Stalled)
SPINE: Current center line (VWAP/mean) price
APERTURE: Current adaptive deviation width
MACRO: HTF volatility multiplier (1.0x = normal, >1.1x = elevated macro vol)
POSITION: Price location within the cloud (Upper Shell, Upper Core, Neutral, Lower Core, Lower Shell)
FOSSIL R / FOSSIL S: Average Z-score at which historical reversals have occurred (resistance and support)
Input Parameters
Probability Lattice:
Lattice Depth: Z-score lookback window (default 100)
Lattice Damper: VWMA smoothing on raw Z-score (default 14)
Sigma Core: Inner band multiplier, ~68% probability (default 1.0)
Sigma Shell: Outer band multiplier, ~95% probability (default 2.0)
Anchor Nexus:
Volume Epoch: VWAP reset period — Session, Weekly, Monthly, or Quarterly
Keltner Fusion:
Enable Thermal Envelope: Toggle ATR-based width blending (default on)
Thermal EMA / ATR Scale: Keltner channel parameters
Macro Volatility Lens:
Enable Horizon Expansion: Toggle HTF volatility widening (default on)
Horizon Timeframe / Blend Factor: HTF parameters
Reversal Archaeology:
Fossil Depth: Rolling array size for reversal history (default 25)
Fossil Threshold: Minimum Z-score magnitude for valid reversal (default 1.5)
How to Use This Indicator
Use the cloud as a probability envelope — price spending time near the outer shell is statistically unusual and often precedes mean reversion.
Watch SHELL BREACH signals at the outer bands for potential reversal setups, especially when the Reversion Velocity shows CONTRACTING (Z-score returning toward mean).
Fossil levels provide dynamic support/resistance derived from statistical history — they shift as new reversal data accumulates, making them adaptive rather than static.
The MACRO multiplier in the dashboard warns when higher-timeframe volatility is elevated — wider bands during these periods reflect genuine uncertainty, not just noise.
CORE DRIFT signals serve as early warnings — price entering the core-to-shell zone may continue to the shell or reverse. Use them as alerts to pay attention, not as standalone trade signals.
The Equilibrium Spine (center line) acts as a dynamic fair value reference — extended moves away from it tend to revert over time.
Limitations
Statistical bands assume roughly normal price distributions, which markets frequently violate. Fat tails and gap events can exceed even the outer shell without warning.
Z-score mean reversion is a tendency, not a guarantee — price can remain at statistical extremes for extended periods, especially during strong trends.
Fossil levels are based on historical reversal averages and may not predict future reversal points accurately. They provide context, not certainty.
The VWAP anchor resets at each period boundary (session, week, etc.), which can cause discontinuities in the center line and bands.
Higher-timeframe volatility expansion depends on the selected HTF — different choices produce different macro multipliers.
The indicator does not generate directional buy/sell signals — it provides statistical context for your own decision-making.
Originality Statement
This indicator is original in its triple-blend adaptive deviation approach. While VWAP bands, Bollinger Bands, and Keltner Channels are established concepts individually, CDC is justified because:
The triple-blend deviation fusion (VWAP stdev + statistical stdev + Keltner ATR) ensures bands never underestimate dispersion regardless of which volatility measure is dominant.
Reversal Archaeology reverse-engineers Z-score pivot history into dynamic price levels — a technique not found in standard deviation band indicators.
The Macro Volatility Lens integrates higher-timeframe volatility directly into band width calculation, providing macro-aware probability envelopes.
The 10-layer nebula gradient fill creates a visual probability density that communicates statistical significance through color intensity.
Mean Reversion Velocity tracking provides directional context for Z-score movement, helping distinguish between expanding extremes and contracting reversals.
The comprehensive dashboard presents statistical state, reversion dynamics, and fossil levels simultaneously.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Statistical deviation bands describe historical price distribution patterns but do not predict future price movement. Extreme Z-scores do not guarantee reversals. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this tool.
-Made with passion by officialjackofalltrades
Indicator

Deep Machine Learning - Artificial Neural Network -⭐ Full-Scale Deep Learning AI on PulseWire ⭐
🌟 Introduction: A Paradigm Shift in Technical Analysis
We are currently living in an unprecedented era of Artificial Intelligence. Large Language Models (LLMs) like Google's Gemini and OpenAI's GPT have fundamentally revolutionized how we process data, generate code, and understand complex non-linear relationships. Inspired by the tremendous analytical power of these modern AI models, this script bridges the gap between advanced data science and retail trading.
🟢 In Simple Terms (For Beginners)
Not a data scientist? Don't worry! Here is what this script does in plain English:
Imagine having a tireless assistant who has studied decades of chart patterns. Instead of you staring at 5 different indicators (like RSI, MACD, and Bollinger Bands) and trying to guess the trend, this AI looks at all of them simultaneously. It learns from its past mistakes, figures out what is actually working right now, and gives you a single, easy-to-read "Bullish" or "Bearish" line. You don't need a PhD in math to use it!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏫 Educational Deep Dive: Unveiling the "Black Box"
Before diving into the indicator settings, it is essential to understand how a Neural Network (NN) operates. Traditional indicators look at past math to plot a line; Neural Networks learn from past mistakes to forecast a probability.
🧠 The "Sports Team" Analogy (How it works simply)
Think of the Neural Network like a professional sports organization:
The Scouts (Input Layer): They gather raw data from the field (Momentum, Trend, Volume).
The Coaches (Hidden Layers): They sit in the locker room, debate the data, and figure out complex game strategies.
The Manager (Output Layer): Makes the final, definitive decision to "Buy" or "Sell" based on the coaches' advice.
Learning from Mistakes (Backpropagation): When the team loses a game (makes a bad prediction), they review the tape and adjust their strategy for the next game. This AI does exactly this on every single new candle!
🏗️ The Network Architecture (For Advanced Users)
A neural network is inspired by the biological human brain, organized into specific layers. Here is a simplified map of what is happening mathematically inside this script on every single bar:
→weighted sum & activation→
→weighted sum & activation→
💡 DEEP DIVE: Activation Functions (Mapping Non-Linearity)
If a Neural Network only used basic multiplication and addition, it would mathematically collapse into a single, rigid linear regression formula, completely failing to map the chaotic realities of financial markets.
Activation Functions introduce non-linearity, allowing the model to warp its decision boundaries and solve complex, multi-dimensional problems.
📈 ReLU (Rectified Linear Unit): max(0, x) -> Mitigates the "vanishing gradient" problem. It aggressively turns off negative noise, creating sparse, highly efficient activations.
🌊 Tanh (Hyperbolic Tangent): Squashes values into an S-curve between -1 and 1. Being zero-centered, it generally yields faster convergence during gradient descent than Sigmoid.
📉 Sigmoid: Squashes values between 0 and 1. Used for probability estimation, though susceptible to gradient saturation on extreme inputs.
🧠 DEEP DIVE: Optimizers (Navigating the Loss Landscape)
When the AI makes a mistake, Backpropagation uses the Chain Rule of calculus to compute the "Gradient"—the vector pointing toward the steepest increase in error. The Optimizer dictates how to move in the opposite direction to minimize this error.
SGD (Stochastic Gradient Descent): Takes uniform steps down the gradient. Prone to getting stuck in local minima and ravines.
Momentum: Accumulates a moving average of past gradients to accelerate through flat regions and dampen oscillations.
RMSprop: Adapts the learning rate individually by dividing the gradient by a running average of its recent magnitude.
Adam (Adaptive Moment Estimation): The absolute state-of-the-art. It calculates both the 1st moment (mean, like Momentum) and 2nd moment (uncentered variance, like RMSprop) of the gradients. Crucially, it employs Bias Correction to prevent the moments from skewing towards zero early in training, allowing it to navigate the non-convex loss landscapes of financial markets with unmatched precision.
🛡️ DEEP DIVE: Regularization & MC Dropout (Bayesian Approximation)
Overfitting is the fatal flaw of poorly built AI—memorizing the past instead of learning the underlying structure.
L1 Regularization (Lasso): Acts as an algorithmic feature selector. It aggressively pushes the weights of useless, noisy indicators to exactly zero (Sparsity).
L2 Regularization (Ridge): Applies "Weight Decay" by penalizing large weights quadratically. It forces the network to distribute its reliance across all inputs rather than trusting a single dominant feature.
Monte Carlo (MC) Dropout: By randomly turning off nodes during live inference, we aren't just creating noise. Mathematically, this approximates a Gaussian Process, transforming the model into a Bayesian Neural Network. Instead of absolute point estimates, it provides a probabilistic distribution, allowing us to quantify the model's true epistemic uncertainty.
🌀 DEEP DIVE: Kalman Filter Dynamics (Signal vs. Noise)
Financial data is notoriously non-stationary. The script utilizes a 1D Kalman Filter—an algorithm originally designed for aerospace telemetry. It operates on a predict-update cycle. It mathematically balances Process Noise (Q) (the true underlying shift in market trend) and Measurement Noise (R) (the erratic, short-term price fluctuations). By continuously minimizing the error covariance, it extracts the pure signal from the raw Neural Network output without introducing the severe lag inherent in standard moving averages.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Groundbreaking Features
This indicator is packed with state-of-the-art machine learning techniques previously unseen in native Pine Script:
🎛️ Fully Customizable Architecture: You are the data scientist. Customize hidden layers, nodes per layer, Activation Functions, L1/L2 Regularization penalties, and select from advanced Optimizers to tailor the brain specifically for Crypto, Forex, or Stocks.
🔄 True Online Learning: A model trained on 2021 data will fail in 2024. This network solves that by sampling random historical bars and training itself using Gradient Descent on every single new bar. If the market regime shifts from a bull run to a chop zone, the model re-weights itself dynamically today.
⚖️ Layer Normalization: Financial data is wildly unstable. Layer Norm stabilizes the learning process by standardizing the inputs across the hidden layers, dramatically speeding up convergence and preventing the network from "exploding" mathematically.
🌊 Kalman Filter Smoothing: The raw neural network output is incredibly fast but can be noisy. The output is passed through a mathematically rigorous 1D Kalman Filter, which minimizes error covariance and produces a buttery-smooth, highly actionable Oracle line.
🖥️ Intelligent Dashboard UI: A sleek, dark-themed dashboard displays raw inputs, hidden layer activations (color-coded by activation strength), the final Oracle prediction, and the Uncertainty margin, directly on your chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ Comprehensive Configuration Guide
1️⃣ Engine Configuration (Tuning the Brain)
Optimizer: Leave this on Adam for the best general performance.
Learning Rate (LR): The "step size." If the line is too chaotic, lower the LR. If it adapts too slowly, raise it.
Hidden Layers & Nodes: More is not always better. Giving the network 5 layers and 15 nodes on a 1-minute timeframe will cause it to memorize noise. Start small (e.g., 2 layers, 8 nodes).
2️⃣ Target Configuration (What is the AI predicting?)
Candle: Predicts if the current candle is green or red. (Very noisy, best for scalping).
HTF Candle: Predicts the direction of a predefined Higher Timeframe candle.
Pivot State (Recommended): The AI learns the broader macro market structure by identifying historical Higher Highs (HH) and Lower Lows (LL). This filters out the noise and forces the AI to learn true trend waves.
3️⃣ Signals & Chart Overlays (Actionable Intelligence)
The script goes beyond just an oscillator by providing direct visual cues on your main price chart.
Threshold Crossing Alerts: You define an Alert Threshold (e.g., 0.5 or 1.0 Sigma). When the Oracle line crosses this threshold with conviction, the script triggers a Buy (▲) or Sell (▼) label and can fire native PulseWire alerts.
Smart Label Opacity (MA Alignment): To filter out weak or counter-trend signals, the script utilizes a dual-confirmation system with the Signal MA (nn_ma).
Bright Labels: If a signal triggers and aligns with the Signal MA (e.g., a Buy signal fires while the Oracle is also above its Moving Average), the label is plotted brightly, indicating high momentum and strong trend agreement.
Faint Labels: If a signal triggers but contradicts the Signal MA, the label is plotted faintly (transparently). This acts as a visual warning that the move lacks full momentum backing and might be a riskier, counter-trend setup.
4️⃣ Decoding the AI Dashboard (Visualizing the Brain)
The on-chart Intelligent Dashboard is not just for aesthetics; it literally visualizes the internal thought process of the neural network in real-time.
VECTOR & INPUT (The Senses): This column lists your chosen feature indicators and their current Z-Score normalized values. You can see exactly how strongly the market is pushing each individual metric.
L1, L2... (The Hidden Layers): These columns represent the actual artificial neurons in each hidden layer. The numbers displayed are the post-activation values.
Notice the Colors: The cells are color-coded dynamically based on activation strength. Bright blue/red cells mean those specific neurons are firing strongly, recognizing a pattern. Dark/transparent cells mean those neurons are currently inactive or squashed by the activation function. You are literally watching the AI "think."
ORACLE (The Final Output):
The Score: The aggregated final prediction value (typically clamped between -3.0 and +3.0).
The Phase: A clear text label indicating the current market regime (e.g., "STRONG BUY", "BULLISH", "BEARISH", "STRONG SELL").
Uncertainty (± Margin): The exact numerical value of the Confidence Interval calculated via MC Dropout. A low margin (e.g., ±0.15) means the AI is laser-focused and highly confident. A high margin (e.g., ±0.80) means the AI is mathematically uncertain due to conflicting data.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Advanced Pro-Tips for Real Trading
Reading the Oracle Line:
Values > 0 indicate a Bullish bias (Blue gradient).
Values < 0 indicate a Bearish bias (Red gradient).
Watch the color intensity: A solid, bright line means the AI has strong statistical conviction. Faded, transparent lines mean standard deviation is high and the signal is weak.
Using the CI Box (The Squeeze & Expand Tactic): Look at the transparent box projected into the future.
The Expand (Avoid): When the box is incredibly wide, the AI is telling you the market is chaotic and unpredictable. Protect your capital and stay out.
The Squeeze (Action): When the box gets extremely tight, the AI has high certainty. Look for entries in the direction of the Oracle line.
Wait for the Cross & Check the Smart Labels: Do not execute a trade the millisecond the line turns blue. Trade when it crosses the Alert Threshold. More importantly, look at the brightness of the chart label. Prioritize bright labels where the AI's conviction aligns perfectly with the underlying Signal MA, and be extremely cautious with faint labels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer
This script is a complex statistical machine learning model designed for educational and deep analytical purposes. Neural Networks are highly dependent on user-defined hyperparameter settings and the specific features fed into them. A poorly tuned model will produce garbage output. Past performance and back-tested training do not guarantee future live market results. Do not use this tool as the sole basis for real-money trading decisions. Always employ strict risk management, position sizing, and use this in confluence with your own price action analysis.
If you appreciate the hundreds of hours of coding and advanced mathematics that went into making this first-of-its-kind Native Pine Script Neural Network a reality, please drop a Boost 🚀, add it to your favorites, and leave a comment below! Let's push the boundaries of what is possible on PulseWire. Indicator

Strategy

FC Market Internals CompositeThe FC Market Internals Composite is a professional-grade sentiment and breadth engine designed for intraday traders who require a macro view of market health. Unlike single-metric indicators, this script aggregates six critical breadth and sentiment data points into a unified, normalized oscillator, providing a "high-altitude" perspective on whether price action is supported by broad market participation.
Core Data Integration
The indicator utilizes request.security to pull real-time data from several key indices and internal metrics, ensuring the composite value reflects the broader market rather than just a single ticker:
TICK: Measures the net immediate buying vs. selling pressure.
ADD: Tracks the Advance-Decline Line to gauge overall market participation.
VOLD: Analyzes Up/Down volume to identify institutional conviction.
TRIN: Evaluates the relationship between advancing/declining issues and volume.
VIX: Incorporates the volatility index to adjust for market fear and risk-off sentiment.
ABVD: Monitors the percentage of stocks trading above their VWAP for trend quality.
Key Features and Functionality
Customizable Weighting Engine: Users can define the influence of each internal metric. For instance, the default configuration prioritizes the TICK (30%) and ADD (20%), but these can be adjusted to favor volume-weighted data or volatility depending on your specific strategy.
Percentile Normalization: All inputs are processed through a lookback-based normalization function. This converts raw, disparate data—like VIX points and TICK values—into a standardized scale of -100 to +100, making them comparable and visually intuitive.
Regime Detection: The script identifies market states—Bull, Bear, Neutral, or Extreme—based on specific threshold crossings (e.g., +/- 30 and +/- 60).
RTH Filtering: Logic is built-in to handle Regular Trading Hours (09:30 - 16:00 EST), ensuring data points are relevant to the primary session liquidity.
Advanced Visual UI: Includes a dynamic table for regime monitoring, divergence labels, and customizable color-coded zones for oversold and overbought extremes.
Technical Specifications
Language: Pine Script v6
Overlay: False (Lower Pane)
Smoothing: User-adjustable EMA smoothing for the composite line to filter out intraday noise.
License: Mozilla Public License 2.0
This tool is optimized for traders who use Market Internals to confirm breakouts, identify exhaustion tops or bottoms, and avoid fake-out moves where price drifts higher on negative breadth. Indicator

Indicator

Indicator

Indicator
