EPS TablesThis is a finincial data analysis of the stock, that shows 6 quater result. Both sales and EPS can show the strength of the stock.
Statistics
LEVENT: Lifetime Estimation via Efficiency-Regime EventLEVENT — Lifetime Estimation via Efficiency-Regime Event Transitions
LEVENT is a research-grade indicator that estimates the remaining structural lifetime of the current market regime.
Unlike trend, volatility, or momentum tools, LEVENT does not measure price movement — it measures how long the current market structure is likely to survive before breaking.
This script implements the LEVENT model published on Zenodo (Bülent Duman, 2026) and is built on top of the open-source DERYA (Dynamic Efficiency Regime Yield Analyzer) microstructural efficiency framework.
What LEVENT measures
LEVENT outputs a single continuous variable L that represents the remaining survival capacity of the active efficiency regime.
High L → the current regime has strong structural endurance
Falling L → the regime is consuming its capacity
L → 0 → regime exhaustion and elevated probability of transition
This makes LEVENT a forward-looking structural time variable, not a price indicator.
What is inside this script
This implementation contains the following components:
1. DERYA (open-source microstructure efficiency)
DERYA is computed from OHLC data as:
Net close-to-close movement divided by total intrabar range
It is smoothed with an EMA and normalized over a rolling window to produce a bounded efficiency state (0–100).
This is an open-source indicator and is explicitly credited in the LEVENT paper.
2. Transition Strength (S)
S measures how unstable the regime is by combining:
the slope of DERYA
the acceleration of DERYA
This is not RSI, MACD, or ATR — it is a state-transition intensity metric.
3. Regime Engine
Markets are classified into four structural regimes:
Expansion
Exhaustion
Collapse
Base / Recovery
A debounce + persistence filter is used to avoid noise-based flickering.
4. Structural Lifetime (LEVENT L)
Each regime is assigned a capacity (Λ) and a fragility (α).
LEVENT then evolves as a jump-and-countdown survival process:
On regime change → L resets to full capacity
Inside a regime → L decays deterministically
High instability → faster decay
This is not a moving average, oscillator, or probability estimate — it is a structural survival clock.
How to use LEVENT
LEVENT is designed to be used as a regime-health overlay, not a buy/sell trigger.
Typical uses:
Detect late-stage trends when L is low
Avoid initiating positions when the regime is near collapse
Compare structural stability across assets
Combine with price, trend, or volume systems
Do not use LEVENT alone as a trading signal.
LEVENT tells you “how long the structure may last”, not “where price will go.”
Visuals
Background colors show the current regime
The LEVENT line shows remaining structural lifetime
A table displays the active regime and current L value
Important notes
LEVENT is not RSI, MACD, ATR, or trend
LEVENT does not predict price direction
LEVENT does not issue entry/exit signals
LEVENT is a research-grade structural model
The DERYA component used here is an open-source microstructural efficiency estimator and is credited accordingly.
Risk and disclaimer
This script is provided for research and analytical purposes only.
It is not financial advice and must not be used as a standalone trading system.
Markets are uncertain.
All trading decisions and risks remain entirely the responsibility of the user.
LEVENT: Lifetime Estimation via Efficiency-regime Event Transitions
Introducing a Regime-Dependent Structural Lifetime Estimator for Financial Markets Using OHLC Data
Author: DUMAN,Bülent
Affiliation: Independent Researcher
zenodo.org
Kalman Hull Trend Score [BackQuant]Kalman Hull Trend Score
Overview
Kalman Hull Trend Score is a trend-strength and regime-evaluation indicator that combines two ideas, Kalman filtering and Hull-style smoothing, then measures persistence of that filtered trend using a rolling score. The goal is to produce a cleaner, more stable trend read than typical moving average tools, while still reacting fast enough to be practical in live markets.
Instead of treating a moving average as a simple line you cross, this indicator turns the filtered trend into an oscillator-like score that answers: “Is the smoothed trend consistently progressing, or is it stalling and degrading?”
Core idea
The indicator is built from two components:
A Kalman-based smoothing engine that estimates price state and reduces noise adaptively.
A Hull-style construction that uses multiple Kalman passes to create a responsive, low-lag trend filter.
Once the Kalman Hull filter is built, a persistence score is calculated by comparing the current Kalman Hull value to many past values. The result is a trend score that rises in sustained trends and compresses or flips during deterioration.
Why Kalman instead of standard smoothing
Traditional moving averages apply fixed smoothing rules regardless of market conditions. A Kalman filter behaves differently, it is designed to estimate an underlying state in noisy data, adjusting how much it “trusts” new price information versus prior estimates.
This script exposes that behavior through two key controls:
Measurement Noise: how noisy the observed price is assumed to be.
Process Noise: how much the underlying state is allowed to evolve from bar to bar.
Together, these settings let you tune the balance between smoothness and responsiveness without relying on blunt averaging alone.
Kalman filter mechanics (conceptual)
Each update cycle follows the classic structure:
Prediction: assume the state continues, and expand uncertainty by process noise.
Update: compute Kalman Gain, then blend the new price observation into the estimate.
Correction: reduce uncertainty based on how much the filter accepted the new information.
When measurement noise is higher, the filter becomes more conservative, smoothing harder. When process noise is higher, the filter adapts faster to regime changes, but can become more reactive.
Check out the original script:
Kalman Hull construction
The “Hull” component is not a standard HMA built from WMAs. Instead, it recreates the Hull idea using Kalman filtering as the smoothing primitive. The structure follows the same intent as HMA, reduce lag while keeping the line smooth, but does it with Kalman passes:
Apply Kalman smoothing over multiple effective lengths.
Combine them using the Hull-style weighting logic.
Run the combined output through another Kalman pass to finalize smoothing.
The result is a Kalman Hull filter that aims to track trend with less jitter than raw price, and less lag than slow averages.
Another Kalman Hull with Supertrend
Trend scoring logic
The trend score is computed by comparing the current Kalman Hull value to past Kalman Hull values over a fixed lookback range (1 to 45 bars in this script):
If current kalmanHMA > kalmanHMA , add +1
If current kalmanHMA < kalmanHMA , add -1
This produces a persistence score rather than a simple direction signal. Strong trends where the filter keeps advancing will accumulate positive comparisons. Weak trends, chop, or reversals will cause the score to flatten, decay, or flip negative.
Interpreting the score
Read the score as trend conviction and persistence:
High positive values: bullish persistence, the filtered trend is progressing consistently.
Low positive values: trend exists but is fragile, progress is slowing.
Near zero: indecision, range behavior, frequent challenges to structure.
Negative values: bearish persistence or sustained deterioration in the filtered trend.
The rate of change matters:
Score expansion suggests trend is gaining traction.
Score compression often signals consolidation or exhaustion.
Fast flips usually accompany regime transitions.
Signal thresholds and regime transitions
User-defined thresholds convert the score into regimes:
Long threshold: score must exceed this level to confirm bullish persistence.
Short threshold: a crossunder of the score triggers bearish regime transition.
This is intentionally conservative. Long bias is maintained while the score holds above the long threshold. Short transitions are event-triggered on breakdown via crossunder, helping avoid constant flipping during minor noise.
Signals are only plotted on regime changes (first bar of the flip), keeping them clean for alerts and backtests.
Visual presentation
The indicator provides multiple layers depending on how you want to use it:
Kalman Hull Trend Score oscillator, color-coded by active regime.
Optional Kalman Hull filter plotted on the price chart for structure context.
Optional threshold reference lines for quick regime mapping.
Optional candle coloring and background shading for instant readability.
You can run it as a pure score panel or as a combined panel + on-chart trend overlay.
How to use in practice
Trend filtering
Favor long setups when the score remains above the long threshold.
Reduce directional aggression when score compresses toward zero.
Treat a short-threshold breakdown as a regime risk event, not just a signal.
Trend quality assessment
Rising score supports continuation trades and adds confidence to breakouts.
Flat or falling score warns that trend persistence is fading.
If price trends but score fails to expand, trend may be weak or liquidity-driven.
Trade management
Use the Kalman Hull line as dynamic structure reference on chart.
Use score deterioration to scale out before a full regime flip.
Use regime flips as confirmation for bias shifts rather than prediction.
Tuning guidelines
Measurement Noise
Higher: smoother filter, fewer false shifts, slower to adapt.
Lower: more responsive, more sensitive to microstructure noise.
Process Noise
Higher: adapts quicker to sudden changes, but can become twitchy.
Lower: steadier state estimate, but slower during sharp regime transitions.
A practical approach is to first tune measurement noise until the Kalman Hull line matches the “clean trend structure” you want, then adjust process noise to control how quickly it reacts when the regime genuinely changes.
Summary
Kalman Hull Trend Score transforms a Kalman-based Hull-style trend filter into a quantified persistence oscillator. By combining adaptive Kalman smoothing with low-lag Hull logic and a rolling comparison score, it provides a cleaner read on trend quality than basic moving averages or single-condition trend tools. It is best used as a regime filter, trend strength gauge, and structure-aware trade management layer.
Darphane Altin SpreadThis shows the spread between the Turkish Mint's Gold Coin and Gram Gold. It evaluates the performance as a percentage. It gives information such as: the Turkish Darphane Gold Coin is priced 54% higher than Gram Gold.
Universal Kinetic MasterThe Universal Kinetic Master (UKM) is an advanced volatility architect designed to replace static Moving Averages. Unlike detailed manual settings, it utilizes a proprietary **Auto-Calibration Engine** that mathematically adjusts its channel sensitivity based on the specific asset class (Crypto/Stocks/Forex).
**Underlying Concepts:**
1. **Kinetic Volatility:** The script analyzes the historical "energy" (ATR) of the asset to determine if the market is in an Expansion or Compression phase.
2. **Adaptive Filtering:** During low-energy chops, the visual channel tightens or hides signals to prevent false breakouts.
3. **Proximity Sizing:** Visual dots resize dynamically as price approaches the kinetic mean, signalling potential reversion.
**Features:**
- Auto-detects Asset Class (Crypto vs Stocks).
- Smart Dashboard for real-time volatility status.
- Filtered "High Quality" signals only.
Share Size CalcCalculate the share size to be used based on a percentage risk per trade and total capital in the account.
ZenAlgo - SqueezeThis indicator is a separate-pane tool that reads the current chart symbol (treated as the traded instrument, typically a perpetual) and optionally reads a second symbol used as a comparison reference. It can operate in two broad modes:
Basis on - the script attempts to obtain a "spot or reference" close and compares the chart close against it.
Basis off - all basis related parts are disabled and only the on-chart derived components remain.
The comparison reference can be selected via presets (dominance and market cap style tickers, BTC perpetual, etc.) or via a manual symbol selector. There is also an optional second comparison line that is visual-only and does not influence the squeeze logic.
Spot and reference selection, including safety and fallback
When basis mode is enabled, the script needs a valid comparison close series. It supports three ways to obtain it:
Manual selection - you choose a specific reference symbol or one of the provided presets.
Auto spot from the chart symbol - the script strips the ".P" suffix from the chart ticker to guess a spot ticker (fast, but can be invalid on some symbols or spread charts).
Exchange fallback chain - if the manual request fails to return data, the script tries a hardcoded sequence of exchanges for the same base pair (same exchange prefix first, then Binance, then Bybit, then MEXC, then Bitget). It uses requests that ignore invalid symbols so the script fails gracefully into the next option. Spread-style synthetic tickers are detected and excluded from this fallback process.
Why this matters: basis style comparisons are only meaningful when the reference series is actually available and aligned to the same timeframe. The script spends a lot of logic on preventing runtime failures and preventing accidental "fake basis" on unsupported tickers.
VWAP with standard deviation bands on multiple reset schedules
The next major block computes anchored VWAP states for several higher-level periods. The core approach is:
It performs a running, volume-weighted accumulation of typical price for the anchor period.
It simultaneously accumulates the second moment needed to estimate dispersion around VWAP, producing a standard deviation estimate around the anchored VWAP.
On each reset boundary (daily, weekly, monthly, quarterly, semiannual, yearly), the accumulators reset and begin a new anchored VWAP segment.
Why this matters: anchored VWAP is treated here as a rolling "fair value" for the current period. The dispersion estimate is used to convert distance from VWAP into discrete states (premium, discount, etc.) instead of relying on raw price distance, which varies widely across assets.
Smoothed average line used as a slower trend filter
Alongside the anchored VWAPs, the script builds a slow baseline from the chart close using a two-stage smoothing process. This baseline is then used as a slower reference for trend qualification.
Why this matters: the trend logic requires alignment between price, the daily anchored VWAP, and this slower baseline, plus confirmation that both the daily VWAP and the slow baseline are rising or falling. This avoids classifying trend from price position alone.
Trend classification used for context labeling
Trend is classified as:
Bull trend when price is above the daily anchored VWAP, the daily anchored VWAP is above the slow baseline, and both the daily VWAP and the slow baseline are rising.
Bear trend when price is below the daily anchored VWAP, the daily anchored VWAP is below the slow baseline, and both are falling.
If neither is true, the script treats trend as neutral for its table and for squeeze sub-labeling.
Why this matters: the script later distinguishes events that align with the prevailing trend versus those that run against it.
VWAP state mapping and heatmap rows
For each anchored VWAP (D, W, M, Q, S, Y), the script assigns a discrete state label based on where price is relative to VWAP and how many dispersion units away it is. The state labels include:
Above, Below
Premium and Discount tiers
"Super" and "Mega" tiers for more extreme distances
These states are turned into colors using a selected palette preset. The script then draws horizontal "heat" lines at fixed Y offsets inside the indicator pane, one row per anchor timeframe, plus optional row-letter labels that also show whether the anchored VWAP is rising, falling, or stable.
How to interpret:
The heatmap is not a price plot. It is a categorical summary of where current price sits relative to each anchored VWAP and its dispersion.
Multiple rows allow you to see whether price is simultaneously extended on short anchors but neutral on long anchors, or vice versa.
Normalized metrics used for squeeze detection and plots
The script computes several standardized (z-scored) series over a fixed lookback length:
Chart close z-score - how far the current close is from its recent mean in standardized units.
Reference close z-score - same standardization on the chosen comparison series (only when basis is enabled and reference exists).
Basis percentage z-score - derived from the ratio between chart close and the reference close, transformed into percent difference, then standardized.
Delta proxy z-score - a signed volume proxy that assigns positive weight on up candles, negative weight on down candles, and zero on unchanged candles, then standardized. For symbols with missing volume, it can fall back to a constant weight of 1 depending on settings.
Why this matters:
The use of z-scores makes thresholds portable across assets and regimes. Instead of using raw basis percent or raw volume, the script detects whether each component is unusually large relative to its own recent distribution.
Squeeze event conditions and "continuation vs countertrend" labeling
The core squeeze events are defined by three simultaneous conditions, each compared to a fixed threshold:
Price is moving fast enough (rate-of-change threshold).
Basis deviation is large enough in one direction (basis z-score threshold).
Delta proxy deviation is large enough in the same direction (delta z-score threshold).
When these align to the upside, the script calls it a short squeeze event (upward acceleration with positive basis and positive delta proxy abnormality). When they align to the downside, it calls it a long squeeze event (downward acceleration with negative basis and negative delta proxy abnormality).
Volume availability handling:
You can hard-disable squeeze detection on symbols where volume is missing.
Or you can allow it, in which case the delta proxy uses a fallback weight so the pipeline still functions.
Continuation vs countertrend:
Each squeeze event is classified relative to the trend state described earlier.
A squeeze that agrees with the trend is marked as continuation.
A squeeze that opposes the trend is marked as countertrend.
Visual output tied to squeezes:
Optional dots are plotted near the top or bottom of the pane to indicate event type (short vs long, continuation vs countertrend).
Optional candle coloring is applied only during squeeze states, using separate colors for continuation bull, continuation bear, and countertrend.
Basis vs chosen comparison relationship on fixed timeframes
In addition to the main squeeze logic, the script evaluates how the basis z-score compares to the chosen reference z-score on four fixed intraday timeframes (5m, 15m, 1h, 4h). For each timeframe it assigns a simple state:
Basis standardized value above the reference standardized value
Basis standardized value below the reference standardized value
Equal or unavailable
These states are primarily used to color table cells as a compact multi-timeframe context readout.
Why this matters: it provides a quick view of whether the basis deviation is leading or lagging the chosen reference across multiple granularities, without changing the main squeeze definitions.
Cross between basis and chosen reference
When enabled and basis is available, the script detects crosses between:
Basis z-score line
Chosen reference z-score line
It can plot small up or down triangles on the basis plot when the basis standardized value crosses above or below the reference standardized value. The triangle color is tied to the daily VWAP heat color so the marker inherits the daily premium/discount context.
Why this matters: it isolates regime changes where the basis deviation becomes stronger or weaker than the reference series in standardized terms, which can be used as a context shift rather than a standalone entry indication.
Pane plots, fills, and thresholds
The indicator pane can show:
The chart close z-score line (perp series).
The chosen reference z-score line (compare series, when available).
The basis z-score line.
The optional second comparison z-score line.
A background fill is drawn between the chart close z-score and the reference z-score to visualize which is higher at the moment. Horizontal reference lines are also drawn for:
The basis z-score thresholds used for squeeze logic.
The delta proxy z-score thresholds used for squeeze logic.
Zero line and additional guide lines at several standardized levels.
How to interpret values:
The plotted values are standardized units relative to each series’ own recent distribution.
A value around 0 indicates "near recent average."
Large positive or negative values indicate "unusually above or below recent average" for that specific series.
Table readout and derived bias score
A table can be shown in the top-right of the pane, summarizing:
Current mode (basis off, auto spot, or which preset/manual reference is in use).
Whether basis data is valid.
Trend state and a slope warning/ok flag.
Daily and weekly anchored VWAP numeric values and their premium/discount state coloring.
A daily vs weekly VWAP difference state.
Price rate-of-change state.
Basis percent value and basis z-score state.
Delta proxy z-score state.
Chart close z-score state.
Reference z-score state.
A composite bias score and text label.
The four timeframe basis-vs-reference relationship states (5m, 15m, 1h, 4h).
The score is then mapped to labels from strong bearish through neutral to strong bullish, optionally appending the most recent squeeze classification when present.
Right-side value tags
On the last bar, the script can draw short horizontal lines and labels to the right showing the latest values for:
Chart close z-score
Reference z-score
Basis z-score
Optional second comparison z-score
These tags are offset a user-selected number of bars into the future so they remain readable.
"Best" block and alert conditions
A final logic layer uses:
Two fixed thresholds on the basis z-score (one associated with an "up" cross and one with a "down" cross).
A count of how many enabled VWAP heatmap rows are currently in "hot" states (above or premium tiers) vs "cold" states (below or discount tiers).
A recent-squeeze filter that checks whether any squeeze event happened within a defined lookback window.
It then plots:
Small circles for threshold crosses when at least a minimum hot/cold alignment exists.
Diamonds when alignment exists, optionally larger when alignment count is higher.
Separate diamonds when the threshold cross happens without a recent squeeze.
Alert conditions are provided for:
Strong "best" diamonds when alignment meets a higher minimum.
Optional alerts for "best" threshold crosses without recent squeezes.
Optional alerts for basis-vs-reference z-score crosses.
Why this matters: it gates threshold events by broader multi-anchor context, attempting to avoid treating a single standardized cross as equally meaningful in every macro positioning regime.
Added value over common free indicators
This script combines several components that are often separate in typical tools, and it enforces explicit data-availability safeguards:
Anchored VWAP states across multiple calendar resets with an internal dispersion estimate and a compact heatmap summary.
Basis style comparison that can be driven by multiple preset market references, with a fallback chain across exchanges and explicit spread-chart protection.
Squeeze detection that requires simultaneous agreement across price acceleration, basis deviation, and a signed volume proxy deviation, then labels the event by trend alignment.
A unified pane where standardized series, thresholds, heatmap context, and table diagnostics are all consistent with the same internal state.
Disclaimers and where it can fall short
If the chosen reference symbol is unavailable or returns gaps, basis-dependent outputs can be unavailable or may switch to fallback sources depending on settings. This can change the basis series behavior compared to a strictly fixed reference feed.
The delta component is a proxy based on candle direction and volume, not an exchange order-flow delta. On symbols with unreliable volume, enabling fallback weighting can keep the indicator running but reduces the meaning of "volume-driven" parts.
Standardized values depend on the chosen lookback. In highly non-stationary regimes, what is "unusual" can shift quickly.
Anchored VWAP states depend on reset definitions in UTC. If your trading session expectations are tied to different session boundaries, interpret anchor transitions accordingly.
How to best use it
Start by verifying Basis OK in the table when basis mode is enabled. If it shows an error state, either switch reference mode, disable basis, or enable fallback if appropriate for your symbol.
Use the heatmap rows to understand whether price is extended relative to multiple anchored baselines simultaneously or only on short anchors.
Treat squeeze dots and candle coloring as event markers, then use the trend label (continuation vs countertrend) and the VWAP states to decide whether the event aligns with your broader plan.
Use basis vs chosen crosses and the basis-vs-reference multi-timeframe states as context shifts, not as isolated triggers.
If you enable alerts, prefer those that include the multi-row hot/cold alignment gating when you want fewer, more context-filtered notifications.
Market State Fear & Greed Bubble Index V1Market State Fear & Greed Bubble Index V1
📊 Comprehensive Market Sentiment Analyzer
This advanced indicator measures market psychology through a multi-dimensional scoring system, combining demand/supply pressure, trend momentum, and statistical extremes to identify fear/greed cycles and trading opportunities.
🎯 Core Features
Five-Factor Fear & Greed Score
Weighted sentiment analysis:
Demand/Supply (25%): Real-time buying/selling pressure
RSI (25%): Momentum extremes
KDJ (20%): Overbought/oversold detection
Bollinger Band % (20%): Statistical positioning
ADX Trend (10%): Trend strength confirmation
Multi-Layer Market State Detection
Extreme Fear/Greed: Statistical bubble identification
Trend Bias: Bullish/Bearish/Neutral classification
Confidence Scoring: Setup reliability assessment
Reversal Alerts: Early trend change signals
Visual Dashboard
Top-right information panel displays:
Fear & Greed Score (0-100)
Market State Classification
Trend Bias & Confidence
Signal Quality & Alerts
📈 Key Components
Fear & Greed Gauge
0-30: Extreme Fear (buying opportunities)
30-47: Fear (accumulation zones)
47-70: Neutral (consolidation)
70-90: Greed (caution zones)
90-100: Extreme Greed (selling opportunities)
Deviation Zones
Red Zone (±17.065): Critical reversal areas
Yellow Zone (±34.135): Warning levels
Blue Zone (±47.72): Statistical extremes where reversals are highly likely. These occur when asset prices are in a bubble that's about to pop.
Signal Types
Buy/Sell Labels: Primary entry/exit signals
Scalp Signals: Short-term opportunities
Bottom/Top Detectors: Extreme reversal zones
Whale Indicators: Institutional activity markers
🚀 Trading Applications
Extreme Fear Setups Conditions:
Fear & Greed Score < 34.135
BB% < 0 or < J-inverted line
RSI < 34.135
Confidence score > 68%
Bullish divergence present
Action: Accumulation positions, scaled entries
Extreme Greed Setup Conditions:
Fear & Greed Score > 68.2
BB% > 100 or > 80 with divergence
RSI > 68.2
ADX showing trend exhaustion
Multiple timeframe resistance
Action: Profit-taking, protective stops
Trend Following
Bullish Conditions:
Sentiment score rising from fear zones
DMI+ above DMI- and rising
Confidence > 75%
Volume supporting moves
Bearish Conditions:
Sentiment declining from greed zones
DMI- above DMI+ and rising
Distribution patterns
Multiple resistance failures
⚙️ Customization Options
Adjustable Parameters:
DMI Settings: DI lengths, ADX smoothing
KDJ Periods: Customizable sensitivity
BB% Range: Statistical band adjustments
Smoothing Options: Demand/Supply filtering
Alert Thresholds: Custom signal levels
Visual Customization:
Color schemes for different market states
Line thickness and style preferences
Information panel display options
Alert sound/visual preferences
📊 Signal Interpretation
Primary Signals:
Green 'B': Strong buy opportunity
Red 'S': Strong sell opportunity
White 'Scalp': Short-term trade
Trade Area: Accumulation/distribution zones
Visual Markers:
🔥: Bullish momentum building
🐻: Bear exhaustion building
🐳: Whale/institutional activity
Color-coded fills: Market state visualization
Confidence Levels:
≥80%: High reliability setups
60-79%: Moderate confidence
<60%: Low confidence, avoid or reduce size
⚠️ Risk Management Guidelines
Critical Rules:
Never trade against extreme sentiment (Extreme Fear → buy, Extreme Greed → sell)
Require multiple confirmation signals
Use confidence scores for position sizing
Avoid When:
Conflicting signals between components
Low volume participation
Confidence score < 50%
Major news events pending
Extreme volatility conditions
💡 Advanced Strategies
Sentiment Cycle Trading
Identify sentiment extremes
Wait for confirmation reversals
Enter with trend confirmation
Exit at opposite sentiment extreme
Use confidence scores and fear & greed scores to scale:
Fear & greed scores < 30 = buy area
Fear & greed score > 60 = sell area
Trend Momentum
Exit: At extreme greed with divergence
Enter: At extreme fear with divergence
📊 Market State Classification
Five Primary States:
EXTREME FEAR (BB% <0, RSI <34, Score <34)
FEAR (Score 34-47, bearish momentum)
NEUTRAL (Score 47-70, consolidation)
GREED (Score 70-90, bullish momentum)
EXTREME GREED (Score >90, BB% >100)
State Transitions:
Fear → Neutral: Early accumulation
Neutral → Greed: Trend development
Greed → Extreme Greed: Distribution
Extreme → Reversal: Trend change
🔍 Information Panel Guide
Real-Time Metrics:
FEAR & GREED: Current sentiment score
Market State: Classification and bias
Trend Bias: Bullish/Bearish/Neutral
Confidence: Setup reliability percentage
Momentum: Current directional strength
Volatility: Market condition assessment
Signal Quality: Trade recommendation
Reversal Imminent: Early warning alerts
🌟 Unique Advantages
Psychological Edge:
Quantifies market emotion through multiple indicators
Identifies bubbles before they pop
Provides statistical confidence for each setup
Combines technical extremes with sentiment analysis
Offers clear visual cues for decision making
Professional Features:
Multi-timeframe sentiment analysis
Real-time confidence scoring
Comprehensive alert system
Institutional activity detection
Clear risk/reward visualization
📚 Educational Value
This indicator teaches:
Market psychology cycles
Statistical extreme identification
Multi-indicator confirmation
Risk quantification methods
Professional trade management
Perfect for traders seeking to understand and profit from market sentiment cycles.
Disclaimer: For educational purposes. Trading involves risk. Past performance doesn't guarantee future results.
[iQ]PRO O.M.N.I. Singularity Oscillator+The PRO Ω_SINGULARITY+ is a next-generation momentum oscillator that applies principles of Fluid Dynamics and Physics to market data. It moves beyond traditional oscillators (like RSI or MACD) by incorporating "Laminar Flow" efficiency and "Volume Mass" to distinguish between high-quality trends and turbulent noise.
This tool is designed to solve the "False Signal" problem. A standard oscillator triggers simply because price moved. The Singularity Engine only triggers if the price movement possesses sufficient Mass (Volume) and Efficiency (Flow State) to sustain the trajectory.
Key Features & Methodology
Physics Core: Laminar Flow Detection:
Utilizes an Efficiency Ratio (ER) algorithm (similar to Kaufman's Adaptive logic) to measure the "cleanliness" of price movement.
Laminar Flow: Smooth, directional price action increases the Flow State multiplier.
Turbulence: Choppy, sideways price action reduces the multiplier, dampening signals during consolidation.
Mass-Energy Verification:
Integrates Volume as "Mass."
Phantom Mass Filter: Price moves on low volume are treated as "hollow" and are mathematically suppressed.
Heavy Mass: Moves supported by volume surges (> SMA 50) are amplified, signaling institutional participation.
The Singularity Wave (Signal Generation):
The core calculation is a modified Relative Vigor Index (RVI) derivative, smoothed with a Symmetrically Weighted Moving Average (SWMA).
This "Raw Energy" is then multiplied by the Flow State and Mass Factor.
Result: A signal that is hyper-sensitive during strong trends but flat/neutral during chop.
Anomaly Detection:
Zero-Point Breach: Standard zero-line crossovers indicate a shift in market polarity (Trend Reversal).
⚡ Hyper-Velocity Events: Specific thresholds (±0.2) that indicate an explosive release of energy (Momentum Breakout).
How to Use
Trend Confirmation: When the Singularity Wave (Area) is expanding and holding above the Signal Lag (White Line), the trend is robust.
Filtering Chop: If the oscillator is hovering near the "Event Horizon" (Zero Line) with low amplitude, the market is in a "Turbulent" state. Avoid entries.
Entry Triggers:
Triangle Up/Down: Polarity shift (Early Entry).
⚡ Lightning Bolt: High-momentum breakout (Confirmation Entry).
Divergence: As with all oscillators, divergence between Price and the Singularity Wave signals potential exhaustion.
2. Code Logic & Architecture Explanation
(A technical breakdown of the script's internal mechanics)
A. Physics Core: Laminar Flow (Efficiency Ratio)
The script begins by determining the quality of the trend using an Efficiency Ratio (ER).
Concept: It compares the net distance price traveled (change_abs) vs. the total path traveled (volatility_sum).
Math: ER = Net Change / Sum of Individual Changes.
If price moves in a straight line, ER ≈ 1.0 (Laminar Flow).
If price chops up and down but ends near the start, ER ≈ 0.0 (Turbulence).
Flow State: The ER is squared (math.pow) to punish noise even more severely, ensuring only the strongest trends register high values.
B. Mass-Energy Verification (Volume Weighting)
Standard oscillators ignore volume. This script forces volume to validate the move.
Baseline: Calculates a 50-period Simple Moving Average (vol_mean) of volume.
Mass Factor: Current Volume / Average Volume.
Clipping: The factor is capped at 3x (mass_factor := mass_factor > 3 ? 3 : mass_factor) to prevent a single massive volume spike (like news events) from distorting the chart for the rest of the day.
C. The Singularity Oscillator (The Fusion)
This section combines the components into the final signal.
Base Engine: It uses a calculation similar to the Relative Vigor Index (RVI), which compares Closing prices relative to the High-Low range.
numerator (Open vs Close) captures the directional momentum.
denominator (High vs Low) captures the trading range (volatility).
SWMA Smoothing: Symmetrically Weighted Moving Averages are used to smooth inputs before calculation to reduce lag.
The Omega Equation:
Ω=Raw Energy×Flow State×Mass Factor
This is the critical innovation. A signal requires Direction (Raw Energy) + Efficiency (Flow) + Volume (Mass) to be significant.
D. Signal Processing & Anomalies
Signal Line: An EMA (Exponential Moving Average) of the Omega signal provides a crossover trigger point.
Thresholds:
Zero Cross: The classic "Bull/Bear" divider.
Hyper-Velocity: Hardcoded thresholds (0.2 / -0.2) act as "Turbo" zones. If the weighted signal breaches these, it implies all three factors (Price, Efficiency, Volume) are peaking simultaneously.
E. Visualization Layer
Adaptive Coloring: The plot color changes not just on direction (Green/Red) but on intensity.
col_bull (Green) is used when the Wave is above the Signal Line (Accelerating).
color.new(col_bull, 50) (Faded Green) is used when the Wave is positive but below the Signal Line (Decelerating).
Visual Hierarchy: The "Singularity Wave" is an area plot for visibility, while the "Signal Lag" is a thin line for precision.
3. Recommended "Author's Instructions" (Readme)
WARNING: This indicator is NOT a standalone signal service. It is a Physics-Based Filter.
Do not trade every triangle blindly.
Do use this to confirm price action. If Price breaks resistance, but the Singularity Wave is flat (low Mass/Flow), the breakout is likely a trap (Fakeout).
Best Timeframes: 15m, 1H, 4H.
Asset Class: Optimized for High-Volume assets (Crypto Majors, Forex, Indices) where Volume Flow is reliable.
Candle Closing Range %Measuring strength of the daily closing candle after a gap up or strong open.
This indicator calculates where price closed within the day’s range and expresses it as a percentage. It is designed to give immediate context on whether buyers or sellers controlled the session — and is especially useful when analyzing gap days or trend continuation setups on intraday charts.
The indicator always references the most recent closed daily candle.
Formula:
Closing Range = (Close – Low) / (High – Low) × 100
Range interpretation:
• Closing range > 60% → Buyers dominated
• Closing range 40–60% → Neutral (directional bias unclear)
• Closing range < 40% → Sellers dominated
Style options:
• Background color
• Text Size
• Text Color
FlowMaster 4H - Avanced Volume & Pip Analyzer“Visualize market flow like an institutional trader – track buy/sell volume, pip per tick, and candle efficiency in one table.”
“Visualize market flow like an institutional trader – track buy/sell volume, pip per tick, and candle efficiency in one table.”
Short Description (Marketplace-Friendly):
Aggregated 4H candle analysis with buy/sell volume breakdown.
Pip/Tick calculation with weighted averages for smarter entry/exit signals.
Compare current candle volume to previous candle and 20-bar average.
All key metrics in a compact, easy-to-read table below the chart.
Ideal for Forex swing & position traders seeking institutional-style insights directly in TradingView.
Long Description / Full Product Info:
FlowMaster 4H is a professional-grade trading indicator designed to provide quantitative order flow analysis on Forex markets using 4-hour candles. By aggregating volume data, tick information, and pip movements, FlowMaster gives traders a unique perspective on market dynamics typically reserved for institutional participants.
Key Features:
Volume Relative Metrics: Compare the current candle volume to the previous candle and to the average of the last 20 candles.
Pip/Tick Analysis: Calculates pip per tick using a scaled price approach, giving insights into the efficiency of price moves.
Weighted Pip/Tick Averages: Tracks volume-weighted pip/tick over the last 20 candles for both buyers and sellers.
Percentage Metrics: Visualize the proportion of buy and sell volume relative to total ticks, helping identify absorption and impulse movements.
User-Friendly Table: All key indicators displayed in a compact, easy-to-read table below the chart.
Why use FlowMaster 4H:
Identify market absorption and impulse using reliable volume and pip metrics.
Optimize trade entry and exit decisions based on quantitative order flow data.
Works directly in TradingView, offering a professional order flow view without needing access to Level 2 order book data.
Pioneering approach in aggregating 4H candle data with detailed pip/tick insights.
Ideal For: Swing and position traders, Forex traders seeking institutional-style volume analysis, and anyone looking to improve order flow reasoning using TradingView.
P/E, EPS, Price & Price-to-Sales DisplayThis indicator displays key fundamental valuation metrics for the selected stock.
It shows:
Earnings Per Share (EPS)
Price-to-Earnings (P/E) ratio
Calculated theoretical price based on P/E × EPS
Price-to-Sales (P/S) ratio
These values help traders quickly assess valuation without switching to separate financial panels.
🛠 Instructions for Use
Add the indicator to your chart.
Click on the three dots (⋯) next to the indicator name.
Select Move to → New pane above.
Minimize the indicator pane to display only the numerical values.
Hide the plotted lines if you want a clean, numbers-only view.
This setup allows you to monitor fundamental metrics efficiently without cluttering the price chart.
JMMF3 PANTOKRATOR V1.5.3 [release]This script implements an advanced market reading and diagnostic system based on a deterministic state architecture. Its design follows formal systems engineering principles and structural evaluation criteria, with the purpose of identifying valid operational contexts and vetoing those that do not meet the required conditions.
The system does not perform predictions and does not provide investment recommendations. Its function is strictly analytical and intended to support user decision making by offering an objective framework for market assessment across different operational states.
The script evaluates multiple market dimensions in a synchronized manner and only recognizes states that are fully validated by its internal architecture. There is no automated discretion and no trade execution. The user retains full responsibility for any operational decision at all times.
Access to this script is private and granted exclusively by invitation. Its use is limited to personal purposes and is non transferable. Any form of reproduction, redistribution, or reverse engineering is strictly prohibited.
This development does not constitute financial advice nor an automated trading system.
Futures Risk Manager (Futures)Risk management table for consistency trading.
Auto adjustable for MINI/MICRO based on your account.
can change RR shows SL and TP and amount to enter.
Please take note that you need to update every trade the stop tick and RR ratio.
Good luck in your trading journey.
Yo Yo Strategy NQ ES v 3.1The "Yo Yo Strategy" is a sophisticated mean-reversion and volatility analysis tool specifically calibrated for US Equity Futures (Nasdaq 100 and S&P 500).
This indicator is designed to identify "overextended" price action relative to the session's volume-weighted average price (VWAP). The core philosophy is that price acts like a "Yo-Yo" – when it stretches too far from its volume center (VWAP) due to aggressive momentum, it has a high statistical probability of snapping back or pausing.
How it Works (The Logic)
Unlike standard oscillators, this script uses a custom calculation of Volume-Weighted Variance to construct dynamic volatility bands. It does not rely on lagging indicators like MA crossovers. Instead, it tracks:
VWAP Variance: It establishes a "fair value" line and upper/lower standard deviation bands calculated from the opening of the US RTH session (09:30 NY).
Momentum Streaks: The script counts consecutive closes relative to the mean. It differentiates between a "Blitz" move (sudden, high-volatility spike) and a "Slow" move (grinding trend exhaustion).
Session Filtering: The algorithm is strictly tuned for the New York session, filtering out low-volume pre-market noise.
Key Features
Auto-Asset Detection: The script automatically detects if you are trading NQ (Nasdaq) or ES (S&P) and adjusts its volatility thresholds, stop-losses, and sensitivity accordingly. NQ requires wider breathing room due to higher beta, while ES is tighter.
Setup Classification:
⚡ BLITZ: Detects rapid expansions where price moves significantly away from VWAP in a short time.
🛡️ SLOW: Identifies exhaustion where price has been trending away from the mean for an extended period without a pullback.
💎 COMBO: A high-conviction setup where both Blitz and Slow conditions align.
Seasonality Warnings: The script includes built-in logic that analyzes the day of the week, providing caution warnings for typically lower-probability days (e.g., choppy Mondays or risky Fridays).
Dynamic Risk Management: Based on current volatility, the script visualizes suggested Take Profit levels (targeting VWAP or fixed extensions) and Stop Loss levels (tight vs. wide volatility stops).
Visual Guide
Yellow Line: The Session VWAP (Magnet).
Green/Red Labels: Potential entry zones for Mean Reversion (Long/Short).
Dashed Lines: Projected Take Profit targets based on volatility analysis.
Disclaimer The "Win Rate" (WR) percentages displayed on the chart labels are derived from extensive historical backtesting performed by the author on past market data. These are static informational labels meant to represent historical tendencies and do not guarantee future performance. Past performance is not indicative of future results. This tool is intended to assist manual traders in identifying high-probability zones, not to provide automated financial advice.
Market Regime v 2.1This indicator is a quantitative analysis tool designed to answer the most difficult question in intraday trading: "Who is in control: Bulls or Bears?"
Instead of relying on gut feeling, the "Market Regime Scorer" uses a proprietary point-based algorithm to assign a "dominance score" to buyers and sellers in real-time. It analyzes price action relative to the VWAP and Volatility Bands during the US Trading Session to determine the current Market Regime.
How the Scoring Engine Works The script runs a continuous calculation starting from the session open. It awards "Points" to Bulls or Bears based on weighted events:
Existence: Simply holding price above/below VWAP accumulates a base score over time.
Aggression: Closing outside the standard deviation bands (Band 1) awards high points, signaling strong momentum.
Rejection: Wick rejections from key zones add points to the defending side.
Time Decay: The algorithm weighs the "Opening Range" (first 30 minutes) more heavily, as early moves often dictate the day's structure.
The Dashboard A live table on the chart displays the battle in percentages:
BULLS / BEARS %: The current control split (e.g., 75% Bulls vs 25% Bears).
DAY TYPE:
🔥 AGGRESSIVE: One side has >60% control. Expect trend continuation or strong breakouts.
⚖️ BALANCED: Control is split (40%-60%). Expect chop, rotation, and mean reversion to VWAP.
IB - Initial Balance
up to 2 sessions per day
up to 3 mid lines
selectable background color for high or low first.
Dokakuri's Magic Hours: Master PlaybookMagic Hour: Master Playbook (Quantitative Mean Reversion)
Overview
The Magic Hour: Master Playbook is not a standard technical indicator; it is a quantitative database overlay for the Nasdaq 100 (NQ). It visualizes the results of a 13-year institutional backtest (2013–2026) directly on your chart, transforming historical probabilities into actionable real-time levels.
This tool focuses on a specific Mean Reversion edge: detecting when an hourly range breakout is statistically likely to fail and revert back to its midpoint (50% Reversion).
How It Works
The strategy identifies specific "Magic Hours" (e.g., 07:00 AM NY) that exhibit a high probability of mean reversion.
The Range: Measures the High and Low of the selected hour.
The Break: Waits for price to break outside this range.
The Reversion: Targets a return to the 50% Midline of the hourly range.
The indicator projects the Maximum Adverse Excursion (MAE) zones from the study, telling you historically how far price pushes against the trade before reversing.
The Master Dashboard: Metrics Explained
The data table displayed on the chart is hardcoded from a study of over 3,000 trading sessions per hour. Here is how to read the statistics:
1. Baseline Performance
Win Rate: The historical percentage of breakouts that successfully returned to the 50% midpoint.
Avg MAE: The average "heat" (drawdown) winning trades endured before hitting the target.
2. Time Expectations (Duration)
Time is a risk factor. This section tells you how long you typically have to wait for the target to be hit.
Fast (25%): The "easy" trades. 25% of winners hit the target within this time.
Med (50%): The median duration. Half of all winning trades take longer than this.
Grind (90%): If the trade exceeds this duration, it is an outlier and probability of success drops.
3. Runner Conversion (Conditional Probability)
This answers the question: "If I have already hit my 50% target, what are the odds the move continues?"
Example (90% @ 75% Ext): Means that 90% of the trades that hit the first target continued to hit the 75% extension.
Usage: Use this to decide whether to trail your stop loss or take full profit. High percentages suggest "Holding," low percentages suggest "Aggressive Taking Profit."
4. Zone Analysis (Heat Map)
This is the core of the risk management system. It breaks down adverse price movement into 6 Zones based on the % of the hourly range.
Z1 (Ideal) & Z2 (Prime): The "Safe Zones." Historically, the vast majority of winning trades never go deeper than these zones (0-50% expansion).
Density: The percentage of Winning Trades that peaked in this specific zone. A high density means "This is a normal place for price to turn around."
Zone Win%: The survivorship rate. Reading Rule: "Of all the trades that stopped in this zone, X% went on to win."
Visual Guide
Grey Box: The "Magic Hour" range (High/Low).
Fuchsia Line: The 50% Mean Reversion Target.
Colored Zones (Right Side):
Grey/Blue (Z1/Z2): High probability reversal zones.
Green (Z3): Deep pullback zone.
Orange/Red (Z4/Z5): Risk zones. Reversal probability decreases, but Risk:Reward improves.
Black (Z6 - Graveyard): Statistical outliers. Historically, trades reaching this deep rarely recover.
Dashed Red Line: The "Invalidation Level" where the setup statistically fails.
Included Strategies (Ranked)
The indicator includes data for the top performing hours found in the 13-year study:
Rank #1 (07:00 NY): The "Golden Hour" - Highest Win Rate & Stability.
Rank #2 (08:00 NY): Continuation Play.
Rank #3 (06:00 NY): Pre-Market Volatility.
Ranks #4-7: Asia & London session opens (00:00, 01:00, 02:00, 23:00).
Disclaimer
This indicator displays historical statistics for educational purposes only. "Win Rates" refer to past performance in a simulated backtest environment and do not guarantee future results. Trading futures involves substantial risk of loss.
CVD Complete Volume Analysis ProCVD Complete Volume Analysis Pro | Order Flow & Absorption
Introduction:
In the world of modern trading, Price is the advertisement, but Volume is the fuel. However, standard volume indicators on TradingView are often insufficient. They tell you how much was traded, but they don’t tell you how it was traded.
Was that large volume spike aggressive buying driving the trend? or was it a "buying frenzy" hitting a wall of passive limit orders (absorption)?
The CVD Complete Volume Analysis Pro (v5) is an advanced institutional-grade Order Flow engine. By utilizing 1-second intrabar data, this indicator reconstructs the "Tick Rule" to separate Aggressive (Market) orders from Passive (Limit) orders. It calculates Cumulative Volume Delta (CVD), detects Absorption/Distribution anomalies, and utilizes an embedded Logistic Regression model to predict daily directional bias.
This is not just an indicator; it is a complete Order Flow Dashboard designed to aid and support complex footprint charts for the everyday trader.
🏗️ How It Works: The "Micro-Structure" Engine
Most volume indicators on TradingView look at the close of a 1-minute or 5-minute bar to guess the volume direction. This script goes deeper.
1. The 1-Second Granularity
Using TradingView's request.security_lower_tf capability, this script pulls 1-second resolution data regardless of the chart timeframe you are on.
It analyzes the price movement every second.
It applies the "Tick Rule": If price moves up, volume is classified as Buy. If price moves down, volume is classified as Sell.
This allows for a highly accurate reconstruction of Buying vs. Selling pressure that standard indicators miss.
2. The "Cluster" Concept
The script aggregates these 1-second data points into Clusters.
Default: 60 seconds (1 minute) per cluster.
This creates a normalized "Heartbeat" of the market, allowing us to compare the efficiency of volume over fixed time windows, removing the noise of time-based chart distortions.
3. The "Passive" Detection Logic (The Core Feature)
This is the most powerful aspect of the tool. It calculates the relationship between Effort (CVD) and Result (Price Move).
The Baseline: The script calculates a rolling statistical baseline (Standard Deviation) of how much price should move for a given amount of Delta.
Absorption (Hidden Buying): If we see massive Aggressive Selling (Negative CVD) but price refuses to drop (or drops significantly less than the statistical model predicts), the script identifies this as Passive Buying.
Distribution (Hidden Selling): If we see massive Aggressive Buying (Positive CVD) but price refuses to rise, the script identifies this as Passive Selling.
📊 The Dashboard Breakdown
The on-screen dashboard is your command center. It updates in real-time to provide a snapshot of the market's internal mechanics.
Section 1: Flow Analysis
This section analyzes the current session's behavior.
Flow Type: Categorizes the market state using algorithmic logic.
Aggressive Buying/Selling: The market is trending, and aggressive participants are winning.
Strong Accumulation/Distribution: A reversal signal. Aggressive participants are trapped, and passive whales are absorbing order flow.
Flow vs. Price: Detects divergences instantly.
Bullish Divergence: Net Flow is Positive, but Price is down (indicates manipulation or temporary suppression).
Bearish Divergence: Net Flow is Negative, but Price is up (indicates a "trap" move).
Section 2: Volume Breakdown
A detailed ledger of the day's activity.
Aggressive Buy/Sell: Market orders executing at the ask/bid. This represents "Impatience."
Passive Buy/Sell: The estimated volume of Limit Orders absorbing the aggressive flow. This represents "Intent."
Net Flow: The mathematical sum of all buy pressure minus sell pressure.
Section 3: Net Positioning (Multi-Day)
Markets don't happen in a vacuum. This section looks back (default 5 days) to see the accumulated inventory.
Bias: Are we in a multi-day accumulation or distribution phase?
Activity Type:
High Hidden Activity: Indicates a fighting market with heavy limit orders (choppy/reversal prone).
Mostly Aggressive: Indicates a trending market with low resistance.
Section 4: Predictive Model (Machine Learning)
The script features an embedded Logistic Regression Model.
It trains on the last N days of Flow Data (CVD, Net Aggressive, Net Passive, Passive Ratios).
It outputs a Probability Score (0% to 100%) regarding the likelihood of an UP close for the current session.
Note: This is a probability model based on order flow history, not a guarantee. Use it as a bias confirmation tool.
🧠 Educational: How to Trade With This
Strategy 1: The "Absorption" Reversal
Context: Price hits a major resistance level.
Look at the Dashboard: You want to see "Flow Type" switch to "Strong Distribution".
The Logic: Price is rising, and aggressive buyers are hitting the ask. However, the script detects that for every buy order, a passive seller is absorbing it. Price stops moving up despite high volume.
The Trigger: When Price creates a lower low on the chart while the dashboard shows Distribution, this is a high-probability short entry.
Strategy 2: The Flow Divergence
Context: Price is trending down.
Look at the Dashboard: Price is making new lows, but the "Net Flow" is turning Green (Positive), or the "Cum CVD" is sloping upwards.
The Logic: This is "Effort vs. Result." Sellers are exhausted. They are pushing price down, but the net flow is shifting to buyers.
The Trigger: Enter Long on the first structure break.
Strategy 3: Trend Continuation
Context: Market is opening or breaking a range.
Look at the Dashboard: You want "Full Alignment."
Signals: "Flow Type" says Aggressive Buying, Net Flow is Positive, and the Predictive Model shows >60% Bullish Probability.
The Logic: There is no passive resistance. Aggressive buyers are pushing price up freely.
The Trigger: Buy pullbacks.
⚙️ Settings & Configuration
Cluster Size: The number of 1-second bars to group together.
Use 60 (1 min) for Scalping.
Use 300 (5 min) for Day Trading.
Average Length: The baseline for statistical calculations. Higher numbers = smoother baselines but slower adaptation.
Detection Settings:
Passive Multiplier: Adjusts the sensitivity of the absorption estimation. 1.0 is standard. Increase to 1.5 if you only want to see extreme anomalies.
Daily Tracking:
History Days: How many days of data to display in the table. Note: Due to TradingView data limits, keeping this between 3-5 days ensures the most stability.
⚠️ Important Technical Limitations
Please read this section carefully to understand the constraints of the Pine Script environment:
Data Depth (The 100k Limit): TradingView limits request.security_lower_tf to approximately 100,000 intrabars.
This means the script can typically only "see" the last 3 to 5 days of true 1-second data.
If you set History Days or Training Days too high (e.g., 20 days), the script may return 0 values for older dates because the high-resolution data simply doesn't exist on the server.
Approximation of Ticks: While 1-second data is extremely precise, it is still an aggregation. In extremely high-volatility events (like CPI releases), multiple ticks happen inside one second. The script attributes the volume of that second based on the close relative to the open/prev close. It is the best approximation possible on TradingView, but not a replacement for Level 3 Tick Data feeds.
Calculation Time: This is a heavy script. On lower-end devices or when loading on many charts simultaneously, you may experience a "Calculation took too long" warning. If this happens, reduce the History Days to 3.
🛡️ Disclaimer
No Repainting: This indicator uses strict historical referencing and does not repaint closed clusters.
Not Financial Advice: This tool provides data visualization. Order flow is a subjective art. Always manage your risk.
Author's Note:
I built this tool because I wanted the power of Order Flow footprint charts without the visual clutter. By using statistical baselines to detect passive liquidity, we can finally see the "invisible hand" of the market directly on our TradingView charts. I hope this adds value to your trading.
👍 If you find this script useful, please leave a Boost and a Comment below!
Spearman Correlation🔗 Spearman Correlation – Ranked Relationship Tracker
Overview:
This indicator calculates and plots the Spearman Rank Correlation Coefficient between the current chart’s asset and a custom comparison ticker (the example shown is BTC vs the OTHERS market cap for crypto). Unlike Pearson correlation, which measures linear relationships, Spearman correlation captures monotonic (ranked) relationships—making it better suited for analysing assets that move in sync but not necessarily in a linear fashion.
🧠 What It Does:
Computes ranked correlation between two assets over a user-defined lookback period
Smooths the correlation curve for better readability
Visually shades the background by correlation strength and direction:
🟩 Strong Positive (+0.5 to +1)
🟨 Weak Positive (+0.1 to +0.5)
⬜ No Correlation (–0.1 to +0.1)
🟧 Weak Negative (–0.5 to –0.1)
🟥 Strong Negative (–1 to –0.5)
⚙️ User Inputs:
Lookback Period: Number of bars used to calculate correlation
Comparison Ticker: Choose any asset to compare against
Shading Toggles: Customize which correlation zones are highlighted
📈 Use Cases:
Identify evolving relationships between assets (e.g., BTC vs DXY, ETH vs SPX)
Spot when assets become inversely correlated or lose correlation entirely
Track regime shifts where traditional relationships break down or re-align
Use alongside trend or momentum strategies to add a cross-asset confirmation layer
🔍 Interpreting the Correlation:
+1 → Perfect positive (ranks match exactly)
+0.5 to +1 → Strong positive relationship
+0.1 to +0.5 → Weak but positive relationship
–0.1 to +0.1 → Essentially uncorrelated
–0.5 to –0.1 → Weak negative correlation
–1 to –0.5 → Strong inverse relationship
–1 → Perfect negative (rankings are completely opposite)
🧪 Technical Notes:
Calculation uses ranked returns to better reflect monotonic relationships
Smoothed with a simple moving average (SMA) for stability
Arrays are managed internally to maintain performance and adaptability
This script is ideal for traders seeking deeper insight into cross-asset dynamics, portfolio hedging, or timing divergence-based strategies.
Directional Comparisons - Two Tickers📊 Directional Comparisons – Two Tickers
Overview:
This tool allows you to visually and statistically compare the directional behaviour of any two assets on any chart timeframe. It identifies and color-codes each bar based on how both the current asset and your chosen comparison asset performed in that period (e.g., both up, both down, diverging). A statistical summary table dynamically updates in the corner of your chart, tracking the probability and streak performance of each condition.
🛠 How It Works:
Each candle is analysed and color-coded based on the relationship between the current chart's asset and a comparison asset of your choice:
✅ Green – Both tickers closed higher (bullish alignment)
🔻 Red – Both tickers closed lower (bearish alignment)
🔷 Blue – Current ticker up, comparison ticker down (positive divergence)
🟧 Orange – Current ticker down, comparison ticker up (negative divergence)
You can toggle each colour condition on/off independently.
📈 Statistical Table (Top Right):
For the candles in the visible chart range, the indicator displays:
The frequency (probability) of each condition
Longest, shortest, and average streaks for each condition
Average % change for both the current and comparison asset under each scenario
All stats auto-update as you zoom or scroll through the chart.
🔧 User Inputs:
Comparison Ticker: Choose any ticker symbol to compare against the current chart
Toggle Conditions: Enable or disable individual directional conditions (color-coded)
✅ Use Cases:
Spot high-probability alignment zones between two assets (e.g., BTC vs ETH, SPX vs VIX)
Identify divergence opportunities for trading signals
Analyse historical relationships and co-movements between assets
Perform correlation streak studies directly on the chart
🔍 Notes:
The script works across all timeframes (1min to monthly).
Stats only consider visible bars on your chart for responsiveness.
Ideal for pair traders, macro analysts, or anyone interested in cross-asset relationships.






















