STOCK EXCHANGE + SILVER BULLET FRAMESThis script is an updated version of the " NY/LDN/TOK Stock Exchange Opening Hours " script.
Objective
Displays global stock exchange sessions (New York, London, Tokyo) with session frames, highs/lows, and opening lines. Includes ICT Silver Bullet windows (NY, London, Tokyo) with configurable shading. Past sessions are frozen at close, ongoing sessions update dynamically until closure, and upcoming sessions are pre-drawn. Fully customizable with options for weekends, labels, padding, opacity, and individual session toggles.
It is designed to help traders quickly interpret market context, liquidity zones, and session-based price behavior.
Main Features
Past sessions (historical data)
• Session Frames:
• Each box is frozen at the session’s close.
• The left edge aligns with the opening time, while the right edge is fixed at the closing time.
• The top and bottom reflect the highest and lowest prices during the session.
• Session Labels:
• Names (NY, LDN, TOK) displayed above the frame, aligned left, in the same color as the frame.
• Opening Lines:
• Vertical dotted lines mark the start of each session.
Ongoing and upcoming sessions (live market)
• Dynamic Session Frames:
• The right edge is locked at the future close time.
• The top and bottom update in real time as new highs and lows form.
• Labels and Lines:
• The session label is visible above the active frame.
• Opening lines are drawn as soon as the session begins.
Silver Bullet Time Windows (ICT concept)
• Highlights key liquidity windows within sessions:
• New York: 10:00–11:00 and 14:00–15:00
• London: 08:00–09:00
• Tokyo: 09:00–10:00
• Silver Bullet zones are shaded with configurable opacity (default 5%).
Customization and Options
• Enable or disable individual sessions (NY, London, Tokyo).
• Toggle weekend display (frames and Silver Bullets).
• Adjust label size, padding, and text visibility.
• Control frame opacity (default 0%).
• Optimized memory management with automatic pruning of old graphical objects.
Cerca negli script per "Cycle"
Perfect Buy/Sell Entry (SMC) v31. Write a clear title
A title like "Perfect Buy Entry Checklist (SMC) v2" is great because it is descriptive. It tells users exactly what the indicator is designed to do.
2. Start with an overview
Briefly explain the purpose of your script. What problem does it solve? What trading concept is it based on?
Example: "This indicator automates a Smart Money Concepts (SMC) based checklist to find high-probability buy entries. It's designed to help traders identify a series of bullish market conditions in a single view."
3. List key features
Use a bulleted or numbered list to highlight the main components of your script. This makes it easy for users to quickly see what the indicator includes.
Example:
Liquidity Sweep Detection: Identifies a bearish liquidity grab followed by a bullish move.
Momentum Confirmation: Uses MACD and RSI to confirm bullish momentum.
Break of Structure (BOS): Signals when the price closes above a confirmed swing high.
Risk/Reward Calculation: Provides a basic ATR-based risk/reward check.
4. Explain how to use it
Provide simple, actionable steps on how a trader can use your indicator in their own analysis.
Example: "A 'Perfect Buy' signal is generated when all conditions in the checklist are met. You can use this signal as a final confirmation for your own trading ideas. Use it in conjunction with other price action analysis."
Marcius Studio® - Cross-Asset Correlator™Cross-Asset Correlator™ — a pair-trading strategy that identifies correlation breakdowns between two assets and captures profit opportunities from market inefficiencies.
The strategy enters trades when the correlation drops below a set threshold and closes positions once correlation recovers.
The main concept is to exploit temporary divergence between two assets by going long the stronger one and short the weaker one, aiming to profit when their correlation reverts.
Important : This script illustrates asset correlation concepts for educational purposes only. It's not for live trading—requires adjustments and offers no performance guarantees. Always apply risk management.
TradingView Limitation
By default, TradingView’s built-in Strategy interface does not support backtesting with two different assets .
To overcome this, the script is implemented as an indicator with a fully custom backtesting engine that calculates PnL, trades, and performance statistics directly on the chart.
Idea
Markets move in clusters : altcoins follow BTC, memecoins track Solana, L2 projects mirror Ethereum. But correlations aren’t perfect—temporary divergences create pricing inefficiencies.
The logic:
When an asset lags or overshoots its usual correlation, it’s a mispricing opportunity.
Trade the reversion: buy undervalued divergence, sell overextended convergence.
The market eventually corrects, but the inefficiency window allows profit before realignment.
OKX Signal Bot Integration
This script includes a built-in interface for OKX Signal Bot .
It can generate structured JSON alerts (ENTER / EXIT, long / short) and directly manage trades on OKX exchange .
This allows seamless automation of correlation-based strategies without manual order execution.
Note : The OKX Signal Bot (for demo use only) assists with alerts & trade management but does not ensure profits. You are fully responsible for your trades—always apply risk management.
Strategy Parameters
Symbol 1 / Symbol 2 : trading instruments to be analyzed.
SMA Period : smoothing period for price averages.
Correlation Period : number of bars used to calculate correlation coefficient.
Upper Correlation Threshold : level above which trades are closed.
Lower Correlation Threshold : level below which new trades are opened.
percentage_investment (%) : allocation per entry signal (used for OKX integration).
Example Settings OKX:FARTCOINUSDT.P / OKX:PENGUUSDT.P
Timeframe : 1H
SMA Period : 60
Correlation Period : 25
Upper Threshold : 0.9
Lower Threshold : 0.1
percentage_investment : 10%
How the Code Works
Retrieves closing prices of two selected assets.
Calculates correlation coefficient and moving averages.
When correlation breaks below the lower threshold, the script opens a pair trade (long/short depending on SMA relation).
When correlation recovers above the upper threshold, all open trades are closed.
Real-time alerts are generated in JSON format for OKX bots (ENTER/EXIT signals).
Built-in backtesting engine tracks PnL, trades, and statistics (7d / 30d / total).
Visual labels mark entries, exits, and PnL results directly on the chart.
Disclaimer
Trading involves risk — always do your own research (DYOR) and seek professional financial advice. We are not responsible for any potential financial losses.
Intraday Spark Chart [AstrideUnicorn]The Intraday Spark Chart (ISC) is a minimalist yet powerful tool designed to track an asset’s performance relative to its daily opening price. Inspired by Nasdaq's trading-floor analog dashboards, it visualizes intraday percentage changes as a color-coded sparkline, helping traders quickly gauge momentum and session bias.
Ideal for: Day trading, scalping, and multi-asset monitoring.
Best paired with: 1m to 4H timeframes (auto-warns on higher TFs).
Key metrics:
Real-time % change from daily open.
Final daily % change (updated at session close).
Daily open price labels for orientation.
HOW TO USE
Visual Guide
Sparkline Plot:
A green area/line indicates price is above the daily open (bullish).
A red area/line signals price is below the daily open (bearish).
The baseline (0%) represents the daily open price.
Session Markers:
The dotted vertical lines separate trading days.
Gray labels near the baseline show the exact daily open price at the start of each session.
Dynamic Labels:
The labels in the upper left corner of each session range display the current (or final) daily % change. Color matches the trend (green/red) for instant readability.
Practical Use Cases
Opening Range Breakouts: Spot early momentum by observing how price reacts to the daily open.
Multi-Asset Screening: Compare intraday strength across symbols by choosing an asset in the indicator settings panel.
Session Close Prep: Anticipate daily settlement by tracking the final % change (useful for futures/swing traders).
SETTINGS
Asset (Input Symbol) : Defaults to the current chart symbol. Choose any asset to monitor its price action without switching charts - ideal for intermarket analysis or correlation tracking.
TTW-Day/Session Separator🗓️ Day Separator – Highlight Markers start times and days for Your Chart
This script adds automatic vertical lines to visually separate each trading day on your chart. It helps you quickly identify where each day starts and ends — especially useful for intraday and scalping strategies.
✅ Features:
Distinct lines for each weekday, month, week, trading session
Optional day-of-week labels (toggle on/off)
Custom label position (top or bottom of the chart)
Works on any timeframe
Whether you're tracking market sessions or reviewing daily price action, this tool gives you a clean structure to navigate your charts with more clarity.
Cheat CodeWhy Monday & Friday
Monday evening (NY): frequently seeds the weekly expansion. Its DR/IDR often acts as a weekly “starter envelope,” useful for breakout continuation or fade back into the box plays as liquidity builds.
Friday evening (NY): often exposes end-of-week traps (run on stops into the close) and sets expectation boundaries into the following week. Carry these levels forward to catch Monday’s reaction to Friday’s closing structure.
Typical use-cases
Breakout & retest:
Price closes outside the Monday DR/IDR → look for retests of the band edge for continuation.
Liquidity sweep (“trap”) recognition:
Friday session wicks briefly beyond Friday DR/IDR then closes back inside → watch for mean reversion early next week.
Bias filter:
Above both Monday DR midline and Friday DR midline → bias long until proven otherwise; the inverse for shorts.
Session open confluence:
Reactions at the open line frequently mark decision points for momentum vs. fade setups.
(This is a levels framework, not a signals engine. Combine with your execution model: orderflow, S/R, session timing, or higher-TF bias.)
Inputs & styling (quick reference)
Display toggles (per day):
Show DR / IDR / Middle DR / Middle IDR
Show Opening Line
Show DR/IDR Box (choose DR or IDR as box source)
Show Price Labels
Style controls (per day):
Line width (1–4), style (Solid/Dashed/Dotted)
Independent colors for DR, IDR, midlines, open line
Box background opacity
Timezone:
Default America/New_York (changeable).
Optional on-chart warning if your chart TZ differs.
Practical notes
Works on intraday charts; levels are anchored using weekly timestamps for accuracy on any symbol.
Live updating: During the Mon/Fri calc windows, DR/IDR highs/lows and midlines keep updating until the session ends.
Clean drawings: Lines, box, and labels are created once per session and then extended/updated—efficient on resources even with long display windows.
Max elements: Script reserves ample line/box/label capacity for stability across weeks.
Dual Volume Profiles: Session + Rolling (Range Delineation)Dual Volume Profiles: Session + Rolling (Range Delineation)
INTRO
This is a probability-centric take on volume profile. I treat the volume histogram as an empirical PDF over price, updated in real time, which makes multi-modality (multiple acceptance basins) explicit rather than assumed away. The immediate benefit is operational: if we can read the shape of the distribution, we can infer likely reversion levels (POC), acceptance boundaries (VAH/VAL), and low-friction corridors (LVNs).
My working hypothesis is that what traders often label “fat tails” or “power-law behavior” at short horizons is frequently a tail-conditioned view of a higher-level Gaussian regime. In other words, child distributions (shorter periodicities) sit within parent distributions (longer periodicities); when price operates in the parent’s tail, the child regime looks heavy-tailed without being fundamentally non-Gaussian. This is consistent with a hierarchical/mixture view and with the spirit of the central limit theorem—Gaussian structure emerges at aggregate scales, while local scales can look non-Gaussian due to nesting and conditioning.
This indicator operationalizes that view by plotting two nested empirical PDFs: a rolling (local) profile and a session-anchored profile. Their confluence makes ranges explicit and turns “regime” into something you can see. For additional nesting, run multiple instances with different lookbacks. When using the default settings combined with a separate daily VP, you effectively get three nested distributions (local → session → daily) on the chart.
This indicator plots two nested distributions side-by-side:
Rolling (Local) Profile — short-window, prorated histogram that “breathes” with price and maps the immediate auction.
Session Anchored Profile — cumulative distribution since the current session start (Premkt → RTH → AH anchoring), revealing the parent regime.
Use their confluence to identify range floors/ceilings, mean-reversion magnets, and low-volume “air pockets” for fast traverses.
What it shows
POC (dashed): central tendency / “magnet” (highest-volume bin).
VAH & VAL (solid): acceptance boundaries enclosing an exact Value Area % around each profile’s POC.
Volume histograms:
Rolling can auto-color by buy/sell dominance over the lookback (green = buying ≥ selling, red = selling > buying).
Session uses a fixed style (blue by default).
Session anchoring (exchange timezone):
Premarket → anchors at 00:00 (midnight).
RTH → anchors at 09:30.
After-hours → anchors at 16:00.
Session display span:
Session Max Span (bars) = 0 → draw from session start → now (anchored).
> 0 → draw a rolling window N bars back → now, while still measuring all volume since session start.
Why it’s useful
Think in terms of nested probability distributions: the rolling node is your local Gaussian; the session node is its parent.
VA↔VA overlap ≈ strong range boundary.
POC↔POC alignment ≈ reliable mean-reversion target.
LVNs (gaps) ≈ low-friction corridors—expect quick moves to the next node.
Quick start
Add to chart (great on 5–10s, 15–60s, 1–5m).
Start with: bins = 240, vaPct = 0.68, barsBack = 60.
Watch for:
First test & rejection at overlapping VALs/VAHs → fade back toward POC.
Acceptance beyond VA (several closes + growing outer-bin mass) → traverse to the next node.
Inputs (detailed)
General
Lookback Bars (Rolling)
Count of most-recent bars for the rolling/local histogram. Larger = smoother node that shifts slower; smaller = more reactive, “breathing” profile.
• Typical: 40–80 on 5–10s charts; 60–120 on 1–5m.
• If you increase this but keep Number of Bins fixed, each bin aggregates more volume (coarser bins).
Number of Bins
Vertical resolution (price buckets) for both rolling and session histograms. Higher = finer detail and crisper LVNs, but more line objects (closer to platform limits).
• Typical: 120–240 on 5–10s; 80–160 on 1–5m.
• If you hit performance or object limits, reduce this first.
Value Area %
Exact central coverage for VAH/VAL around POC. Computed empirically from the histogram (no Gaussian assumption): the algorithm expands from POC outward until the chosen % is enclosed.
• Common: 0.68 (≈“1σ-like”), 0.70 for slightly wider core.
• Smaller = tighter VA (more breakout flags). Larger = wider VA (more reversion bias).
Max Local Profile Width (px)
Horizontal length (in pixels) of the rolling bars/lines and its VA/POC overlays. Visual only (does not affect calculations).
Session Settings
RTH Start/End (exchange tz)
Defines the current session anchor (Premkt=00:00, RTH=your start, AH=your end). The session histogram always measures from the most recent session start and resets at each boundary.
Session Max Span (bars, 0 = full session)
Display window for session drawings (POC/VA/Histogram).
• 0 → draw from session start → now (anchored).
• > 0 → draw N bars back → now (rolling look), while still measuring all volume since session start.
This keeps the “parent” distribution measurable while letting the display track current action.
Local (Rolling) — Visibility
Show Local Profile Bars / POC / VAH & VAL
Toggle each overlay independently. If you approach object limits, disable bars first (POC/VA lines are lighter).
Local (Rolling) — Colors & Widths
Color by Buy/Sell Dominance
Fast uptick/downtick proxy over the rolling window (close vs open):
• Buying ≥ Selling → Bullish Color (default lime).
• Selling > Buying → Bearish Color (default red).
This color drives local bars, local POC, and local VA lines.
• Disable to use fixed Bars Color / POC Color / VA Lines Color.
Bars Transparency (0–100) — alpha for the local histogram (higher = lighter).
Bars Line Width (thickness) — draw thin-line profiles or chunky blocks.
POC Line Width / VA Lines Width — overlay thickness. POC is dashed, VAH/VAL solid by design.
Session — Visibility
Show Session Profile Bars / POC / VAH & VAL
Independent toggles for the session layer.
Session — Colors & Widths
Bars/POC/VA Colors & Line Widths
Fixed palette by design (default blue). These do not change with buy/sell dominance.
• Use transparency and width to make the parent profile prominent or subtle.
• Prefer minimal? Hide session bars; keep only session VA/POC.
Reading the signals (detailed playbook)
Core definitions
POC — highest-volume bin (fair price “magnet”).
VAH/VAL — upper/lower bounds enclosing your Value Area % around POC.
Node — contiguous block of high-volume bins (acceptance).
LVN — low-volume gap between nodes (low friction path).
Rejection vs Acceptance (practical rule)
Rejection at VA edge: 0–1 closes beyond VA and no persistent growth in outer bins.
Acceptance beyond VA: ≥3 closes beyond VA and outer-bin mass grows (e.g., added volume beyond the VA edge ≥ 5–10% of node volume over the last N bars). Treat acceptance as regime change.
Confluence scores (make boundary/target quality objective)
VA overlap strength (range boundary):
C_VA = 1 − |VA_edge_local − VA_edge_session| / ATR(n)
Values near 1.0 = tight overlap (stronger boundary).
Use: if C_VA ≥ 0.6–0.8, treat as high-quality fade zone.
POC alignment (magnet quality):
C_POC = 1 − |POC_local − POC_session| / ATR(n)
Higher C_POC = greater chance a rotation completes to that fair price.
(You can estimate these by eye.)
Setups
1) Range Fade at VA Confluence (mean reversion)
Context: Local VAL/VAH near Session VAL/VAH (tight overlap), clear node, local color not screaming trend (or flips to your side).
Entry: First test & rejection at the overlapped band (wick through ok; prefer close back inside).
Stop: A tick/pip beyond the wider of the two VA edges or beyond the nearest LVN, a small buffer zone can be used to judge whether price is truly rejecting a VAL/VAH or simply probing.
Targets: T1 node mid; T2 POC (size up when C_POC is high).
Flip: If acceptance (rule above) prints, flip bias or stand down.
2) LVN Traverse (continuation)
Context: Price exits VA and enters an LVN with acceptance and growing outer-bin volume.
Entry: Aggressive—first close into LVN; Conservative—retest of the VA edge from the far side (“kiss goodbye”).
Stop: Back inside the prior VA.
Targets: Next node’s VA edge or POC (edge = faster exits; POC = fuller rotations).
Note: Flatter VA edge (shallower curvature) tends to breach more easily.
3) POC→POC Magnet Trade (rotation completion)
Context: Local POC ≈ Session POC (high C_POC).
Entry: Fade a VA touch or pullback inside node, aiming toward the shared POC.
Stop: Past the opposite VA edge or LVN beyond.
Target: The shared POC; optional runner to opposite VA if the node is broad and time-of-day is supportive.
4) Failed Break (Reversion Snap-back)
Context: Push beyond VA fails acceptance (re-enters VA, outer-bin growth stalls/shrinks).
Entry: On the re-entry close, back toward POC.
Stop/Target: Stop just beyond the failed VA; target POC, then opposite VA if momentum persists.
How to read color & shape
Local color = most recent sentiment:
Green = buying ≥ selling; Red = selling > buying (over the rolling window). Treat as context, not a standalone signal. A green local node under a blue session VAH can still be a fade if the parent says “over-valued.”
Shape tells friction:
Fat nodes → rotation-friendly (fade edges).
Sharp LVN gaps → traversal-friendly (momentum continuation).
Time-of-day intuition
Right after session anchor (e.g., RTH 09:30): Session profile is young and moves quickly—treat confluence cautiously.
Mid-session: Cleanest behavior for rotations.
Close / news: Expect more traverses and POC migrations; tighten risk or switch playbooks.
Risk & execution guidance
Use tight, mechanical stops at/just beyond VA or LVN. If you need wide stops to survive noise, your entry is late or the node is unstable.
On micro-timeframes, account for fees & slippage—aim for targets paying ≥2–3× average cost.
If acceptance prints, don’t fight it—flip, reduce size, or stand aside.
Suggested presets
Scalp (5–10s): bins 120–240, barsBack 40–80, vaPct 0.68–0.70, local bars thin (small bar width).
Intraday (1–5m): bins 80–160, barsBack 60–120, vaPct 0.68–0.75, session bars more visible for parent context.
Performance & limits
Reuses line objects to stay under TradingView’s max_lines_count.
Very large bins × multiple overlays can still hit limits—use visibility toggles (hide bars first).
Session drawings use time-based coordinates to avoid “bar index too far” errors.
Known nuances
Rolling buy/sell dominance uses a simple uptick/downtick proxy (close vs open). It’s fast and practical, but it’s not a full tape classifier.
VA boundaries are computed from the empirical histogram—no Gaussian assumption.
This script does not calculate the full daily volume profile. Several other tools already provide that, including TradingView’s built-in Volume Profile indicators. Instead, this indicator focuses on pairing a rolling, short-term volume distribution with a session-wide distribution to make ranges more explicit. It is designed to supplement your use of standard or periodic volume profiles, not replace them. Think of it as a magnifying lens that helps you see where local structure aligns with the broader session.
How to trade it (TL;DR)
Fade overlapping VA bands on first rejection → target POC.
Continue through LVN on acceptance beyond VA → target next node’s VA/POC.
Respect acceptance: ≥3 closes beyond VA + growing outer-bin volume = regime change.
FAQ
Q: Why 68% Value Area?
A: It mirrors the “~1σ” idea, but we compute it exactly from empirical volume, not by assuming a normal distribution.
Q: Why are my profiles thin lines?
A: Increase Bars Line Width for chunkier blocks; reduce for fine, thin-line profiles.
Q: Session bars don’t reach session start—why?
A: Set Session Max Span (bars) = 0 for full anchoring; any positive value draws a rolling window while still measuring from session start.
Changelog (v1.0)
Dual profiles: Rolling + Session with independent POC/VA lines.
Session anchoring (Premkt/RTH/AH) with optional rolling display span.
Dynamic coloring for the rolling profile (buying vs selling).
Fully modular toggles + per-feature colors/widths.
Thin-line rendering via bar line width.
OSAMA RASMIHow this script works?
- it finds and keeps Pivot Points
- when it found a new Pivot Point it clears older S/R channels then;
- for each pivot point it searches all pivot points in its own channel with dynamic width
- while creating the S/R channel it calculates its strength
- then sorts all S/R channels by strength
- it shows the strongest S/R channels, before doing this it checks old location in the list and adjust them for better visibility
- if any S/R channel was broken on last move then it gives alert and put shape below/above the candle
- The colors of the S/R channels are adjusted automatically
Index Options Expirations and Calendar EffectsFeatures
- Highlights monthly equity options expiration (opex) dates.
- Marks VIX options expiration dates based on standard 30-day offset.
- Shows configurable vanna/charm pre-expiration window (green shading).
- Shows configurable post-opex weakness window (red shading).
- Adjustable colors, start/end offsets, and on/off toggles for each element.
What this does
This overlay highlights option-driven calendar windows around monthly equity options expiration (opex) and VIX options expiration. It draws:
- Solid blue lines on the third Friday of each month (typical monthly opex).
- Dashed orange lines on the Wednesday ~30 days before next month’s opex (typical VIX expiration schedule).
- Green shading during a pre-expiration window when vanna/charm effects are often strongest.
- Red shading during the post-expiration "window of non-strength" often observed into the Tuesday after opex.
How it works
1. Monthly opex is detected when Friday falls between the 15th–21st of the month.
2. VIX expiration is calculated by finding next month’s opex date, then subtracting 30 calendar days and marking that Wednesday.
3. Vanna/charm window (green) : starts on the Monday of the week before opex and ends on Tuesday of opex week.
4. Post-opex weakness window (red) : starts Wednesday of opex week and ends Tuesday after opex.
How to use
- Add to any chart/timeframe.
- Adjust inputs to toggle VIX/opex lines, choose colors, and fine-tune the start/end offsets for shaded windows.
- This is an educational visualization of typical timing and not a trading signal.
Limitations
- Exchange holidays and contract-specific exceptions can shift expirations; this script uses standard calendar rules.
- No forward-looking data is used; all dates are derived from historical and current bar time.
- Past patterns do not guarantee future behavior.
Originality
Provides a single, adjustable visualization combining opex, VIX expiration, and configurable vanna/charm/weakness windows into one tool. Fully explained so non-coders can use it without reading the source code.
Sector Hourly Trend + Dynamic % Here’s a concise but clear description you can give to other users:
---
**📊 Sector Hourly Trend + Dynamic % Change Table (Pine Script v6)**
This TradingView indicator displays a fixed on-screen table showing the **real-time performance** of the 11 major SPDR sector ETFs.
**Features:**
* **Hourly Trend Column:** Uses 60-minute candle data to detect the sector’s current direction vs. the previous hour:
* **^** (green) → sector is up over the past hour.
* **v** (red) → sector is down over the past hour.
* **–** (gray) → no change.
* **Dynamic % Change Column:** Calculates the percentage move over a user-defined window (in minutes) using 1-minute data.
* Background colors: bright green for positive, bright red for negative, gray for no change.
* Text color: black for maximum contrast.
* **Sector Column:** Lists each SPDR sector by name, color-coded for easy identification.
* **Customizable Position:** Choose screen corner and fine-tune with X/Y offsets to avoid overlapping the TradingView Pro badge or UI buttons.
* **Always On-Screen:** The table is fixed to the chart’s viewport, so it stays visible regardless of zoom or scroll.
**Use Cases:**
* Quick visual snapshot of which sectors are leading or lagging intraday.
* Monitor short-term sector rotation without switching tickers.
* Combine with your trading strategy to align trades with sector momentum.
Crypto Macro CockpitCrypto Macro Cockpit — Institutional Liquidity Regime Detection
🔍 Overview
This script introduces a modern macro framework for crypto market regime detection, leveraging newly added stablecoin market data on TradingView. It’s designed to guide traders through the evolving institutional era of crypto — where liquidity, not just price, is king.
🌐 Why This Matters
Historically, traditional proxies like M2 money supply or bond yields were referenced to infer macro liquidity shifts. But with the regulatory green light and institutional embrace of stablecoins, on-chain fiat liquidity is now directly observable.
Stablecoins = The new M2 for crypto.
This script utilizes real-time data from:
📊 CRYPTOCAP:STABLE.C (Total Stablecoin Market Cap)
📊 CRYPTOCAP:STABLE.C.D (Stablecoin Dominance)
to assess dry powder, risk appetite, and macro regime transitions.
📋 How to Read the Crypto Macro Cockpit
This dashboard updates every few bars and is organized into four actionable segments:
1️⃣ Macro Spreads
Metric --> Interpretation
Risk Flow --> Measures capital flow between stablecoins and total crypto market cap. → Green = risk deploying.
ETH vs BTC --> Shift in dominance between ETH and BTC → rotation gauge.
ETHBTC --> Price ratio movement → confirms leadership tilt.
ALTs (TOTAL3ES) --> Momentum in altcoin market, excluding BTC/ETH/stables → key for alt season timing.
2️⃣ Liquidity & Risk Appetite
Metric --> Interpretation
Liquidity --> Directional change in stablecoin cap → more stables = more dry powder.
Risk Appetite --> Inverse of stablecoin dominance → falling dominance = capital rotating into risk.
3️⃣ Stablecoin Context
Metric --> Interpretation
StableCap ROC --> Growth rate of stablecoin market cap → proxy for fiat inflows.
StableDom ROC --> Change in stablecoin dominance → reflects market caution or aggression.
4️⃣ Composite Labels
Label --> Interpretation
Rotation --> Sector tilt (BTC-led vs ETH/Alts)
Regime --> Synthesized macro environment → "Risk-ON", "Caution", "Waiting", or "Risk-OFF"
Background Color --> Optional tint reflecting regime for quick glance validation
All metrics are evaluated with directional arrows (▲/▼/•) and acceleration overlays, using user-defined thresholds scaled by timeframe for precision.
🔔 Built-in Alerts
Predefined, non-repainting alerts include:
Regime transitions
Sector rotations
Confirmed ETH/ALT rotations
Stablecoin market cap spikes
Risk Flow acceleration
You can use these alerts for discretionary trading or automated system triggers.
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Trading cryptocurrencies involves risk, and past performance does not guarantee future results. Always do your own research and manage risk responsibly.
✅ Ready to Use
No configuration needed — just load the script
Works on all timeframes (optimized for 1D)
Thresholds and smoothing are customizable
Table positioning and sizing is user-controlled
If you find this helpful, feel free to ⭐️ favorite or leave feedback. Questions welcome in the comments.
Let’s trade with macro awareness in this new era.
Bitcoin Expectile Model [LuxAlgo]The Bitcoin Expectile Model is a novel approach to forecasting Bitcoin, inspired by the popular Bitcoin Quantile Model by PlanC. By fitting multiple Expectile regressions to the price, we highlight zones of corrections or accumulations throughout the Bitcoin price evolution.
While we strongly recommend using this model with the Bitcoin All Time History Index INDEX:BTCUSD on the 3 days or weekly timeframe using a logarithmic scale, this model can be applied to any asset using the daily timeframe or superior.
Please note that here on TradingView, this model was solely designed to be used on the Bitcoin 1W chart, however, it can be experimented on other assets or timeframes if of interest.
🔶 USAGE
The Bitcoin Expectile Model can be applied similarly to models used for Bitcoin, highlighting lower areas of possible accumulation (support) and higher areas that allow for the anticipation of potential corrections (resistance).
By default, this model fits 7 individual Expectiles Log-Log Regressions to the price, each with their respective expectile ( tau ) values (here multiplied by 100 for the user's convenience). Higher tau values will return a fit closer to the higher highs made by the price of the asset, while lower ones will return fits closer to the lower prices observed over time.
Each zone is color-coded and has a specific interpretation. The green zone is a buy zone for long-term investing, purple is an anomaly zone for market bottoms that over-extend, while red is considered the distribution zone.
The fits can be extrapolated, helping to chart a course for the possible evolution of Bitcoin prices. Users can select the end of the forecast as a date using the "Forecast End" setting.
While the model is made for Bitcoin using a log scale, other assets showing a tendency to have a trend evolving in a single direction can be used. See the chart above on QQQ weekly using a linear scale as an example.
The Start Date can also allow fitting the model more locally, rather than over a large range of prices. This can be useful to identify potential shorter-term support/resistance areas.
🔶 DETAILS
🔹 On Quantile and Expectile Regressions
Quantile and Expectile regressions are similar; both return extremities that can be used to locate and predict prices where tops/bottoms could be more likely to occur.
The main difference lies in what we are trying to minimize, which, for Quantile regression, is commonly known as Quantile loss (or pinball loss), and for Expectile regression, simply Expectile loss.
You may refer to external material to go more in-depth about these loss functions; however, while they are similar and involve weighting specific prices more than others relative to our parameter tau, Quantile regression involves minimizing a weighted mean absolute error, while Expectile regression minimizes a weighted squared error.
The squared error here allows us to compute Expectile regression more easily compared to Quantile regression, using Iteratively reweighted least squares. For Quantile regression, a more elaborate method is needed.
In terms of comparison, Quantile regression is more robust, and easier to interpret, with quantiles being related to specific probabilities involving the underlying cumulative distribution function of the dataset; on the other expectiles are harder to interpret.
🔹 Trimming & Alterations
It is common to observe certain models ignoring very early Bitcoin price ranges. By default, we start our fit at the date 2010-07-16 to align with existing models.
By default, the model uses the number of time units (days, weeks...etc) elapsed since the beginning of history + 1 (to avoid NaN with log) as independent variable, however the Bitcoin All Time History Index INDEX:BTCUSD do not include the genesis block, as such users can correct for this by enabling the "Correct for Genesis block" setting, which will add the amount of missed bars from the Genesis block to the start oh the chart history.
🔶 SETTINGS
Start Date: Starting interval of the dataset used for the fit.
Correct for genesis block: When enabled, offset the X axis by the number of bars between the Bitcoin genesis block time and the chart starting time.
🔹 Expectiles
Toggle: Enable fit for the specified expectile. Disabling one fit will make the script faster to compute.
Expectile: Expectile (tau) value multiplied by 100 used for the fit. Higher values will produce fits that are located near price tops.
🔹 Forecast
Forecast End: Time at which the forecast stops.
🔹 Model Fit
Iterations Number: Number of iterations performed during the reweighted least squares process, with lower values leading to less accurate fits, while higher values will take more time to compute.
Spice • Micro Suite (T/r & B/r)What it is
A single Pine v5 indicator that stacks:
EMA ribbon + a “special” EMA (11 vs 34) line that flips color on trend.
MTF-RSI “pressure” check with simple up/down arrows.
Bollinger-Band re-entry system with Top/Bottom triggers (T/B) and confirmations (r) in the next N bars.
Classic candlestick add-ons: 3-Line Strike and Leledc exhaustion dots.
Your Micro Dots engine (ATR-based regime + Variable Moving Average filter) + an optional VMA trend line.
Alerts for all the above.
Key signals (what prints on the chart)
EMAs (20/50/100/200): plotted faintly; EMA-34 is drawn and colored by the 11>34 trend.
RSI arrows
Checks RSI(6) on the current TF and (optionally) 5m/15m/30m/1h/4h/1D.
Down arrow: current RSI > 70 and the selected higher TF RSIs are also > 70 (pressure cluster just cooled; barssince(redZone)<2).
Up arrow: current RSI < 30 and selected higher TFs also < 30 (barssince(greenZone)<2).
Bollinger Reversals (your update)
T (Top trigger): first close back inside the upper BB (crossunder(close, upper)).
B (Bottom trigger): first close back inside the lower BB (crossover(close, lower)).
r (Confirm): within the next confirmBars bars (input), price also
closes below the T-bar’s low → top r above bar
closes above the B-bar’s high → bottom r below bar
Bar tinting
Only the T/B trigger bars are tinted (yellow/orange). Everything else stays your normal candle colors (unless you add the optional “trend candles” block I gave you).
3-Line Strike
Prints a small green/red circle when the 3-line strike pattern appears (bull/bear).
Leledc Exhaustion
Calculates a running buy/sell index; prints a small ∘ at major highs/lows when exhaustion conditions hit (major==-1 high, major==1 low).
Micro Dots (your second script, merged)
ATR “micro supertrend” defines regime (up/down).
A fast Variable Moving Average + a simple MA(18) filter.
Green dot below bar when: VMA < price, price > MA(18), regime up, and VMA not pointing down.
Red dot above bar for the bearish mirror.
Separate VMA trend line (length = Fast/Med/Slow) that colors green/red/orange by slope.
Inputs you’ll care about
Top/Bot Reversal → confirmBars (how many bars you allow to confirm the T/B trigger).
RSI Timeframes → toggle which HTFs must agree with the OB/OS condition.
EMAs → show/hide and lengths.
BB → show/hide basis/bands (used for T/B even if hidden).
Micro → show dots, show VMA line, choose intensity (Fast/Med/Slow).
Alerts
Prebuilt alerts for: RSI Up/Down, T/B triggers, T/B confirmations, 3-Line Strike bull/bear, Leledc highs/lows, EMA crosses (20/50/100/200), the special 11/34 trend change, Micro Dots, and VMA price cross. (Alert messages are const strings so they compile cleanly.)
How to read clusters (quick playbook)
Reversal short: see T on/near upper band → get an r within your window → bonus confidence if an RSI down arrow or Leledc ∘ high shows up around the same time.
Reversal long: mirror with B then r, plus RSI up arrow / Leledc ∘ low.
Continuation: ignore lone T/B if Micro Dot stays green (or red) and EMA-11 > EMA-34 remains true.
Why your candles look “normal”
By design, the script only colors bars on T or B trigger bars. If you want always-on trend candles, use the small block I gave you to color by EMA(20/50) (or any rule you like) and let T/B override on trigger bars.
Contador de Vela 2.0This indicator displays a seconds counter on the chart that updates continuously.
It uses a small vertical offset trick to simulate movement when scrolling the chart, making the counter more visually dynamic.
Ideal for monitoring elapsed time since the chart loaded.
To use, simply add the indicator to any chart with price candles. The counter will appear near the current bar.
Contador de VelaThis indicator displays a seconds counter on the chart that updates continuously.
It uses a small vertical offset trick to simulate movement when scrolling the chart, making the counter more visually dynamic.
Ideal for monitoring elapsed time since the chart loaded.
To use, simply add the indicator to any chart with price candles. The counter will appear near the current bar.
Nova Futures PRO (SAFE v6) — HTF + Choppiness + CooldownNova Futures PRO (SAFE v6) — HTF + Choppiness + Cooldown
The Daily Bias Dashboard📜 Overview
This indicator is a powerful statistical tool designed to provide traders with a probable Daily Bias based on historical price action. It is built upon the concepts of Quarterly Theory, which divides the 24-hour trading day into 4 distinct sessions to analyze market behavior.
This tool analyzes how the market has behaved in the past to give you a statistical edge. It answers the question: "Based on the last X number of days, what is the most likely way the price will move during the Newyork AM & PM Sessions based on Asian & London Sessions?"
⚙️ How It Works
The indicator divides the 24-hour day (based on the America/New_York timezone) into two 12-hour halves:
First Half - 12 Hour Candle: The Accumulation/Manipulation or Asian/London Sessions (6 PM to 6 AM NY Time)
This period covers the Asian session and the start of the London session.
The indicator's only job here is to identify the highest high and lowest low of this 12-hour block, establishing the initial daily range.
Second Half - 12 Hour Candle: The Distribution/Continuation or NY AM/PM Sessions (6 AM to 6 PM NY Time)
This period covers the main London session and the full New York session.
The indicator actively watches to see if, and in what order, the price breaks out of the range established in Session 1 (FIrst Half of the day).
By tracking this behavior over hundreds of days, the indicator compiles statistics on four possible daily scenarios.
📊 The Four Scenarios & The Dashboard
The indicator presents its findings in a clean, easy-to-read dashboard, calculating the historical probability of each of the following scenarios:
↓ Low, then ↑ High: The price first breaks the low of Session 1 (often a liquidity sweep or stop hunt) before reversing to break the high of Session 1. This suggests a "sweep and reverse" bullish day.
↑ High, then ↓ Low: The price first breaks the high of Session 1 before reversing to break the low of Session 1. This suggests a "sweep and reverse" bearish day.
One-Sided Breakout: The price breaks only one of the boundaries (either the high or the low) and continues in that direction without taking the other side. This indicates a strong, trending day.
No Breakout (Inside Bar): The price fails to break either the high or the low of Session 1, remaining contained within its range. This indicates a day of consolidation and low volatility.
🧠 How to Use This Indicator
This is a confluence tool, not a standalone trading system. Its purpose is to help you frame a high-probability narrative for the trading day.
Establish a Bias: Start checking the dashboard at 06:00 AM Newyork time, which is the start of next half day trading session. If one scenario has a significantly higher probability (e.g., "One-Sided Breakout" at 89%), you have a statistically-backed directional bias in the direction of Breakout.
🔧 Features & Settings
Historical Days to Analyze: Set how many past days the indicator should use for its statistical analysis (default is 500).
Session Timezone : The calculation is locked to America/New_York as it is central to the Quarterly Theory concept, but this setting ensures correct alignment.
Dashboard Display: Fully customize the on-screen table, including its position and text size, or hide it completely.
⚠️ Important Notes
For maximum accuracy, use this indicator on hourly (H1) or lower timeframes.
The statistical probabilities are based on past performance and are not a guarantee of future results.
This tool is designed to sharpen your analytical skills and provide a robust, data-driven framework for your daily trading decisions. Use it to build confidence in your directional bias and to better understand the rhythm of the market.
Disclaimer: This indicator is for educational and informational purposes only and does not constitute financial advice. All trading involves risk.
Full Session ATR Range (Live) - with Position ToggleBelow is a publication-ready text for the "Full Session ATR Range (Live) - with Position Toggle" indicator, written in a professional yet accessible style suitable for a trading community (e.g., TradingView or a blog). The text highlights the indicator's features, usage, and benefits, while avoiding overly technical jargon for a broad audience.
---
### Introducing the Full Session ATR Range (Live) Indicator with Position Toggle
Enhance your trading strategy with the **Full Session ATR Range (Live) Indicator**, a powerful tool designed to provide real-time insights into market volatility and session dynamics. This customizable indicator, now available with a position toggle feature, compares the current session's range to a 10-day Average True Range (ATR), helping traders gauge market activity and anticipate potential movements.
#### Key Features
- **Live Range Tracking**: Displays the current session's range (high minus low) alongside a 10-day ATR, updated in real-time during market hours.
- **Session Mode Flexibility**: Includes an auto-toggle option to switch between Electronic Trading Hours (ETH) and Regular Trading Hours (RTH), adapting to your preferred trading session. Manually select ETH or RTH, or let the indicator auto-detect based on market hours.
- **Comprehensive Metrics**: Offers a detailed breakdown including:
- Range/Avg %: Percentage of the current range relative to the 10-day ATR.
- Points Left: Remaining points to reach the average range.
- 100% Range Up/Dn: Potential upper and lower targets based on the ATR difference.
- **Position Customization**: Adjust the table's location on your chart with options like top-left, top-right, middle-center, or bottom-right for optimal visibility.
- **Visual Appeal**: Features a customizable background and text color to match your chart theme.
#### How It Works
The indicator calculates the 10-day ATR using daily data and tracks the current session's range, resetting at the start of each day or session change. During market hours (e.g., 6 AM - 8 PM CDT, adjustable), it updates live, providing actionable insights. When the market is closed, it displays historical ATR while marking live metrics as "n/a" to avoid confusion. The ETH/RTH toggle ensures the range reflects either the full extended session or the core trading hours, tailored to your strategy.
#### Why Use It?
Whether you're a day trader monitoring intraday volatility or a swing trader assessing longer-term trends, this indicator helps you:
- Identify overextended or underactive sessions compared to historical norms.
- Plan entries and exits with targets based on the 100% Range Up/Dn levels.
- Stay informed with a clean, adjustable display that fits your workflow.
#### Installation & Customization
1. Add the indicator to your TradingView chart.
2. Adjust the ATR length (default: 10 days) and table position via the input settings.
3. Choose your session mode (Auto, ETH, or RTH) and customize colors to suit your style.
4. Test during market hours for live updates—note that static values may appear outside trading sessions.
#### Feedback & Support
This indicator is designed for flexibility and ease of use. Share your feedback or request enhancements by commenting below or contacting the developer. Happy trading!
Relative Strength Buy/Sell SignalsThis Pine Script builds on the MarketSurge-style Relative Strength indicator. It calculates the RS line by comparing the stock's close to a benchmark (default: SPY). Buy signals are generated when the RS line crosses above its moving average (default 10-period SMA), indicating improving relative strength. Sell signals occur when it crosses below, suggesting weakening relative strength. Signals are labeled "BUY" (green) and "SELL" (red) on the chart, with background highlights.
It also retains the new 52-week RS highs (orange circles) and lows (purple circles), which can serve as additional confirmation for outperformance or underperformance.
Note: This approximates relative strength for trading signals but does not replicate the proprietary IBD RS Rating (a 1-99 percentile rank across all stocks). For best results, use on daily charts and combine with other analysis. Backtest thoroughly, as no strategy guarantees profits
SMI Base-Trigger Bullish Re-acceleration (Higher High)Description
What it does
This indicator highlights a two-step bullish pattern using Stochastic Momentum Index (SMI) plus an ATR distance filter:
1. Base (orange) – Marks a momentum “reset.” A base prints when SMI %K crosses up through %D while %K is below the Base level (default -70). The base stores the base price and starts a waiting window.
2. Trigger (green) – Confirms momentum and price strength. A trigger prints only if, before the timeout window ends:
• SMI %K crosses up through %D again,
• %K is above the Trigger level (default -60),
• Close > Base Price, and
• Price has advanced at least Min ATR multiple (default 1.0× the 14-period ATR) above the base price.
A dashed green line connects the base to the trigger.
Why it’s useful
It seeks a bullish divergence / reacceleration: momentum recovers from deeply negative territory, then price reclaims and exceeds the base by a volatility-aware margin. This helps filter out weak “oversold bounces.”
Signals
• Base ▲ (orange): Potential setup begins.
• Trigger ▲ (green): Confirmation—momentum and price agree.
Inputs (key ones)
• %K Length / EMA Smoothing / %D Length: SMI construction.
• Base when %K < (default -70): depth required for a valid reset.
• Trigger when %K > (default -60): strength required on confirmation.
• Base timeout (days) (default 100): maximum look-ahead window.
• ATR Length (default 14) and Min ATR multiple (default 1.0): price must exceed the base by this ATR-scaled distance.
How traders use it (example rules)
• Entry: On the Trigger.
• Risk: A common approach is a stop somewhere between the base price and a multiple of ATR below trigger; or use your system’s volatility stop.
• Exits: Your choice—trend MA cross, fixed R multiple, or structure-based levels.
Notes & tips
• Works best on liquid symbols and mid-to-higher timeframes (reduce noise).
• Increase Min ATR multiple to demand stronger price confirmation; tighten or widen Base/Trigger levels to fit your market.
• This script plots signals only; convert to a strategy to backtest entries/exits.