NQ Statistical MapperNQ Statistical Mapper
CRITICAL DISCLAIMER - READ FIRST
WARNING: THIS INDICATOR IS EXCLUSIVELY FOR NQ (NASDAQ-100 E-MINI FUTURES) ONLY
All statistics displayed in this indicator are HARD-CODED values derived from a comprehensive analysis of 12 years (2013-2025) of 1-minute NQ futures data. These statistics are calculated offline using Python and embedded directly into the indicator code.
These probabilities DO NOT apply to any instrument other than NQ
What This Indicator Does
The NQ Statistical Mapper is a data-driven trading tool that displays historical probability statistics for intraday NQ price behavior based on overnight session structure and opening positioning. Rather than generating signals, it provides context by showing:
Three trading sessions with visual boxes: Asia (8PM-2AM), London (2AM-8AM), and New York (8AM-4PM) Eastern Time
Key price levels with historical hit rate percentages showing the probability these levels are touched during the NY cash session (8AM-4PM)
Context-aware statistics that change based on current market conditions
Session range analysis showing whether Asia and London ranges are unusually large or small compared to recent history
Core Methodology and Statistical Foundation
Pattern Detection System
The indicator automatically detects one of four overnight session patterns based on how the London session (2AM-8AM) interacts with the Asia session (8PM-2AM):
London Engulfs Asia: London high is greater than Asia high AND London low is less than Asia low
Asia Engulfs London: Asia high is greater than or equal to London high AND Asia low is less than or equal to London low
London Partial Up: London high is greater than Asia high BUT London low is greater than or equal to Asia low (took out Asia high only)
London Partial Down: London low is less than Asia low BUT London high is less than or equal to Asia high (took out Asia low only)
Each pattern has distinct statistical characteristics that influence NY session behavior.
Conditional Probability Framework
The indicator uses a conditional probability approach where statistics adapt based on:
Primary Condition: Where does NY open (8:00 AM) relative to the London session midpoint?
"NY opens above London midpoint"
"NY opens below London midpoint"
This single condition dramatically changes the probabilities. For example:
When NY opens above London midpoint: 76.68% chance NY hits the London high before the London low during 8AM-4PM
When NY opens below London midpoint: 73.32% chance NY hits the London low before the London high during 8AM-4PM
Secondary Condition: The overnight pattern further refines these probabilities. Each combination of "NY position vs London midpoint" plus "overnight pattern" has unique hit rate statistics calculated from the 12-year dataset.
"Hit First" Statistics Explained
The table displays "Hit High First" and "Hit Low First" percentages. These answer the question: "During the NY cash session (8AM-4PM), if price eventually touches both the London high AND London low, which one does it touch FIRST?"
Example interpretation:
Hit High First: 76.68% means that in 76.68% of historical days with this setup, price touched the London high before touching the London low
Hit Low First: 22.48% means London low was touched first
The remaining approximately 1% represents days where neither level was hit during the NY session
This is fundamentally different from asking "will price go up or down" - it is about the sequence of range expansion during the NY session.
Displayed Levels and Their Meanings
Session Highs/Lows (Solid Lines)
These appear when each session completes and extend through the NY session:
Asia High/Low (Orange): The highest and lowest prices during 8PM-2AM EST
London High/Low (Blue): The highest and lowest prices during 2AM-8AM EST
Each level shows its hit rate percentage - the probability that NY session price (8AM-4PM) will touch that level, based on the current pattern and NY opening position.
Hourly Midpoint Levels (Dashed Gray Lines)
Three specific hourly levels with remarkably high hit rates:
7-8 AM Midpoint: Average of high and low during the 7-8 AM hour. Hit rates consistently above 93-94%, essentially sitting at the 8 AM open price (mean distance: -0.001%)
Midnight Open: The opening price at midnight EST. Hit rates vary from 62-87% depending on pattern and setup
2-3 AM Midpoint: Average of high and low during the 2-3 AM hour. Hit rates range from 67-92%
These levels are derived from mean-reversion behavior - price tends to revisit certain overnight reference points during the NY session.
Session Midpoints (Dotted Lines)
Optional display of Asia and London session midpoints. These lines terminate when their respective sessions end, providing additional reference levels for session positioning.
Statistics Table Breakdown
The table displays five sections of information:
1. SETUP Section
Shows whether "NY opens above/below London midpoint"
Displays the detected overnight pattern (1 of 4 types)
Sample size: Number of historical days matching this exact setup
Hit High First / Hit Low First: Directional bias percentages
2. HIT RATES (8AM-4PM) Section
Shows probability that each level gets touched at any point during the NY cash session:
7-8 AM Midpoint: Almost always touched (93-97% depending on pattern)
Midnight Open: Varies significantly (62-87%) based on whether the overnight pattern is aligned or contrary to NY's opening position
2-3 AM Midpoint: Strong hit rates (67-92%)
These are independent probabilities - they do not predict which is hit first, just whether each level gets visited.
3. ASIA RANGE Section
Real-time comparison of today's Asia session range versus recent history:
Sessions Captured: Shows how many sessions are in the rolling calculation (e.g., "18 / 50" = 18 sessions captured out of 50 requested). This alerts users if their chart history is insufficient
Current Range: Today's Asia high minus Asia low in points
Mean Range: Average range over the captured sessions
Percentile Rank: Where today's range falls in the distribution
80th percentile (red background): Unusually large range - top 20% of days
60-80th percentile (light gray): Above average
20-60th percentile (white): Normal range
Less than 20th percentile (light blue): Unusually small range - bottom 20% of days
4. LONDON RANGE Section
Identical structure to Asia Range section, analyzing the London session's range characteristics.
Why Percentile Rank Instead of Standard Deviation?
Intraday ranges exhibit right-skewed distributions with fat tails (volatility spikes create extreme outliers). Percentile rank is distribution-free and robust to these characteristics, providing more reliable identification of unusual ranges than z-scores or standard deviations.
How To Use This Indicator
For Context and Confluence
This is not a standalone trading system. The indicator provides statistical context to support other analysis:
Understanding Session Bias: If the table shows 76% probability of hitting the session high first, you know there is a statistical lean toward upside range expansion
Target Setting: If trading a breakout above the overnight high, knowing that Asia high gets hit 75% of the time helps assess target viability
Entry Timing: The 7-8 AM midpoint's 94% hit rate makes it an excellent re-entry or scaling level
Range Expansion Assessment: Percentile rankings help identify whether overnight sessions showed abnormal volatility, which may influence NY session behavior
Pattern-Specific Insights
London Partial Up plus NY Opens Below London Midpoint:
Midnight open hit rate jumps to 87.82% (strong mean reversion)
Suggests counter-trend reversal back toward overnight lows is likely
London Partial Down plus NY Opens Above London Midpoint:
Midnight open hit rate is 86.30%
Mirror pattern - reversion toward overnight highs
Asia Engulfs London Pattern:
Very high hit rates (85-98%) across all levels
Suggests consolidation/mean reversion during NY session rather than directional expansion
Typical Workflow
8:00 AM: Review the statistics table - which pattern occurred? Where did NY open relative to London midpoint?
Check Hit Rates: Note which levels have the highest probabilities of being touched
Assess Range Percentiles: Are Asia/London ranges unusually large or small? High percentiles may indicate already-extended ranges
Combine With Your Strategy: Use the statistics as confluence with your technical analysis, support/resistance, or order flow
Customization Options
Trading Sessions Settings
Session Visualization:
Toggle each session on/off independently
Customize colors for each session (New York, London, Asia)
Adjust background transparency using "Range Area Transparency" slider (0-100, default 90)
Show/hide session outlines with "Range Outline" checkbox
Each session has three customizable parameters on the same line:
Checkbox to enable/disable the session
Text field to rename the session label if desired
Color picker to select the session's display color
Hit Rate Levels Settings
Master Controls:
"Show Hit Rate Levels" - Master toggle to show or hide all level lines and labels
Individual Level Toggles:
"7-8 AM Midpoint" - Toggle the 7-8 AM hour midpoint level
"Midnight Open" - Toggle the midnight opening price level
"2-3 AM Midpoint" - Toggle the 2-3 AM hour midpoint level
Hourly Level Styling (applies to 7-8 AM Mid, Midnight, and 2-3 AM Mid):
"Hourly Level Color" - Color picker for all three hourly levels
"Hourly Level Line Width" - Thickness of hourly level lines (1-5, default 1)
"Hourly Level Line Style" - Choose between Solid, Dashed, or Dotted lines (default Dashed)
Session High/Low Styling (applies to Asia High/Low and London High/Low):
"Session High/Low Line Width" - Thickness of session extreme lines (1-5, default 1)
"Session High/Low Line Style" - Choose between Solid, Dashed, or Dotted lines (default Solid)
Additional Options:
"Show Session Midpoints" - Toggle display of Asia and London midpoint reference lines (dotted lines that end when each session completes)
"Label Text Size" - Size of percentage labels on all levels (tiny, small, normal, large, default small)
Table Settings
Statistics Table Controls:
"Show Statistics Table" - Master toggle to display or hide the entire statistics table
"Stats Table Position" - Choose from 9 positions on the chart:
Top: Top Left, Top Center, Top Right
Middle: Middle Left, Middle Center, Middle Right
Bottom: Bottom Left, Bottom Center, Bottom Right
"Stats Table Size" - Text size within the table (Auto, Tiny, Small, Normal, Large, Huge, default Small)
"Sessions for Stats Calculation" - Number of historical sessions to use for percentile calculations (5-100, default 50)
Lower values (20-30): More responsive to recent market conditions
Higher values (50-100): More stable baseline, requires more chart history
The table displays "Sessions Captured" to show how many sessions were actually available
Important Limitations and Considerations
1. This Is Historical Data, Not Prediction
The statistics show what happened in the past given similar setups. Markets evolve, regimes change, and past probability does not guarantee future outcomes. A 75% hit rate means that in 25% of historical cases, the level was NOT hit.
2. Chart History Requirements
TradingView imposes data limits:
5-minute chart: Approximately 10 days of history (enough for minimal statistics)
1-minute chart: Approximately 2-3 days of history (insufficient for percentile calculations)
Use 5-minute or higher timeframes to ensure adequate session capture
The table displays "Sessions Captured" (e.g., 18/50) to alert you when your chart history is limited.
3. Session Timing Is Fixed (EST)
All sessions use America/New_York timezone:
Asia: 8PM-2AM
London: 2AM-8AM
NY: 8AM-4PM
These times do not adjust for daylight saving changes in other regions. The definitions match CME NQ futures trading hours.
4. The Statistics Are From 2013-2025 Data
The 12-year analysis period includes:
Multiple market regimes (bull/bear/sideways)
Various volatility environments
QE, taper tantrums, COVID, 2022 bear market, 2023-2024 rally
However, it is still a limited sample. Future market structure changes (algorithmic trading evolution, regulatory changes, etc.) may alter these probabilities over time.
5. No Real-Time Calculation
This indicator does not recalculate statistics based on your chart's data. It displays pre-calculated probabilities. The only real-time calculations are:
Which pattern occurred today
Where NY opened relative to London midpoint
Current session ranges and their percentile ranks (based on your chart's recent history)
Statistical Methodology Details
Data Source
Instrument: NQ (Nasdaq-100 E-mini Futures) continuous contract
Timeframe: 1-minute bars
Period: January 2013 - January 2025 (12 years)
Sample Size: 3,132 trading days analyzed
Analysis Approach
Each trading day was classified by overnight pattern (4 types). NY opening position vs London midpoint was determined. For each combination (4 patterns times 2 positions equals 8 scenarios), the following was measured:
How often each level (session highs/lows, hourly midpoints) was touched during 8AM-4PM
Which session extreme (high or low) was hit first
Mean distance from 8 AM open to each level
Session ranges were measured for percentile analysis. All percentages were rounded to two decimal places for display.
Why These Specific Levels?
The levels were not chosen arbitrarily:
Session highs/lows: Natural support/resistance from overnight price discovery
7-8 AM midpoint: The final hour before NY open often establishes the opening range balance point
Midnight open: Represents the "true" start of the trading day (6PM-5PM structure)
2-3 AM midpoint: Captures early London price action balance
Testing showed these levels had the highest and most consistent hit rates across different patterns and setups.
Technical Implementation Notes
Language: Pine Script v5
Drawing Objects: Uses boxes for session visualization, lines for levels, labels for percentages, table for statistics
Performance: Optimized for real-time use with max limits set (500 boxes, 500 lines, 500 labels)
Calculations Per Bar:
Session detection (3 sessions)
Hourly detection (3 hourly periods)
Pattern classification
Conditional probability lookup
Percentile rank calculation (for session ranges)
All heavy statistical analysis was performed offline. The indicator only performs simple lookups and real-time range tracking.
Educational Value
Beyond trading application, this indicator demonstrates:
Conditional Probability: How market context (opening position, overnight structure) dramatically changes probabilities
Mean Reversion Dynamics: Why certain levels (7-8 AM midpoint, midnight) have such high revisit rates
Pattern Recognition: How overnight session relationships create different NY session behaviors
Distribution Analysis: Using percentile ranks instead of parametric statistics for skewed data
Understanding these concepts helps traders develop more sophisticated market models beyond simple "support and resistance."
Final Notes
This indicator is a tool for informed decision-making, not a crystal ball. It answers questions like:
"What typically happens in this setup?"
"How often does price revisit these levels?"
"Is this overnight range unusual?"
It does NOT answer:
"Should I buy or sell right now?"
"Where will price be at 4 PM?"
"What will happen tomorrow?"
Combine these statistics with proper risk management, sound trading strategy, and awareness that any individual day can deviate significantly from historical norms. The power of this indicator lies in providing objective, data-driven context to complement your analysis - not in replacing your judgment.
Statistics
Day/Month Returns Analysis [theUltimator5]This indicator calculates the average returns for day of the week, months of the year, and each Friday of the month, then gives a visualization of the average returns in green/red bars as well as the average percentage move.
You can select from (3) options.
1) Day of the week. This shows the average returns for each day of the week calculated back as far as your chart history goes. For crypto, it calculates all 7 days of the week. If not crypto, it does Monday through Friday
2) Month of the year. This shows the average returns for each month. Self explanatory
3) Friday of the month. This is a niche setting that lets you see the average returns of each Friday of the month, to track if there is any OPEX related consistency.
You can also set the start date for the indicator to start calculating from in the options. If there is a certain date that a symbol starts acting differently and you want to only calculate from that point forwards, you can.
The visuals appear as a table which can be repositioned to whichever section of your screen you would like.
This indicator works best on the daily timeframe since lower timeframes may not have enough bars back in history to calculate enough to make an average.
Hawks NY Midnight OpenPlots the New York Midnight Open price with configurable horizontal and vertical reference lines, session-based timing, and adjustable extensions.
Central Bank Liquidity Gap IndicatorThis indicator measures the gap between global liquidity growth and stock market growth to identify potential buying opportunities.
Liquidity drives markets. When central banks print money, that liquidity eventually flows into stocks and other assets. If we spot when liquidity growth is outpacing market growth, we can spot moments when the market is "due" to catch up.
I like this quote:
Earnings don't move the overall market; it's the Federal Reserve Board... focus on the central banks and focus on the movement of liquidity."
- Stanley Druckenmiller
How Central Bank Liquidity Gap Indicator Works
The indicator calculates a simple divergence:
Divergence = Liquidity Growth % − S&P 500 Growth %
Green bars = Liquidity is growing faster than the market (bullish)
Red bars = Market is growing faster than liquidity (less bullish)
Multi-Country M2 Money Supply
Unlike basic M2 indicators, this one lets you combine money supply data from multiple economies, including US, UK, Canada, China, Eurozone, Switzerland and Japan.
Each country's M2 is automatically weighted by its actual size (converted to USD). Larger economies have more influence on the global liquidity picture.
I've added a discount for China. China's M2 weight is reduced by 50% to account for capital controls that limit how much Chinese liquidity flows into global markets and into the US market.
Fed Net Liquidity
You can also blend in Fed Net Liquidity for a more precise US liquidity measure:
Net Liquidity = Fed Balance Sheet − Treasury General Account − Reverse Repo
This captures the actual liquidity the Fed has injected into financial markets, not just the broad money supply.
How To Read It
The Buy Zone (5%+ Divergence)
When the divergence exceeds +5%, the indicator enters the "Buy Zone" (highlighted with green background). This means liquidity is significantly outpacing market growth — historically a good buy signal.
The Support Table
The info table shows:
Component weights: How much each country's M2 contributes
Corr w/ SPX: Current correlation between liquidity and SPX (are they moving together?)
Leads SPX by X: Does past liquidity predict future SPX moves? (higher = more predictive)
Divergence %: Current divergence value
Signal
Correlation Stats
Corr w/ SPX: Measures if liquidity and SPX are moving in sync right now
Leads SPX: Measures if liquidity changes predict future SPX moves. A positive value here suggests liquidity is a leading indicator.
Potential Use Cases
Long-term investing: Wait for 5%+ divergence (buy zone) to accumulate index funds, ETFs, or stocks
Leveraged ETFs: Use buy zone signals to time entries into UPRO, TQQQ, SSO (higher risk, higher reward)
Crypto: Bitcoin and crypto markets also correlate with global liquidity — use this for BTC accumulation timing
Risk management: Avoid adding positions when divergence is deeply negative
Important Notes
This is a long-term indicator and not for daytrading. It works best used on Daily/Weekly timeframes
It identifies accumulation zones and not precise bottoms
Truly yours, Henrique Centieiro
Inspired by the relationship between M2 money supply and market performance, enhanced with multi-country liquidity tracking and Fed balance sheet analysis.
Let me know if you have questions/suggestions.
Volatility & Probability by Hour/DayVolatility & Probability by Hour/Day
Analyzes historical candle data to find statistically significant time-based patterns. Tracks green candle probability, volatility, and average returns broken down by hour (UTC), day of week, and their combinations.
What It Shows:
Hourly Table: P(Green), edge, volatility, and average return for each hour (00:00-23:00 UTC)
Day of Week Table: Same metrics aggregated by day (Sun-Sat)
Top Combinations: The 5 best bullish and 5 best bearish day+hour slots ranked by edge
Key Metrics:
P(Grn): Historical probability the candle closes green
Edge: Deviation from 50% (how tradeable the bias is)
Vol%: Average candle range as percentage of price
N: Sample size
Use Cases:
Identify optimal entry windows with statistical edge
Avoid low-edge, high-volatility periods (noise)
Find specific day+hour combinations with compounding edges
Time trades around recurring market patterns
Notes:
All times in UTC
Current period highlighted with ►
Best results on liquid assets with sufficient history
Edges are historical and not guaranteed to persist
Asia Range + OB Zones + AlertsTrail run of script built with chatgpt and clude to mark hhs lows and OB's
Ticker Dashboard [rogman]TICKER DASHBOARD INDICATOR
Overview
A comprehensive real-time market dashboard that displays critical trading information in a compact, color-coded table overlay. Designed for quick at-a-glance analysis of price action, trend direction, market conditions, and relative performance. Automatically detects asset type (stocks, futures, CFDs, forex, crypto) and adjusts session display accordingly.
Table Layout
ROW 1: PRICE & MARKET STATUS
Trend Dot: 🟢 when 8 EMA > 21 EMA (bullish), 🔴 when below (bearish)
Ticker: Current symbol, colored green/red based on change from previous close
Price: Real-time price, updates during extended hours
Chg $: Dollar change from previous day's close (updates in afterhours)
VWAP: ▲V (green) if price above VWAP, ▼V (red) if below
S:/Q:: SPY and QQQ real-time status — 🟢 up from previous close, 🔴 down from previous close
ROW 2: MOVING AVERAGES & RELATIVE STRENGTH
RS 8 EMA 21 EMA 50 SMA
RS (Relative Strength vs SPY):
⊕ (green): Outperforming SPY by >0.5%
⊖ (red): Underperforming SPY by >0.5%
⊜ (gray): Neutral (within ±0.5%)
8/21/50 MAs: Values color-coded green if price above, red if below
ROW 3: SESSION, RANGE & VOLUME
Session - Low - Range Bar - High - Vol:██████
Session Indicator (Auto-detects Asset Type)
Stocks:
IconStatusHours (ET)🔔Market Open9:30am - 4:00pm⏰Pre-Market4:00am - 9:29am🌙After-Hours4:01pm - 8:00pm⛔️Closed8:00pm - 4:00am, Weekends
Futures & CFDs:
IconStatusHours (ET)🔔OpenSunday 6pm - Friday 5pm (with daily 5-6pm break)⛔️ClosedFriday 5pm - Sunday 6pm, Daily 5-6pm maintenance
Forex & DXY:
IconStatusHours (ET)🔔OpenSunday 5pm - Friday 5pm (24/5, no daily break)⛔️ClosedFriday 5pm - Sunday 5pm
Crypto:
IconStatus🔔Always Open (24/7)
Range Bar
Visual representation showing current price position within daily high/low range using a ║ marker.
Volume Blocks
6 blocks compared to 30-day average volume:
Volume % Color Block Fill
<75% avg🔴 RedFills 1 block per 10% below 75% (e.g., 24% = 6 red blocks)
75-125% avg⬜ GrayFills 1-6 blocks as volume increases through normal range
>125% avg🟢 GreenFills 1 block per 10% above 125%
ROW 4: VOLUME DETAILS (Optional)
Vol: XXM 30D Avg: XXM Ratio: X%
Vol: Current daily volume (in millions)
30D Avg: 30-day average volume (in millions)
Ratio: Current volume as percentage of average
Toggle on/off in settings via "Show Volume Row"
Settings
Customize table background and border colors
Position table in multiple locations on chart
Customize text color and size
Asset Type Detection
The indicator automatically detects the asset type and adjusts behavior
Example Displays
Stock During Market Hours
┌────┬──────┬────────┬─────────┬────┬─────────────┐
│ 🟢 │ TSLA │ 421.81 │ +$12.50 │ ▲V │ S:🟢 Q:🟢 │
├────┼──────┼────────┼─────────┼────┼─────────────┤
│ ⊕ │ 8: 418.50│ 21: 415.20 │ 50: 410.35 │
├────┼──────┼────────┼─────────┼────┼─────────────┤
│ 🔔 │ 409 │ ─────║──│ 425 │Vol: │ ███░░░ │
└────┴──────┴────────┴─────────┴────┴─────────────┘
Stock During Pre-Market
┌────┬──────┬────────┬─────────┬────┬─────────────┐
│ 🔴 │ AAPL │ 178.25 │ -$2.30 │ ▼V │ S:🔴 Q:🔴 │
├────┼──────┼────────┼─────────┼────┼─────────────┤
│ ⊖ │ 8: 179.80│ 21: 181.50 │ 50: 183.20 │
├────┼──────┼────────┼─────────┼────┼─────────────┤
│ ⏰ │ 177 │ ──║──── │ 180 │Vol: │ █░░░░░ │
└────┴──────┴────────┴─────────┴────┴─────────────┘
Crypto (Always Open)
┌────┬──────┬──────────┬─────────┬────┬─────────────┐
│ 🟢 │ BTC │ 67,450 │ +$1,250 │ ▲V │ S:🟢 Q:🟢 │
├────┼──────┼──────────┼─────────┼────┼─────────────┤
│ ⊕ │ 8: 66,800│ 21: 65,500 │ 50: 63,200 │
├────┼──────┼──────────┼─────────┼────┼─────────────┤
│ 🔔 │ 65,000 │ ──────║── │ 68,000 │Vol: │ ████░░ │
└────┴──────┴──────────┴─────────┴────┴─────────────┘
Futures (Closed)
┌────┬──────┬─────────┬─────────┬────┬─────────────┐
│ 🔴 │ ES1! │ 5,425 │ -$15.00 │ ▼V │ S:🔴 Q:🔴 │
├────┼──────┼─────────┼─────────┼────┼─────────────┤
│ ⊜ │ 8: 5,430 │ 21: 5,445 │ 50: 5,480 │
├────┼──────┼─────────┼─────────┼────┼─────────────┤
│ ⛔️ │ 5,400 │ ───║──── │ 5,450 │Vol: │ ██░░░░ │
└────┴──────┴─────────┴─────────┴────┴─────────────┘
Technical Notes
Session detection uses timenow for real-time accuracy (not bar time)
All session times are based on America/New_York timezone
Volume calculations use daily timeframe regardless of chart timeframe
Moving averages calculated on current chart timeframe
Price color reflects change from previous close (not day open)
Daily ATR & Market Cap DisplayDaily ATR & Market Cap Display:
Displays daily ATR percentage with color-coded volatility alerts (🟢 0-4%, 🟡 4-8%, 🔴 8%+) and market cap with size indicators (🔴 <1B, 🟡 1-5B, 🟢 5B+).
Features:
- Daily ATR remains constant across all timeframes
- Customizable position (9 locations + vertical offset)
- Adjustable text size and colors
- Clean, fixed on-screen display
1M / 3M / 6M / 12M Performance Box─────────────────────────────────────────────────────────────
1M / 3M / 6M / 12M Performance Box
─────────────────────────────────────────────────────────────
A compact on-chart dashboard that shows multi-horizon price performance
(1M / 3M / 6M / 12M) as percentage change, using DAILY data for consistency
across all chart timeframes (intraday, daily, weekly).
What it does
• Calculates % performance over 1, 3, 6, and 12 month horizons.
• Displays results in a clean table overlay on the chart.
• Automatically color-codes performance:
- Green = positive
- Red = negative
- Gray = neutral / not available
Month definition (user selectable)
• Calendar days mode:
1M = 30 days, 3M = 90 days, 6M = 180 days
• Trading days mode:
1M = 21 TD, 3M = 63 TD, 6M = 126 TD
• 12M is calculated as ~365 days in both modes.
Customization
• Table position (top/bottom + left/right)
• Decimal precision
• Fully customizable colors (header, labels, positive/negative/neutral cells)
• Adjustable background opacity
• Optional header with symbol + timeframe
Use cases
• Quick trend/context check before entries
• Relative strength snapshot across time horizons
• Cleaner decision-making without adding clutter
Notes
• Uses daily close/time via request.security() for stable results.
• Displays "n/a" when a reference value is not available.
─────────────────────────────────────────────────────────────
SPX SPY 5Min Lock🔹 DESCRIPTION (Public Library)
This indicator overlays SPX price levels directly onto the SPY chart by converting SPX levels into SPY prices using a session-locked SPY/SPX ratio.
Instead of mentally translating SPX levels, you see them mapped precisely on SPY, where you actually trade.
How it works
• Calculates the SPY-to-SPX price ratio
• Locks the ratio at the first 5-minute RTH candle close (9:35am ET)
• Uses that fixed ratio for the entire session
• Converts SPX levels into accurate SPY-equivalent prices
• Draws clean labels (and optional short stubs) directly on SPY
Why the 5-minute lock
SPY and SPX can drift slightly during the day. Locking the ratio at 9:35am creates stable, non-moving levels that stay consistent throughout RTH, making them far more usable for intraday trading.
Best use cases
• SPY / SPX options traders
• Index-based level traders
• GEX, gamma, and macro level mapping
• Traders who think in SPX but execute in SPY
Customization
• Adjustable SPX level spacing (5 / 10 / 25)
• Number of levels above and below price
• Label size and offset
• Live or Locked ratio mode
• Optional short line stubs
• Info table with ratio and lock status
RSquared (log prices)Rolling Trend R² measures the strength of trends using a rolling R² calculation on log prices. Values near 1 indicate a strong, persistent trend, while low values signal choppy or mean-reverting conditions. Includes regime highlighting, reference levels, and an info panel for quick market state identification.
TSX Sector ETF Overlay// --- Plot Data with Standard Colors ---
plot(xiu, title="TSX 60", color=color.white, linewidth=2)
plot(xfn, title="Financials", color=color.blue, linewidth=2)
plot(xeg, title="Energy", color=color.orange, linewidth=2)
plot(xma, title="Materials", color=color.yellow, linewidth=2)
plot(xgd, title="Gold Miners", color=color.yellow, linewidth=1)
plot(xit, title="Tech", color=color.purple, linewidth=2)
plot(xre, title="REITs", color=color.red, linewidth=2)
plot(xut, title="Utilities", color=color.green, linewidth=2)
plot(xst, title="Staples", color=color.teal, linewidth=2)
ATLAS_COREShared utility library for the ATLAS Trading Intelligence Suite. Provides brand colors, math utilities, candle analysis, grading system, visual helpers, and more.
ATR + ADX Expansion This script plots in real time a shorter period ATR compared to a longer period ATR allowing one to see if the market has above or below average volatility. This helps avoid choppy sideways markets.
Secondly, the table shows whether ADX is expanding above its signal line, or contracting below it's signal line further identifying a market in expansion or contraction.
Any set up must be deployed in a healthy market environment, this indicator measures core statistics in real time to allow you see at a glance what state the market is in.
Risk:Reward Tool Pro - MECTRADER (Minimalist)This is an optimized and refined version of my previous Risk/Reward tool. In this update, I have focused on visual clarity by removing all background color fills (shaded zones) to provide a much more minimalist and professional charting experience.
Key Improvements:
Zero Visual Distractions: All linefills have been removed, allowing traders to focus purely on price action and market structure without cluttered backgrounds.
Clean Aesthetics: Take Profit levels feature dashed lines for easy target identification, while Entry and Stop Loss levels remain solid for clear boundary definition.
Performance Focused: The script has been streamlined for a lightweight footprint, making it ideal for users who run multiple indicators simultaneously.
Core Features:
Tick-Based Calculation: Automatically calculate up to 5 Take Profit levels based on ticks.
Quick SL Setup: Simple input for Stop Loss distance.
Dynamic Labels: Real-time price display for every level on the right side of the chart.
Dual Mode: Full support for both Long and Short positions.
Designed for traders who demand technical precision without sacrificing the visual workspace.
ETF-CFD Ratio Bridge
This indicator helps traders visualize the relationship between ETFs and their corresponding CFD/Spot instruments. It allows you to trade on one chart while monitoring the equivalent price levels of the other instrument without mental math or switching screens.
Features
1. Ratio Table
A customizable table displayed on the chart (default: Top Right) that shows:
- Pair : The ETF and CFD pair being monitored.
- Ratio : The calculated price ratio (ETF / CFD).
- Prices : Real-time prices for both instruments.
2. Companion Price Label
A dynamic label that moves with the current price candle.
- Displays the equivalent price of the paired instrument.
- Example : If you are viewing SPY , the label shows the equivalent US500 price next to the candle.
3. Left Virtual Scale
A custom vertical axis drawn on the left side of the chart.
- Shows price levels for the companion instrument corresponding to the current visible chart range.
- Allows you to read "CFD prices" directly on an "ETF chart" (and vice versa) via the Y-axis.
4. Historical Levels lines
Visualizes recent market structure converted to the companion price.
- HH(x) : Highest High of the last X bars (default: 20).
- LL(x) : Lowest Low of the last X bars.
- Dashed lines extend to the right with labels showing the converted price at those key levels.
5. Closed Market Handling
Ensures the indicator remains useful even when the ETF market is closed (e.g., after hours) while the Futures/CFD market is open.
- Automatic Detection : The script detects if the ETF market is closed based on the timestamp.
- Fixed Ratio : Automatically switches to a user-defined "Fixed Ratio" when the ETF is closed.
- Continuous Updates : Prevents values from freezing, calculating a synthetic "Shadow Price" for the closed asset so you can continue to see projected levels based on the live CFD market.
Technical Explanation (The Math)
The indicator functions by calculating a dynamic ratio between the two instruments and using it to convert price levels.
Formulas
1. Calculate Ratio :
Ratio = Price(ETF) / Price(CFD)
2. Conversion :
- ETF Chart → CFD Price :
Equivalent CFD Price = Current ETF Price / Ratio
- CFD Chart → ETF Price :
Equivalent ETF Price = Current CFD Price × Ratio
Example (SPY vs US500)
- Scenario : You are trading on the SPY chart.
- Current Prices :
- SPY (ETF) = $500
- US500 (CFD) = $5000
- Step 1 : Calculate Ratio
- 500 / 5000 = 0.10
- Step 2 : Calculate Equivalent Price
- If SPY moves to $505 , what is the US500 equivalent?
- 505 / 0.10 = 5050
- The indicator will display "US500: 5050" on the label and scale.
Supported Pairs
SPY (AMEX) = US500
GLD (AMEX) = XAUUSD
SLV (AMEX) = XAGUSD
IWM (AMEX) = US2000
QQQ (NASDAQ) = NAS100
IBIT (NASDAQ) = BTCUSD
Settings
- Symbols : Customize the ticker symbols for each pair if your broker uses different names.
- Fixed Ratio (Closed) : Manually adjust the fallback ratio used when the ETF market is closed (default values provided).
- Visuals :
- Toggle Table, Labels, Scale, and Historical Lines on/off.
- Customize colors, text sizes, and positions.
- Right Offset (Bars from Current) : Adjusts how far back (from the current live bar) the Left Virtual Scale is drawn. Increasing this moves the scale further to the left.
- Historical Levels :
- Lookback Length : Number of bars to check for High/Low calculations (Default: 20).
Fixed Risk + Contracts 2.0This is the upgraded version of my Contracts/Risk indicator, released in January 2026. Users will trade responsibly (and never overleverage again!)
1. Pre-Select Your Ticker
MES ES
NQ MNQ
MYM YM
M2K MCL MGC
GC SIL SI
2. Input Current Account Balance and Risk % Each Trade To Grow Your Account
3. Input Stop Amount In Ticks (Use Position Tool for ease)
4. Contract Risk Is Calculated Automatically!
Add to your favourites and comment below if you have any suggestions :)
Herramienta Risk:Reward Pro - MECTRADEROverview: This is an advanced Risk/Reward management tool specifically designed for traders who execute based on Ticks (perfect for Futures like NQ/ES, Gold, or Forex). The main focus of this script is visual clarity and precision.
Key Features:
✅ Clean Visuals (No Dimming): Built using linefill technology with a 92% transparency rate. This ensures the price action remains vibrant and clear. Unlike standard boxes, this tool does not darken or "muddy" the candles when the price enters the zone.
✅ Tick-Based Calculation: Define your Stop Loss and up to 5 Take Profit levels using Ticks for maximum precision.
✅ Toggleable TP Levels: You can enable or disable TP1 through TP5 individually to match your scaling-out strategy.
✅ Dynamic Labels: Automatically displays the level name (Entry, SL, TP) along with the exact price value on the right-side scale.
✅ Long/Short Toggle: Switch between buy and sell setups instantly with a single drop-down selection.
How to use:
Add the script to your chart.
Open Settings and choose your Mode (LONG or SHORT).
Use the Precision Crosshair icon next to "Price Entry" to pick your execution level directly from the chart.
Adjust your Stop Loss and Profit Ticks.
The tool will project your risk zones professionally without interfering with your technical analysis.
Daily DashboardThe Daily Dashboard indicator provides a quick, at-a-glance view of essential daily market statistics directly on your TradingView chart.
Features:
- Daily High & Low: Track the highest and lowest prices of the current trading day.
- Total Daily Volume: Monitor the total trading volume accumulated during the day.
- Previous Day Breakouts: See if today’s price has broken the previous day’s high or low.
- Automatic Updates: All values refresh automatically at the start of a new trading day.
- Pinned Table Layout: Fixed in the top-right corner of the chart for easy reference, independent of price movements.
- Clean Design: White text on a semi-transparent blue background for maximum readability.
Use Cases:
- Day traders needing a quick overview of daily market activity.
- Swing traders monitoring key levels and breakout potential.
- Traders wanting a professional, lightweight dashboard without cluttering the chart.
How It Works:
- Tracks daily high, low, and volume in real time.
- Compares today’s price to the previous day’s high and low to identify breakouts.
- Displays all data neatly in a fixed table pinned to the chart.
Customization:
- Table position is fixed in the top-right corner.
- Background transparency and colors can be adjusted in the script if desired.
Pro Tip:
Combine this dashboard with trend or momentum indicators to create a complete trading setup.
Z-Score ProZ-Score Pro - Complete Description
This is an **advanced mean reversion indicator** that measures how many standard deviations the current price is from its average. It's ideal for identifying market extremes and trading opportunities.
What is the Z-Score?
The Z-Score is a statistical measure that answers: **"How far is the price from normal?"**
- **Z = 0**: Price is at its average
- **Z = +2**: Price is 2 standard deviations above (overbought)
- **Z = -2**: Price is 2 standard deviations below (oversold)
- **Z > +3** or **Z < -3**: Very rare extremes (occur ~0.3% of the time)
Main Features
### 1. **Flexible Calculation**
- **SMA or EMA**: Choose between simple or exponential moving average
- **Adjustable period**: Default 20 periods
- **Smoothing**: Option to smooth the Z-Score to reduce noise
### 2. **Multiple Levels**
- **±1.0**: Caution zone
- **±2.0**: Overbought/Oversold (68% statistical confidence)
- **±3.0**: Rare extremes (99.7% statistical confidence)
### 3. **Trading Signals**
The indicator generates automatic signals based on:
**Buy Signals (BUY)**:
- Z-Score is in oversold zone
- Momentum changes from negative to positive (price stops falling)
**Sell Signals (SELL)** :
- Z-Score is in overbought zone
- Momentum changes from positive to negative (price stops rising)
**Aggressiveness Levels**:
- **Conservative**: Only signals at extremes (±3.0)
- **Normal**: Signals at ±2.0 (recommended)
- **Aggressive**: More frequent signals at ±1.5
### 4. **Divergence Detection**
**Bullish Divergence** (aqua marker):
- Price makes a lower low
- Z-Score makes a higher low
- Indicates weakening of downtrend
**Bearish Divergence** (fuchsia marker):
- Price makes a higher high
- Z-Score makes a lower high
- Indicates weakening of uptrend
---
## Visualization
### Dynamic Colors
- **Bright red**: Z-Score > 2 and rising (strong overbought)
- **Orange**: Z-Score > 1 and rising
- **Purple**: Neutral zone rising
- **Transparent green**: Z-Score falling (any level)
### Background Zones
- **Intense red**: Extreme overbought (Z > 3)
- **Soft orange**: Overbought (Z > 2)
- **Intense green**: Extreme oversold (Z < -3)
- **Soft lime**: Oversold (Z < -2)
### Info Table (top right corner)
Shows in real-time:
- **Current Z-Score**: Numeric value with color
- **Status**: Extreme OB/OS, Overbought, Oversold, or Neutral
- **Momentum**: Rising ↗ or Falling ↘
- **Mean**: Current average value
- **Std Dev**: Current standard deviation
---
## Alert System
The indicator includes **8 types of alerts**:
1. **Buy Signal**: When entry conditions are met
2. **Sell Signal**: When exit conditions are met
3. **Overbought**: When crossing above +2.0
4. **Oversold**: When crossing below -2.0
5. **Extreme Overbought**: When reaching +3.0
6. **Extreme Oversold**: When reaching -3.0
7. **Bullish Divergence**: Potential reversal up
8. **Bearish Divergence**: Potential reversal down
---
## How to Use It
### **Mean Reversion Strategy**
1. Wait for Z-Score to reach ±2 or beyond
2. Wait for BUY/SELL signal (momentum reversal)
3. Enter trade in opposite direction of extreme
4. Exit when Z-Score returns to zero
### **Divergence Strategy**
1. Identify divergence markers (DIV)
2. Confirm with momentum change
3. Enter in direction of divergence
4. Use Z-Score levels as targets
### **Multi-Timeframe Analysis**
- **Short-term** (5-15 min): Scalping with aggressive mode
- **Medium-term** (1H-4H): Swing trading with normal mode
- **Long-term** (Daily): Position trading with conservative mode
---
## Best Practices
**Do**:
- Use in ranging/sideways markets
- Combine with support/resistance levels
- Wait for momentum confirmation
- Use conservative mode in trending markets
**Don't**:
- Trade against strong trends
- Ignore divergences
- Use alone without confirmation
- Over-trade in low volatility
---
## Statistical Background
The Z-Score follows a **normal distribution**:
- **68%** of values fall within ±1 standard deviation
- **95%** of values fall within ±2 standard deviations
- **99.7%** of values fall within ±3 standard deviations
When price reaches Z = ±2, there's a **95% probability** it will revert toward the mean, making it a powerful mean reversion tool.
---
##Customization Options
All aspects are customizable:
- Calculation method and periods
- Visual colors and transparency
- Signal sensitivity
- Alert preferences
- Level thresholds
- Background zones on/off
Wick Ranges (GG)Simple data box that tracks candle wick largest, smallest, and average sizes by price within specified time ranges. Displays labels for upper and lower wicks of current candle.
Helpful if your entry model is entering on the close/open of momentum candles.
-GG
Wick Statistics (Intra-Day)Data box that shows smallest, largest, and average wick point size during specified time ranges.
Entropy Divergence (No Repaint) [PhenLabs]📊 Entropy Divergence (No Repaint)
Version: PineScript™ v6
📌 Description
The Entropy Divergence Scalper (EDS) is a sophisticated trading indicator that applies information theory to market analysis. By calculating Shannon Entropy on price returns, it identifies periods when market behavior becomes more predictable and orderly—the ideal conditions for divergence-based trading.
Traditional divergence indicators generate signals regardless of market conditions, leading to many false signals during chaotic, high-entropy periods. EDS solves this by acting as an intelligent filter: it only triggers signals when entropy drops below your specified threshold, indicating that the market has entered a more structured, tradeable state.
This indicator is built with a strict non-repainting guarantee. All signals use barstate.isconfirmed and only appear after bar close, giving you reliable signals you can trust for live trading.
🚀 Points of Innovation
Shannon Entropy integration measures market randomness using information theory mathematics
Dual divergence engine detects both RSI and Volume divergences simultaneously
Entropy-filtered signals eliminate noise by only triggering in low-entropy (predictable) market conditions
100% non-repainting architecture ensures all signals are confirmed and historically accurate
Multi-layer confirmation combines entropy state, RSI divergence, and volume divergence for higher probability setups
Dynamic color visualization provides instant visual feedback on current market entropy state
🔧 Core Components
Shannon Entropy Calculator: Bins price returns into histograms and calculates entropy using H(X) = -Σ p(x) × log₂(p(x))
RSI Divergence Detector: Identifies when price makes lower lows while RSI makes higher lows (bullish) or price makes higher highs while RSI makes lower highs (bearish)
Volume Divergence Detector: Spots increasing volume interest at price lows (bullish) or decreasing conviction at price highs (bearish)
Pivot Detection System: Uses configurable lookback periods to identify and track price, RSI, and volume pivots
Signal Classification Engine: Labels signals as RSI, VOL, or RSI+VOL based on which divergences triggered
🔥 Key Features
Entropy Threshold Control: Set your preferred entropy level (default 2.5) to filter out signals during chaotic market periods
Configurable Smoothing: EMA smoothing on entropy values reduces noise while maintaining signal responsiveness
Flexible Pivot Detection: Adjust left/right lookback bars to tune sensitivity for different trading styles
Divergence Search Range: Control how far back the indicator looks for divergence patterns (20-200 bars)
Minimum Pivot Distance: Prevents false signals from pivots that are too close together
Complete Alert System: Four alert conditions for bullish signals, bearish signals, any signal, and low entropy zone entry
🎨 Visualization
Dynamic Entropy Line: Color gradient shifts from green (low entropy/tradeable) to orange (high entropy/chaotic)
Entropy Threshold Line: Dashed reference line shows your configured entropy threshold
Low Entropy Zone Fill: Background highlighting indicates when market is in tradeable low-entropy state
Scaled RSI Plot: RSI overlay scaled to fit the entropy pane for easy correlation analysis
Normalized Volume Bars: Volume displayed as columns normalized against 20-period average
Signal Labels: Clear LONG/SHORT labels with divergence type (RSI, VOL, or RSI+VOL)
Information Table: Real-time display of entropy value, state, RSI, and current signal status
📖 Usage Guidelines
Entropy Lookback Period — Default: 20, Range: 5-100 — Controls how many bars are used for entropy calculation; higher values provide smoother readings but slower response
Histogram Bins — Default: 10, Range: 5-50 — Number of bins for probability distribution; more bins provide finer granularity
Low Entropy Threshold — Default: 2.5, Range: 0.5-4.0 — Signals only trigger when entropy drops below this value; lower settings are more selective
Entropy Smoothing — Default: 3, Range: 1-10 — EMA smoothing applied to raw entropy values for noise reduction
RSI Length — Default: 14, Range: 5-50 — Standard RSI calculation period
Pivot Lookback Left — Default: 5, Range: 2-20 — Bars to the left for pivot detection
Pivot Lookback Right — Default: 2, Range: 1-10 — Bars to the right for pivot confirmation; lower values produce faster signals
Divergence Search Range — Default: 60, Range: 20-200 — Maximum bars to look back for divergence comparison
Min Bars Between Pivots — Default: 5, Range: 3-30 — Minimum distance between pivots for valid divergence detection
✅ Best Use Cases
Scalping during low-volatility consolidation periods when entropy drops and price becomes more predictable
Swing trade entry timing by waiting for divergence signals in low-entropy market conditions
Trend reversal identification when both RSI and Volume divergences align with low entropy readings
Multi-timeframe confirmation by checking entropy state on higher timeframes before taking signals
Filtering existing strategies by adding entropy as a confirmation layer to reduce false signals
⚠️ Limitations
Signals appear with a delay due to pivot confirmation requirements (pivotLookbackRight bars after pivot forms)
May generate fewer signals during strongly trending markets where entropy remains elevated
Entropy threshold requires optimization for different instruments and timeframes
Not designed for high-frequency trading due to bar-close confirmation requirement
Divergences can fail in extremely strong trends where momentum overwhelms the signal
💡 What Makes This Unique
First indicator to combine Shannon Entropy filtering with multi-factor divergence detection
Information theory approach provides mathematical foundation for identifying tradeable market states
Triple confirmation requirement (low entropy + divergence + bar close) significantly reduces false signals
Non-repainting guarantee makes it suitable for strategy backtesting and live trading
Open-source PineScript v6 code allows traders to understand and customize the methodology
🔬 How It Works
Step 1 — Entropy Calculation: The indicator calculates logarithmic returns, bins them into a histogram, and computes Shannon Entropy to measure market randomness
Step 2 — Entropy Filtering: When smoothed entropy drops below the threshold, the market is considered to be in a tradeable low-entropy state
Step 3 — Pivot Detection: The system continuously tracks price, RSI, and volume pivots using configurable lookback parameters
Step 4 — Divergence Analysis: When a new pivot is confirmed, the indicator compares it against previous pivots to detect bullish or bearish divergences
Step 5 — Signal Generation: A final signal only triggers when low entropy conditions coincide with a confirmed divergence pattern on a closed bar
💡 Note:
This indicator is designed for educational purposes and technical analysis. Always use proper risk management and never risk more than you can afford to lose. The non-repainting guarantee means signals will only appear after bar close—watch the indicator in real-time to verify this behavior. For optimal results, consider combining EDS signals with support/resistance levels and overall market context.






















