Futures Psychological Levels PROFutures Psychological Levels PRO – Professional Usage Guide
Indicator Overview
This elite psychological levels tool dynamically plots the most institutionally relevant round-number clusters across futures markets (ES, NQ, YM, CL, GC, SI, BTC, and custom instruments). It separates levels into three hierarchical tiers — Major, Tradable, and Sniper — while intelligently filtering distant levels using an ATR-based proximity engine. The result is a clean, adaptive overlay that scales perfectly from scalping precision on 1-minute charts to big-picture context on daily/weekly timeframes.
Core Philosophy
Psychological levels are where order flow clusters: stops, limits, and institutional positioning accumulate around round numbers. This indicator turns static round numbers into a dynamic decision framework by:
Prioritizing confluence zones
Reducing clutter in ranging or low-volatility environments
Highlighting only price-relevant levels in real time
Key Features
Instrument Presets – One-click optimized spacing for major futures contracts
Three-Tier Hierarchy – Major (institutional anchors), Tradable (active defense zones), Sniper (precise entry/exit triggers)
ATR Proximity Filter – Automatically hides irrelevant distant levels
Zones or Lines – Visual magnet areas or clean horizontal lines
Price Labels & Summary Table – Instant reference for next major levels above/below
Full Customization – Colors, thickness, styles, and manual overrides
How to Best Use This Indicator (Professional Workflow)
Select the Correct Instrument Preset
Start with the built-in preset matching your chart (e.g., "ES (S&P 500)" for /ES or MES). This instantly applies battle-tested increments. Use "Custom" only for non-standard assets (forex pairs, micros with different tick values, or crypto alts).
Match Settings to Your Trading Style & Timeframe
Reading the Levels – Decision Framework
Major Levels (thick red by default): Highest probability reaction zones. Expect strong reversals, breakouts with volume, or liquidity sweeps. Treat as primary support/resistance.
Tradable Levels (orange): Active trader defense zones. Excellent for limit order placement, partial profit taking, or fading weak moves.
Sniper Levels (thin gray): Precision entries/exits, stop runs, and scalping targets. Confluence with order blocks or volume profile nodes dramatically increases edge.
Trade Setup Examples
Rejection Play: Price approaches a Major level from below → long wick rejection + close back inside → enter in direction of rejection with stop beyond wick extremity.
Break & Retest: Clean breakout through Tradable/Major → retest as new support/resistance → enter on confirmation candle.
Liquidity Sweep: Price briefly breaches Sniper/Major (stop hunt) → rapid reclaim → aggressive counter-trend entry.
Confluence Boost: When a level aligns with daily/weekly open, VWAP, or prior high/low volume node → dramatically increase position size or conviction.
Risk Management Integration
Always place stops just beyond the next logical level (typically a Sniper or Tradable beyond your entry zone). Use the summary table to quickly identify invalidation points. Target the next level in the direction of your bias for minimum 1:2 risk-reward (often 1:3–1:5 achievable at Major levels).
Pro Optimization Tips
High-volatility sessions (NY open, FOMC, NFP): Increase ATR Multiplier slightly to avoid excessive clutter.
Low-volatility Asian/range sessions: Decrease ATR Multiplier for tighter precision.
Combine with Volume Profile (Fixed Range or Session) to confirm high-volume nodes at psych levels.
Pair with anchored/session VWAP for additional confluence layers.
On higher timeframes, disable Sniper levels and zones entirely for minimalist structural analysis.
Important Disclaimer
This indicator is a professional decision-support tool, not a standalone trading system. All trading involves substantial risk of loss. Past performance is not indicative of future results. Always conduct your own analysis, manage risk appropriately, and consider your financial situation before placing trades.
Mastering psychological levels is one of the highest-edge concepts in institutional trading. Used correctly, this indicator gives you the same reference framework that prop desks and market makers watch every day. Trade smart, stay disciplined, and let price action at these levels guide your executions.
Forecasting
Yearly Projection ExplorerThis indicator helps you understand how the current market period has behaved historically by overlaying the same date window from previous years and projecting it forward from today’s price.
The script works the following way:
Aligns past years to today’s calendar date
Normalizes all paths to the last close at the start
Projects historical performance X bars forward
Displays each year as a separate performance path
Calculates and plots the mean (average) projection for quick reference
🔧 How It Works
Number of Years: choose how many past years to include (e.g. last 10, 20, or 25 years)
Projection Length: choose how many bars (days) ahead to project
Each line shows how the market moved during the same period in a specific year
Labels show the year and total return at the projection end
The mean line highlights the average historical outcome
🧠 Why This Is Useful
Identify seasonal tendencies
Compare current price action to historical analogs
Visualize best / worst historical outcomes
Set realistic expectations for short-term moves
Add context to discretionary or systematic decisions
This tool does not predict the future, but it provides a powerful historical framework to assess what has been typical, rare, or extreme for the current market window.
⚠️ Notes
Script works on timenow variable for now, and you might see unexpected periods if today is a day off.
Results depend on the selected timeframe and instrument
Past performance is not a guarantee of future results
Designed for analysis and context, not standalone signals
Smart stock Uptrend Forecaster by Prawindesigned by Prawin for trying to forecast the trend of stocks.
XAUUSD 240m Pivot PointsThis Indicator helps you to automatically find pivot point S1 S2 S3 R1 R2 and R3 for each and every candle that occurs in 4 hr tf
Smart Money Zones (FVG + OB) + MTF Trend Panel## Overview
Professional-grade institutional trading zones indicator that identifies **Fair Value Gaps (FVG)** and **Order Blocks (OB)** - key price inefficiencies where smart money operates. Includes a comprehensive **Multi-Timeframe Trend Panel** for complete market context at a glance.
## Core Features
### 🎯 Fair Value Gaps (FVG)
Fair Value Gaps occur when price moves so aggressively that it leaves an "imbalance" or "gap" in the market structure. These zones often act as magnets where price returns to find liquidity.
**Detection Logic:**
- **Bullish FVG**: When current candle's low is above the high of the candle 2 bars ago
- **Bearish FVG**: When current candle's high is below the low of the candle 2 bars ago
- Requires strong impulse candle (configurable body percentage threshold)
- Color-coded zones: Green for bullish, Red for bearish
### 📦 Order Blocks (OB)
Order Blocks represent the last opposite candle before a significant price move - the zone where institutional orders were placed before the breakout.
**Detection Logic:**
- Identifies the last bearish candle before a strong bullish breakout (Bullish OB)
- Identifies the last bullish candle before a strong bearish breakout (Bearish OB)
- Validates breakout strength using ATR multiplier (1.2x default)
- Color-coded zones: Blue for bullish, Orange for bearish
### 📊 Multi-Timeframe Trend Panel
Real-time trend analysis across **7 timeframes** displayed in an elegant dashboard:
- **1 Minute** - Ultra short-term scalping
- **5 Minutes** - Short-term momentum
- **15 Minutes** - Intraday swings
- **30 Minutes** - Session trends
- **1 Hour** - Multi-session trends
- **4 Hours** - Daily structure
- **Daily** - Long-term direction
**Visual Indicators:**
- 🟢 Green circle = Bullish trend
- 🔴 Red circle = Bearish trend
- Clean, professional table design with customizable position and size
## Intelligence Features
### 🧠 Zone Strength Rating
Every zone is automatically classified by strength based on size relative to ATR:
- **VERY STRONG** - 2.0x ATR or more (major institutional zones)
- **STRONG** - 1.5x to 2.0x ATR (significant zones)
- **MEDIUM** - 1.0x to 1.5x ATR (moderate zones)
- **WEAK** - Below 1.0x ATR (minor zones)
Strength rating helps you prioritize which zones to trade from!
### 📉 Smart Mitigation Tracking
Zones automatically track how much they've been "filled" or mitigated:
- Calculates penetration percentage as price enters the zone
- Zones turn **gray** when 50%+ mitigated or fully filled
- Option to **auto-delete** mitigated zones to keep chart clean
- Live zones extend dynamically with price action
### 🎨 Trend Filter (Optional)
When enabled, only shows zones aligned with the current trend:
- Uses customizable MA period (default 50)
- Bullish zones only appear in uptrend
- Bearish zones only appear in downtrend
- Reduces noise and false signals significantly
## Customization Options
### Display Settings
- Toggle FVGs and OBs independently
- Adjust max zones per type (5-200)
- Choose to remove or gray out mitigated zones
- Color customization for all zone types
### Detection Parameters
- **Min Impulse Body %**: Controls how strong the impulse candle must be (0.3-1.0)
- **Order Block Lookback**: How many bars to look back for OB validation (5-50)
- **ATR Length**: Period for ATR calculation (5-50)
### Trend Filter
- Enable/disable trend filtering
- Adjustable MA period for trend determination
### MTF Panel
- Show/hide the trend panel
- 4 position options: Top Right, Top Left, Bottom Right, Bottom Left
- 3 size options: Small, Normal, Large
- Customizable MA period for trend calculation across all timeframes
## Trading Applications
### 1. **Liquidity Grab Entries**
Wait for price to sweep a zone (50%+ mitigation) then enter on reversal. Smart money often "hunts" these zones before the real move begins.
### 2. **Confluence Trading**
Look for zones that align with:
- Multiple timeframe trends showing same direction
- Multiple FVGs/OBs stacking in same area
- Key support/resistance levels
### 3. **Breakout Confirmation**
Use Order Blocks to confirm the strength of breakouts. Strong OBs indicate institutional participation.
### 4. **Retracement Entries**
Enter when price returns to a fresh, unmitigated zone in the direction of the higher timeframe trend.
### 5. **Range Trading**
Identify FVG zones at range extremes - price often reverses at these inefficiencies.
## How It Works
**Fair Value Gaps** form when the middle candle creates such aggressive movement that it leaves a price gap between the high/low of surrounding candles. Institutional traders know these gaps get filled.
**Order Blocks** mark the origin of major moves. The last opposite-colored candle before a breakout is where large orders were placed. Price often returns to these zones for "retests" before continuing.
**Mitigation** happens when price returns to fill these zones. The indicator tracks this automatically, showing you which zones are still "fresh" and which have been used up.
## Best Practices
✅ **Use higher timeframe trends** - Always check the MTF panel before taking trades
✅ **Trade fresh zones** - Unmitigated zones (not gray) have the highest probability
✅ **Combine with price action** - Look for rejection wicks and engulfing candles at zones
✅ **Respect zone strength** - VERY STRONG and STRONG zones are most reliable
✅ **Use trend filter** - Especially on lower timeframes to reduce false signals
❌ **Don't overtrade** - Not every zone will react, wait for confirmation
❌ **Don't ignore context** - Check the MTF panel for conflicting trends
❌ **Don't chase** - Wait for price to come to the zone, don't enter mid-zone
## Technical Details
- **Non-repainting**: All zones are drawn on confirmed candles only
- **Performance optimized**: Uses efficient array management with per-type caps
- **Real-time updates**: Zones extend and track mitigation as price moves
- **Universal compatibility**: Works on all markets and timeframes
## Recommended Settings by Style
**Scalping (1m-5m charts):**
- Max zones: 10-15
- Use trend filter: ON
- MTF Panel: Focus on 1m-15m trends
- Remove mitigated: ON (keep chart clean)
**Day Trading (5m-1H charts):**
- Max zones: 15-20
- Use trend filter: ON
- MTF Panel: Focus on 15m-4H trends
- Remove mitigated: OFF (track zone history)
**Swing Trading (1H-D charts):**
- Max zones: 20+
- Use trend filter: Optional
- MTF Panel: Focus on 1H-1D trends
- Remove mitigated: OFF (important zones persist)
---
## Perfect For
- Smart Money Concept (SMC) traders
- ICT methodology followers
- Institutional order flow traders
- Price action traders seeking key zones
- Multi-timeframe analysis enthusiasts
**Compatible with all markets:** Forex, Crypto, Stocks, Indices, Commodities, Futures
*Trade where the institutions trade. Follow the smart money.*
Hookes Kinetics | IkkeOmarHooke's Kinetics: A Physics-Based Volatility System
This indicator applies the principles of Hooke's Law to financial time series data to model market volatility as a system of potential and kinetic energy.
Theoretical Foundation: Hooke's Law In physics, Hooke's Law states that the force (F) needed to extend or compress a spring by some distance (x) scales linearly with respect to that distance: F = -kx, where k is the spring constant.
Potential Energy (PE): PE = 0.5 * k * x^2 Kinetic Energy (KE): Energy possessed due to motion.
In this system, we treat Price Action as a spring. Compression (Potential Energy): When price consolidates, volatility compresses. The "spring" is being wound up. Energy is accumulated, not released. Release (Kinetic Energy): When price breaks out of compression, potential energy transforms into kinetic energy. The spring snaps back, driving price motion.
Indicator Mechanics The Hooke's Kinetics oscillator visualizes this energy transfer cycle to identify trend origins and exhaustion points.
Accumulating Energy (Potential): The Blue Area represents the buildup of Potential Energy. This occurs during periods of low volatility (consolidation). The algorithm detects when price variance drops below a threshold (representing spring compression) and aggregates this "stored force" over time. As long as the price remains compressed, the Blue potential energy grows.
Energy Conversion (Kinetic Release): The Red Histogram represents Kinetic Energy. When volatility expands significantly (a breakout), the system triggers a release event. The accumulated Blue potential energy is discharged and converted into the Red kinetic spike. This marks the moment the "spring" is released.
Trend Direction & Decay: Once the Kinetic Energy (Red spike) appears, the "explosive" phase is active. As the Red histogram decays (lowers back to zero), the market enters a coasting phase. The trend direction is established by the price movement during the initial Kinetic release. Traders observe the price vector as the Red energy dissipates to confirm the prevailing trend.
Reversion Signals (Bonus): Extreme peaks in Kinetic Energy (exceptionally high Red spikes) indicate a maximum extension of the spring. Just as a physical spring oscillates, extreme kinetic release often precedes a mean reversion. If price action opposes the direction of the Kinetic decay, it signals a likely reversal.
Visual Reference Referencing the chart above: Blue Ramp: Note the linear buildup of the blue area during sideways price action. This is the "loading" phase. Red Spike: Note the immediate drop in Blue and spike in Red coinciding with the green highlight circles on the chart. These are the breakout points. Green Circles: These highlight the specific candles where Potential converted to Kinetic, marking the optimal entry or decision points.
Code Description
The system defines market state using a composite variable "k" (Stiffness), which combines Price Volatility (NATR) and Relative Volume (RVOL).
k_price = range_natr != 0 ? 1.0 - ((natr - lowest_natr) / range_natr) : 0 k = (k_price * price_weight) + (k_vol * vol_weight) Here, we normalize volatility relative to a historical lookback. High values of "k" indicate high compression—this is the "winding" of the spring.
if is_compressed potential_energy := potential_energy + k kinetic_energy := kinetic_energy * DECAY_RATE When the market is tighter than the user-defined "stiff_thresh", the system accumulates Potential Energy. Note that Kinetic Energy actively decays during this phase, simulating friction or inertia slowing down price movement.
else drain_factor = (1.0 - k) transfer = potential_energy * drain_factor potential_energy := potential_energy - transfer kinetic_energy := (kinetic_energy * DECAY_RATE) + (transfer * ENERGY_MULT) This acts as the conservation of energy. We do not reset Potential to zero instantly; we drain it. The "drain_factor" ensures that a violent expansion (low k) drains potential energy faster than a mild move. This transferred energy is scaled up and added to the Kinetic state.
Note - AMPLITUDE MATTERS!
Observe the amplitude of the Kinetic Energy - higher peaks are more significant. Lower values are usually artifacts, but they can indicate mean reversion on a smaller scale while price remains within a range.
Liquidity Retest Strategy (Apicode) - TP/SL Lines FixedTechnical Documentation:
1. Purpose and underlying concept
This strategy targets a common behavior in liquid markets: liquidity sweeps around meaningful support/resistance levels, followed by a retest and rejection (reversal) with confirmation.
The core thesis is that many initial “breaks” are not continuation moves, but rather stop-runs and order harvesting. After the sweep, price reclaims the level and closes back on the opposite side, offering a structured entry with defined risk.
The strategy includes:
Support/Resistance detection via pivots
Dynamic selection of the “working” level using an ATR-based proximity window
Rejection validation via candle structure (wick + close)
Optional filters: volume, VWAP-like bias, and EMA trend
Risk management with static TP/SL (ATR-based or %), plus trailing stop (ATR-based or %), with per-trade lines plotted
2. Main components
2.1. Volatility metric: ATR
atr = ta.atr(atrLength) is used in two essential places:
Level selection (proximity to S/R): prevents trading levels that are too far from current price.
Sweep validation (minimum wick size): requires the wick to extend beyond the level by a volatility-relative amount.
Optionally, ATR can also be used for:
Static TP/SL (when usePercent = false)
Trailing stop (when useTrailPercent = false)
2.2. Building S/R levels with pivots
Pivots are detected using:
pivotHigh = ta.pivothigh(pivotLookback, rightBars)
pivotLow = ta.pivotlow(pivotLookback, rightBars)
Each confirmed pivot is stored in arrays:
resistanceLevels for resistance
supportLevels for support
The array size is capped by maxLevels, which reduces noise and manages chart resource usage (lines).
2.3. Selecting the “best” level each bar
On each bar, a single support S and/or resistance R candidate is chosen:
Support: nearest level below price (L < price)
Resistance: nearest level above price (L > price)
Only levels within atr * maxDistATR are considered
This produces dynamic “working levels” that adapt to price location and volatility.
2.4. Rejection pattern (retest + sweep)
After selecting the working level:
Support rejection (long setup)
Conditions:
Low touches/crosses support: low <= S
Close reclaims above: close > S
Bullish candle: close > open
Sufficient wick below the level (liquidity sweep): (S - low) >= atr * minWickATR
This aims to capture a stop sweep below support followed by immediate recovery.
Resistance rejection (short setup)
Symmetric conditions:
High touches/crosses resistance: high >= R
Close rejects back below: close < R
Bearish candle: close < open
Sufficient wick above the level: (high - R) >= atr * minWickATR
2.5. Optional filters
Final signals are the rejection pattern AND enabled filters:
1.- Volume filter
High volume is defined as: volume > SMA(volume, 20) * volMult
When useVolFilter = true, setups require relatively elevated participation
2.- VWAP-like bias filter
A VWAP-like series is computed over vwapLength (typical price weighted by volume)
When useVWAPFilter = true:
- Longs only if close > vwap
- Shorts only if close < vwap
3.- EMA trend filter
Uptrend if EMA(fast) > EMA(slow)
When useTrendFilter = true:
- Longs only in uptrend
- Shorts only in downtrend
2.6. Backtest time window (time filter)
To keep testing focused and reduce long-history noise:
useMaxLookbackDays enables the filter
maxLookbackDays defines how many days back from timenow entries are allowed
Entries are permitted only when time >= startTime.
3. Entry rules and position control
3.1. Entries
strategy.entry('Long', strategy.long) when longSetup and no long position is open
strategy.entry('Short', strategy.short) when shortSetup and no short position is open
No pyramiding is allowed (pyramiding = 0). Position gating is handled by:
Long allowed if strategy.position_size <= 0
Short allowed if strategy.position_size >= 0
4. Risk management: TP/SL and trailing (with plotted lines)
4.1. Detecting entry/exit events
Events are identified via changes in strategy.position_size:
LongEntry: transition into a long
shortEntry: transition into a short
flatExit: transition back to flat
This drives per-trade line creation, updates, and cleanup of state variables.
4.2. Static TP/SL
On entry, entryPrice := strategy.position_avg_price is stored.
Percent mode (usePercent = true)
Long:
staticSL = entryPrice*(1 - slPerc/100)
staticTP = entryPrice*(1 + tpPerc/100)
Short:
staticSL = entryPrice*(1 + slPerc/100)
staticTP = entryPrice*(1 - tpPerc/100)
ATR mode (usePercent = false)
Long:
staticSL = entryPrice - atrAtEntry*slATR
staticTP = entryPrice + atrAtEntry*tpATR
Short:
staticSL = entryPrice + atrAtEntry*slATR
staticTP = entryPrice - atrAtEntry*tpATR
4.3. Trailing stop (custom)
While a position is open, the script tracks the most favorable excursion:
Long: hhSinceEntry = highest high since entry
Short: llSinceEntry = lowest low since entry
A trailing candidate is computed:
Percent trailing (useTrailPercent = true)
Long: trailCandidate = hhSinceEntry*(1 - trailPerc/100)
Short: trailCandidate = llSinceEntry*(1 + trailPerc/100)
ATR trailing (useTrailPercent = false)
Long: trailCandidate = hhSinceEntry - atr*trailATR
Short: trailCandidate = llSinceEntry + atr*trailATR
Then the effective stop is selected:
Long: slUsed = max(staticSL, trailCandidate) when useTrail is enabled
Short: slUsed = min(staticSL, trailCandidate) when useTrail is enabled
If useTrail is disabled, slUsed remains the static stop.
Take profit remains static:
tpUsed = staticTP
Exit orders are issued via:
strategy.exit(..., stop=slUsed, limit=tpUsed)
4.4. Per-trade TP/SL lines
On each entry, two lines are created (SL and TP) via f_createLines().
During the trade, the SL line updates when trailing moves the stop; TP remains fixed.
On exit (flatExit), both lines are finalized on the exit bar and left on the chart as historical references.
This makes it straightforward to visually audit each trade: entry context, intended TP, and trailing evolution until exit.
5. Visualization and debugging
BUY/SELL labels with configurable size (xsize)
Debug mode (showDebug) plots the chosen working support/resistance level each bar
Stored pivot levels are drawn using reusable line slots, projected a fixed 20 bars to the right to keep the chart readable and efficient
6. Parameter guidance and practical notes
pivotLookback / rightBars: controls pivot significance vs responsiveness. Lower rightBars confirms pivots earlier but can increase noise.
maxDistATR: too low may reject valid levels; too high may select distant, less relevant levels.
minWickATR: key quality gate for “real” sweeps. Higher values reduce frequency but often improve signal quality.
Filters:
Volume filter tends to help in ranges and active sessions.
VWAP bias is useful intraday to align trades with session positioning.
EMA trend filter is helpful in directional markets but may remove good mean-reversion setups.
Percent TP/SL: provides consistent behavior across assets with variable volatility, but is less adaptive to sudden regime shifts.
Percent trailing: can capture extensions well; calibrate trailPerc per asset/timeframe (too tight = premature exits).
7. Known limitations
Pivot-derived levels are a heuristic; in strong trends, valid retests may be limited.
The time filter uses timenow; behavior may vary depending on historical context and how the platform evaluates “current time.”
TP/SL and trailing are computed from bar OHLC; in live trading, intrabar sequencing and fills may differ from bar-close simulation.
CME Quarterly ShiftsCME Quarterly Shifts - Institutional Quarter Levels
Overview:
The CME Quarterly Shifts indicator tracks price action based on actual CME futures contract rollover dates, not calendar quarters. This indicator plots the Open, High, Low, and Close (OHLC) for each quarter, with quarters defined by the third Friday of March, June, September, and December - the exact dates when CME quarterly futures contracts expire and roll over.
Why CME Contract Dates Matter:
Institutional traders, hedge funds, and large market participants typically structure their positions around futures contract expiration cycles. By tracking quarters based on CME rollover dates rather than calendar months, this indicator aligns with how major institutional players view quarterly timeframes and position their capital.
Key Features:
✓ Automatic CME contract rollover date calculation (3rd Friday of Mar/Jun/Sep/Dec)
✓ Displays Quarter Open, High, Low, and Close levels
✓ Vertical break lines marking the start of each new quarter
✓ Quarter labels (Q1, Q2, Q3, Q4) for easy identification
✓ Adjustable history - show up to 20 previous quarters
✓ Fully customizable colors and line widths
✓ Works on any instrument and timeframe
✓ Toggle individual OHLC levels on/off
How to Use:
Quarter Open: The opening price when the new quarter begins (at CME rollover)
Quarter High: The highest price reached during the current quarter
Quarter Low: The lowest price reached during the current quarter
Quarter Close: The closing price from the previous quarter
These levels often act as key support/resistance zones as institutions reference them for quarterly performance, rebalancing, and position management.
Settings:
Display Options: Toggle quarterly break lines, OHLC levels, and labels
Max Quarters: Control how many historical quarters to display (1-20)
Colors: Customize colors for each level and break lines
Styles: Adjust line widths for OHLC levels and quarterly breaks
Best Practices:
Combine with other Smart Money Concepts (liquidity, order blocks, FVGs)
Watch for price reactions at quarterly Open levels
Monitor quarterly highs/lows as potential targets or stop levels
Use on higher timeframes (4H, Daily, Weekly) for clearer institutional perspective
Pairs well with monthly and yearly levels for multi-timeframe confluence
Perfect For:
ICT (Inner Circle Trader) methodology followers
Smart Money Concepts traders
Swing and position traders
Institutional-focused technical analysis
Traders tracking quarterly performance levels
Works on all markets: Forex, Indices, Commodities, Crypto, Stocks
NOVA - SessionsKey Features:
Three Major Sessions:
Asia (Tokyo):** Draws the overnight consolidation range (High/Low/Mid).
London:** Draws the breakout session range.
New York:** Draws the reversal/continuation session range (aligned with the Stock Market Open).
Smart Timezone Logic:
All sessions are calculated using their **local** exchange times (e.g., Tokyo time for Asia, NY time for NYSE) but display correctly on your chart in Amsterdam time. You never have to adjust for Daylight Savings.
Support & Resistance:
The Highs, Lows, and Midpoints extend to the right, allowing you to see how previous sessions act as support or resistance later in the day.
Daily Open:
Marks the exact opening price at Midnight to help you determine if price is "premium" (expensive) or "discount" (cheap) for the day.
Midnight VWAP:
A volume-weighted average price that resets every night, acting as a dynamic "fair value" line for the day.
Clean Visuals:
Completely customizable. You can toggle background boxes, lines, and text labels to keep your chart clean.
In short:
It automates the "boring work" of marking up your chart every morning so you can focus purely on price action.
BTC - StableFlow: Pit-Stop & Refuel EngineBTC – StableFlow: Pit-Stop & Refuel Engine | RM
Strategic Context: The Institutional Gas Station In the high-speed race of the crypto markets, Stablecoins (USDT, USDC, DAI) represent the Fuel, and Bitcoin is the Race Car. Most traders only look at the car's speed (Price), but they ignore the gas tank. The StableFlow Engine is a telemetry dashboard designed to monitor the "Fuel Pressure" within the ecosystem, identifying exactly when the car is being refueled and when it is running on empty.
The Telemetry Logic: How to Read the Race
The indicator operates on a Relative Velocity model. We aren't just looking at how many Stablecoins exist; we are measuring the Acceleration of Stablecoin Market Cap relative to the Acceleration of BTC Price.
1. The Fuel Reservoir (The Histogram)
• Cyan Zones (Refuel): The gas station is open. Institutional "Dry Powder" is flowing into stables faster than it is being spent on BTC. The tank is filling up.
• Orange Zones (Exhaust): The "Overdrive." The car is driving faster than the gas can be pumped. Price is outperforming the stablecoin supply—this is unsustainable and usually precedes a stall.
2. Lap Transitions (The Grey Lines)
These vertical markers signify a Regime Shift . They trigger the moment the momentum crosses the zero-axis, visually distinguishing the transition between a "Net-Refueling" period and a "Net-Exhaustion" period. While not used as direct entry signals, they define the Macro Lap we are currently in.
Operational Playbook: The Pit-Stop Signals
We don't just buy because the tank is full; we buy when the car exits the pits and begins to accelerate. This is captured by our proprietary Pit-Stop Pips.
• Blue Pip (Pit-Stop Buy): Triggered when the Refuel momentum has peaked and is now rotating back into the market. The refuel is complete; the car is rejoining the race with a full tank.
• Red Pip (Exhaust Sell): Triggered when the price acceleration has overextended relative to its fuel source and begins to "roll over." The tank is near empty; time for a tactical pull-back.
Settings & Calibration: The Pit Wall Dashboard
Signal Mode & Logic The engine features a dual-mode signaling system to adapt to different market conditions (or your personal preferred logic):
• Consecutive Mode: Best for high-velocity trends. Fires a pip after n bars of momentum reversal (Default: 2 bars).
• Percentage (%) Mode: Best for structural fades. Fires a pip when the momentum retraces by a specific percentage (e.g., 15%) from its local peak, regardless of the bar count.
Recommended Calibration
While the engine is versatile across various timeframes, the Weekly (1W) chart is the preferred setting for identifying high-conviction macro signals. Lower timeframes provide tactical speed, but the 1W frame offers significantly cleaner signals by filtering out the daily market noise.
Weekly (1W) — The Macro Signal (Preferred): * Velocity Lookback: 20 | Smoothing: 5.
Peak Lookback: 25 (Represents roughly half a year of telemetry data). This is a good starting point for identifying major cycle rotations.
Daily (1D) — The Tactical Pulse: * Velocity Lookback: 20 | Smoothing: 5.
Peak Lookback: 25 (Represents one trading month of telemetry). Useful for active swing traders looking for entry/exit timing within an established macro trend.
Technical Documentation
Data Sourcing & Aggregation The script utilizes request.security to aggregate a "Big Three" Stablecoin Market Cap (USDT + USDC + DAI). This prevents "False Exhaustion" signals caused by capital simply migrating between different stablecoin assets.
Mathematical Foundation The core engine calculates the Rate of Change (ROC) for the Aggregate Stablecoin Supply and BTC Price over a synchronized lookback window.
Formula Logic: Fuel Pressure = EMA ( ROC(Stables) - ROC(BTC) )
The Pit-Stop Pips utilize a local peak-finding algorithm via ta.highest and ta.lowest within a rolling 25-bar window to calculate the Relative Retracement Magnitude . This ensures signals are mathematically tied to the volatility of the current market regime.
The Dual-Fuel Framework: StableFlow x Liquisync
The StableFlow Engine is designed to function as the tactical counterpart to the Liquisync: Macro Pulse Engine . While Liquisync monitors the Global Supply Line (the "Tanker Truck" of M2 Liquidity moving from Central Banks toward the track with a 60-day lead), StableFlow measures the Immediate Fuel Pressure (the "Dry Powder" already in the pit lane, ready to be pumped into the car).
By using both indicators in tandem, you can follow the Dual-Fuel Strategy: Liquisync identifies the fundamental macro regime, while StableFlow identifies the specific "Refuel" and "Exhaustion" pivots within that regime. We will be providing a comprehensive breakdown of this synchronized telemetry in our upcoming Substack Masterclass: The Dual-Fuel Architecture.
Risk Disclaimer & Credits
The StableFlow is a thematic macro tool tracking on-chain liquidity proxies. Stablecoin data is subject to exchange reporting delays. This is not financial advice; it is a telemetry model for institutional education. Rob Maths is not liable for losses incurred via use of this model.
Tags:
indicator, bitcoin, btc, stablecoins, usdt, flow, liquidity, macro, refuel, institutional, robmaths, Rob Maths
Smart Money Zones (FVG + OB) + MTF Trend Panel## Overview
Professional-grade institutional trading zones indicator that identifies **Fair Value Gaps (FVG)** and **Order Blocks (OB)** - key price inefficiencies where smart money operates. Includes a comprehensive **Multi-Timeframe Trend Panel** for complete market context at a glance.
## Core Features
### 🎯 Fair Value Gaps (FVG)
Fair Value Gaps occur when price moves so aggressively that it leaves an "imbalance" or "gap" in the market structure. These zones often act as magnets where price returns to find liquidity.
**Detection Logic:**
- **Bullish FVG**: When current candle's low is above the high of the candle 2 bars ago
- **Bearish FVG**: When current candle's high is below the low of the candle 2 bars ago
- Requires strong impulse candle (configurable body percentage threshold)
- Color-coded zones: Green for bullish, Red for bearish
### 📦 Order Blocks (OB)
Order Blocks represent the last opposite candle before a significant price move - the zone where institutional orders were placed before the breakout.
**Detection Logic:**
- Identifies the last bearish candle before a strong bullish breakout (Bullish OB)
- Identifies the last bullish candle before a strong bearish breakout (Bearish OB)
- Validates breakout strength using ATR multiplier (1.2x default)
- Color-coded zones: Blue for bullish, Orange for bearish
### 📊 Multi-Timeframe Trend Panel
Real-time trend analysis across **7 timeframes** displayed in an elegant dashboard:
- **1 Minute** - Ultra short-term scalping
- **5 Minutes** - Short-term momentum
- **15 Minutes** - Intraday swings
- **30 Minutes** - Session trends
- **1 Hour** - Multi-session trends
- **4 Hours** - Daily structure
- **Daily** - Long-term direction
**Visual Indicators:**
- 🟢 Green circle = Bullish trend
- 🔴 Red circle = Bearish trend
- Clean, professional table design with customizable position and size
## Intelligence Features
### 🧠 Zone Strength Rating
Every zone is automatically classified by strength based on size relative to ATR:
- **VERY STRONG** - 2.0x ATR or more (major institutional zones)
- **STRONG** - 1.5x to 2.0x ATR (significant zones)
- **MEDIUM** - 1.0x to 1.5x ATR (moderate zones)
- **WEAK** - Below 1.0x ATR (minor zones)
Strength rating helps you prioritize which zones to trade from!
### 📉 Smart Mitigation Tracking
Zones automatically track how much they've been "filled" or mitigated:
- Calculates penetration percentage as price enters the zone
- Zones turn **gray** when 50%+ mitigated or fully filled
- Option to **auto-delete** mitigated zones to keep chart clean
- Live zones extend dynamically with price action
### 🎨 Trend Filter (Optional)
When enabled, only shows zones aligned with the current trend:
- Uses customizable MA period (default 50)
- Bullish zones only appear in uptrend
- Bearish zones only appear in downtrend
- Reduces noise and false signals significantly
## Customization Options
### Display Settings
- Toggle FVGs and OBs independently
- Adjust max zones per type (5-200)
- Choose to remove or gray out mitigated zones
- Color customization for all zone types
### Detection Parameters
- **Min Impulse Body %**: Controls how strong the impulse candle must be (0.3-1.0)
- **Order Block Lookback**: How many bars to look back for OB validation (5-50)
- **ATR Length**: Period for ATR calculation (5-50)
### Trend Filter
- Enable/disable trend filtering
- Adjustable MA period for trend determination
### MTF Panel
- Show/hide the trend panel
- 4 position options: Top Right, Top Left, Bottom Right, Bottom Left
- 3 size options: Small, Normal, Large
- Customizable MA period for trend calculation across all timeframes
## Trading Applications
### 1. **Liquidity Grab Entries**
Wait for price to sweep a zone (50%+ mitigation) then enter on reversal. Smart money often "hunts" these zones before the real move begins.
### 2. **Confluence Trading**
Look for zones that align with:
- Multiple timeframe trends showing same direction
- Multiple FVGs/OBs stacking in same area
- Key support/resistance levels
### 3. **Breakout Confirmation**
Use Order Blocks to confirm the strength of breakouts. Strong OBs indicate institutional participation.
### 4. **Retracement Entries**
Enter when price returns to a fresh, unmitigated zone in the direction of the higher timeframe trend.
### 5. **Range Trading**
Identify FVG zones at range extremes - price often reverses at these inefficiencies.
## How It Works
**Fair Value Gaps** form when the middle candle creates such aggressive movement that it leaves a price gap between the high/low of surrounding candles. Institutional traders know these gaps get filled.
**Order Blocks** mark the origin of major moves. The last opposite-colored candle before a breakout is where large orders were placed. Price often returns to these zones for "retests" before continuing.
**Mitigation** happens when price returns to fill these zones. The indicator tracks this automatically, showing you which zones are still "fresh" and which have been used up.
## Best Practices
✅ **Use higher timeframe trends** - Always check the MTF panel before taking trades
✅ **Trade fresh zones** - Unmitigated zones (not gray) have the highest probability
✅ **Combine with price action** - Look for rejection wicks and engulfing candles at zones
✅ **Respect zone strength** - VERY STRONG and STRONG zones are most reliable
✅ **Use trend filter** - Especially on lower timeframes to reduce false signals
❌ **Don't overtrade** - Not every zone will react, wait for confirmation
❌ **Don't ignore context** - Check the MTF panel for conflicting trends
❌ **Don't chase** - Wait for price to come to the zone, don't enter mid-zone
## Technical Details
- **Non-repainting**: All zones are drawn on confirmed candles only
- **Performance optimized**: Uses efficient array management with per-type caps
- **Real-time updates**: Zones extend and track mitigation as price moves
- **Universal compatibility**: Works on all markets and timeframes
## Recommended Settings by Style
**Scalping (1m-5m charts):**
- Max zones: 10-15
- Use trend filter: ON
- MTF Panel: Focus on 1m-15m trends
- Remove mitigated: ON (keep chart clean)
**Day Trading (5m-1H charts):**
- Max zones: 15-20
- Use trend filter: ON
- MTF Panel: Focus on 15m-4H trends
- Remove mitigated: OFF (track zone history)
**Swing Trading (1H-D charts):**
- Max zones: 20+
- Use trend filter: Optional
- MTF Panel: Focus on 1H-1D trends
- Remove mitigated: OFF (important zones persist)
---
## Perfect For
- Smart Money Concept (SMC) traders
- ICT methodology followers
- Institutional order flow traders
- Price action traders seeking key zones
- Multi-timeframe analysis enthusiasts
**Compatible with all markets:** Forex, Crypto, Stocks, Indices, Commodities, Futures
*Trade where the institutions trade. Follow the smart money.*
SMC Ultra-Fast: ALL-IN & Auto-Signal [Fixed]How to Use the SMC Pro Indicator: ALL-IN & Dynamic S/R is designed to help you trade following the "Smart Money" quickly and accurately. The usage steps are as follows:
1. Reading Entry Signals
🔥 ALL-IN BUY/SELL: This is the most accurate signal, generated by a breakout of a key support level (Pivot) combined with unusually high trading volume (1.5 times higher) and confirmation from the EMA trend.
Fast Buy/Sell (Small Triangle): This is a supplementary signal when the EMA Fast line crosses the EMA Slow line. It's suitable for finding opportunities to "Follow the Trend" or add to positions when the trend strengthens.
2. Managing Targets (TP/SL/Entry)
When the ALL-IN signal appears, the system will immediately draw three lines to the right of the graph:
Gray line (ENTRY): The price point where you should open an order.
Blue line (TP): Profit target. Calculated using a Risk:Reward Ratio of 2.0 (adjustable).
Red line (SL): Stop-loss point calculated from the ATR value for safety.
3. Using Support and Resistance Boxes (Dynamic Zones)
Green box (Support): Zone with strong buying pressure. If the price tests this level and doesn't break below, there's a high chance of a rebound.
Red box (Resistance): Zone with accumulated selling pressure. If the price tests this level and fails to break through, there's a chance of a pullback.
Disappearance of boxes: When the price "breaks through" the bar, these boxes automatically disappear to indicate that the zone has been broken, and the system will immediately start looking for a new, stronger zone.
4. Auto-Reset System (Completion of Trade)
When the price hits the TP or SL line, the system will mark an "X" on the screen.
The old target line will be immediately deleted to clear the position, making the chart look clean and ready for a new ALL-IN signal.
💡 Additional Tip:
Candlestick color: Trade Buy when the candlestick is green, and trade Sell when the candlestick is red.
If the candlestick is orange, it means the market is sideways. It is recommended to wait for a clear ALL-IN signal before entering a trade.
วิธีใช้งานอินดิเคเตอร์ SMC Pro: ALL-IN & Dynamic S/R นี้ออกแบบมาเพื่อให้คุณเทรดตามรอย "เจ้ามือ" (Smart Money) ได้อย่างรวดเร็วและแม่นยำที่สุด โดยมีขั้นตอนการใช้งานดังนี้ครับ:
1. การอ่านสัญญาณจุดเข้า (Entry Signals)
🔥 ALL-IN BUY/SELL: เป็นสัญญาณที่มีความแม่นยำสูงสุด เกิดจากการเบรคเอาท์แนวสำคัญ (Pivot) ร่วมกับมีแรงซื้อขาย (Volume) สูงกว่าปกติ 1.5 เท่า และเทรนด์ของ EMA ยืนยัน
Fast Buy/Sell (สามเหลี่ยมเล็ก): เป็นสัญญาณเสริมเมื่อเส้น EMA Fast ตัดกับ EMA Slow เหมาะสำหรับใช้หาจังหวะ "Follow Trend" หรือเข้าเพิ่มไม้เมื่อเทรนด์เริ่มแข็งแกร่ง
2. การจัดการเป้าหมาย (TP/SL/Entry)
เมื่อสัญญาณ ALL-IN ปรากฏ ระบบจะวาดเส้น 3 เส้นไปทางด้านขวาของกราฟทันที:
เส้นสีเทา (ENTRY): จุดราคาที่คุณควรเปิดออเดอร์
เส้นสีน้ำเงิน (TP): เป้าหมายทำกำไร ซึ่งคำนวณจากค่า Risk:Reward Ratio ที่ 2.0 เท่า (ตั้งค่าได้)
เส้นสีแดง (SL): จุดตัดขาดทุนที่คำนวณจากค่า ATR เพื่อความปลอดภัย
3. การใช้งานกล่องแนวรับ-แนวต้าน (Dynamic Zones)
กล่องสีเขียว (Support): โซนที่มีแรงซื้อหนาแน่น หากราคาลงมาทดสอบแล้วไม่หลุด มีโอกาสเด้งกลับสูง
กล่องสีแดง (Resistance): โซนที่มีแรงขายสะสม หากราคาวิ่งขึ้นไปทดสอบแล้วไม่ผ่าน มีโอกาสย่อตัวลง
การหายไปของกล่อง: เมื่อราคา "ปิดแท่งทะลุ" กล่องเหล่านี้จะหายไปโดยอัตโนมัติ เพื่อบอกว่าโซนนั้นถูกทำลายแล้ว และระบบจะเริ่มหาโซนใหม่ที่แข็งแกร่งกว่าให้ทันที
4. ระบบ Auto-Reset (จบงาน)
เมื่อราคาเคลื่อนที่ไปชนเส้น TP หรือ SL ระบบจะทำเครื่องหมาย "X" บนหน้าจอ
เส้นเป้าหมายเก่าจะถูกลบออกทันที เพื่อล้างสถานะให้กราฟดูสะอาดและพร้อมสำหรับสัญญาณ ALL-IN รอบใหม่ครับ
💡 เคล็ดลับเพิ่มเติม:
สีแท่งเทียน: เทรดหน้า Buy เมื่อแท่งเทียนสีเขียว และเทรดหน้า Sell เมื่อแท่งเทียนสีแดง
หากแท่งเทียนเป็น สีส้ม หมายถึงตลาดกำลังเลือกทาง (Sideway) แนะนำให้รอสัญญาณ ALL-IN ที่ชัดเจนก่อนเข้าเทรดครับ
SMC Ultra-Fast: ALL-IN & Auto-Signal [Fixed]Designed to help traders who know absolutely nothing about the market.
And for those whose signals don't disappear, once it goes up, it stays up. 90 percent chance of beating the market.
Confluence Execution Engine (2of3)The Confluence Execution Engine is a high-performance logic gate designed to filter out market noise and identify high-probability "Golden" entries. It moves beyond simple indicator signals by acting as a mathematical validator for price action. This engine is designed for the Systematic Trader. It removes the "guesswork" of whether a move is real or an exhaustion pump by requiring a mathematical confluence of volume, multi-timeframe momentum, and volatility-adjusted space.
Why This Tool is Unique:
Multi-Dimensional Scoring, Momentum-Adjusted Stretch, Institutional Fingerprint (RVOL + Spike)
Unlike a standard MACD or RSI, this engine uses a weighted scoring matrix. It pulls a "Bundle" of data (WaveTrend, RSI, ROC) from four different timeframes simultaneously. It doesn't give a signal unless the mathematical weight of all four timeframes crosses your "Hurdle" (Base Threshold).
Standard "overbought" indicators are often wrong during strong trends. This engine uses Dynamic Z-Score logic. The Logic: If the price moves away from the mean, it checks the Rate of Change (ROC). The Result: If momentum is massive, the "Stretch" limit expands. It understands that a "stretched" price is actually a sign of strength in a breakout, not a reason to exit. It only warns of a TRAP RISK when the price is far from the mean but momentum is starting to stall.
The engine is gated by Relative Volume. If the market is "sleepy," the engine stays in "PATIENCE" mode. It specifically hunts for Volume Spikes (default 2.5x average). A signal is only upgraded to "HIGH CONVICTION" when an institutional volume spike occurs, confirming that "Big Money" is participating.
How to Operate the Engine
Define Your Hurdle: Set your Confluence Hurdle. A higher number (e.g., 14+) requires more agreement across timeframes, leading to fewer but higher-quality trades.
Monitor the Z/Dynamic Ratio: In the HUD, watch the Z: X.XX / Y.YY. When X approaches Y, you are reaching the edge of the momentum-adjusted move.
The Entry Trigger: Wait for a "LOOK FOR..." advice to turn into a "HIGH CONVICTION" signal (marked by a triangle shape). This confirms that the MTF scoring, Volume, and HTF Trend are all aligned.
Execute the Lines: Use the red and green "Ghost Lines" to set your orders. These are ATR-based, meaning they widen during high volatility to give your trade room to breathe.
For holistic trading system, pair with Volatility Shield Pro and Session Levels
Session Volume Analyzer [JOAT]
Session Volume Analyzer — Global Trading Session and Volume Intelligence System
This indicator addresses the analytical challenge of understanding market participation patterns across global trading sessions. It combines precise session detection with comprehensive volume analysis to provide insights into when and how different market participants are active. The tool recognizes that different trading sessions exhibit distinct characteristics in terms of participation, volatility, and volume patterns.
Why This Combination Provides Unique Analytical Value
Traditional session indicators typically only show time boundaries, while volume indicators show raw volume data without session context. This creates analytical gaps:
1. **Session Context Missing**: Volume spikes without session context provide incomplete information
2. **Participation Patterns Hidden**: Different sessions have different participant types (retail, institutional, algorithmic)
3. **Comparative Analysis Lacking**: No easy way to compare volume patterns across sessions
4. **Timing Intelligence Absent**: Understanding WHEN volume occurs is as important as HOW MUCH volume occurs
This indicator's originality lies in creating an integrated session-volume analysis system that:
**Provides Session-Aware Volume Analysis**: Volume data is contextualized within specific trading sessions
**Enables Cross-Session Comparison**: Compare volume patterns between Asian, London, and New York sessions
**Delivers Participation Intelligence**: Understand which sessions are showing above-normal participation
**Offers Real-Time Session Tracking**: Know exactly which session is active and how current volume compares
Technical Innovation and Originality
While session detection and volume analysis exist separately, the innovation lies in:
1. **Integrated Session-Volume Architecture**: Simultaneous tracking of session boundaries and volume statistics creates comprehensive market participation analysis
2. **Multi-Session Volume Comparison System**: Real-time calculation and comparison of volume statistics across different global sessions
3. **Adaptive Volume Threshold Detection**: Automatic identification of above-average volume periods within session context
4. **Comprehensive Visual Integration**: Session backgrounds, volume highlights, and statistical dashboards provide complete market participation picture
How Session Detection and Volume Analysis Work Together
The integration creates a sophisticated market participation analysis system:
**Session Detection Logic**: Uses Pine Script's time functions to identify active sessions
// Session detection based on exchange time
bool inAsian = not na(time(timeframe.period, asianSession))
bool inLondon = not na(time(timeframe.period, londonSession))
bool inNY = not na(time(timeframe.period, nySession))
// Session transition detection
bool asianStart = inAsian and not inAsian
bool londonStart = inLondon and not inLondon
bool nyStart = inNY and not inNY
**Volume Analysis Integration**: Volume statistics are calculated within session context
// Session-specific volume accumulation
if asianStart
asianVol := 0.0
asianBars := 0
if inAsian
asianVol += volume
asianBars += 1
// Real-time session volume analysis
float asianAvgVol = asianBars > 0 ? asianVol / asianBars : 0
**Relative Volume Assessment**: Current volume compared to session-specific averages
float volMA = ta.sma(volume, volLength)
float volRatio = volMA > 0 ? volume / volMA : 1
// Volume classification within session context
bool isHighVol = volRatio >= 1.5 and volRatio < 2.5
bool isVeryHighVol = volRatio >= 2.5
This creates a system where volume analysis is always contextualized within the appropriate trading session, providing more meaningful insights than raw volume data alone.
Comprehensive Session Analysis Framework
**Default Session Definitions** (customizable based on broker timezone):
- **Asian Session**: 1800-0300 (exchange time) - Represents Asian market participation including Tokyo, Hong Kong, Singapore
- **London Session**: 0300-1200 (exchange time) - Represents European market participation
- **New York Session**: 0800-1700 (exchange time) - Represents North American market participation
**Session Overlap Analysis**: The system recognizes and highlights overlap periods:
- **London/New York Overlap**: 0800-1200 - Typically the highest volume period
- **Asian/London Overlap**: 0300-0300 (brief) - Transition period
- **New York/Asian Overlap**: 1700-1800 (brief) - End of NY, start of Asian
**Volume Intelligence Features**:
1. **Session-Specific Volume Accumulation**: Tracks total volume within each session
2. **Cross-Session Volume Comparison**: Compare current session volume to other sessions
3. **Relative Volume Detection**: Identify when current volume exceeds historical averages
4. **Participation Pattern Analysis**: Understand which sessions show consistent high/low participation
Advanced Volume Analysis Methods
**Relative Volume Calculation**:
float volMA = ta.sma(volume, volLength) // Volume moving average
float volRatio = volMA > 0 ? volume / volMA : 1 // Current vs average ratio
// Multi-tier volume classification
bool isNormalVol = volRatio < 1.5
bool isHighVol = volRatio >= 1.5 and volRatio < 2.5
bool isVeryHighVol = volRatio >= 2.5
bool isExtremeVol = volRatio >= 4.0
**Session Volume Tracking**:
// Cumulative session volume with bar counting
if londonStart
londonVol := 0.0
londonBars := 0
if inLondon
londonVol += volume
londonBars += 1
// Average volume per bar calculation
float londonAvgVol = londonBars > 0 ? londonVol / londonBars : 0
**Cross-Session Volume Comparison**:
The system maintains running totals for each session, enabling real-time comparison of participation levels across different global markets.
What the Display Shows
Session Backgrounds — Colored backgrounds indicating which session is active
- Pink: Asian session
- Blue: London session
- Green: New York session
Session Open Lines — Horizontal lines at each session's opening price
Session Markers — Labels (AS, LN, NY) when sessions begin
Volume Highlights — Bar coloring when volume exceeds thresholds
- Orange: High volume (1.5x+ average)
- Red: Very high volume (2.5x+ average)
Dashboard — Current session, cumulative volume, and averages
Color Scheme
Asian — #E91E63 (pink)
London — #2196F3 (blue)
New York — #4CAF50 (green)
High Volume — #FF9800 (orange)
Very High Volume — #F44336 (red)
Inputs
Session Times:
Asian Session window (default: 1800-0300)
London Session window (default: 0300-1200)
New York Session window (default: 0800-1700)
Volume Settings:
Volume MA Length (default: 20)
High Volume threshold (default: 1.5x)
Very High Volume threshold (default: 2.5x)
Visual Settings:
Session colors (customizable)
Show/hide backgrounds, lines, markers
Background transparency
How to Read the Display
Background color shows which session is currently active
Session open lines show where each session started
Orange/red bars indicate above-average volume
Dashboard shows cumulative volume for each session today
Alerts
Session opened (Asian, London, New York)
High volume bar detected
Very high volume bar detected
Important Limitations and Realistic Expectations
Session times are approximate and depend on your broker's server timezone—manual adjustment may be required for accuracy
Volume data quality varies significantly by broker, instrument, and market type
Cryptocurrency and some forex markets trade continuously, making traditional session boundaries less meaningful
High volume indicates participation level only—it does not predict price direction or market outcomes
Session participation patterns can change over time due to market structure evolution, holidays, and economic conditions
This tool displays historical and current market participation data—it cannot predict future volume or price movements
Volume spikes can occur for numerous reasons unrelated to directional price movement (news, algorithmic trading, etc.)
Different instruments exhibit different session sensitivity and volume patterns
Market holidays and special events can significantly alter normal session patterns
Appropriate Use Cases
This indicator is designed for:
- Market participation pattern analysis
- Session-based trading schedule planning
- Volume context and comparison across sessions
- Educational study of global market structure
- Supplementary analysis for session-based strategies
This indicator is NOT designed for:
- Standalone trading signal generation
- Volume-based price direction prediction
- Automated trading system triggers
- Guaranteed session pattern repetition
- Replacement of fundamental or sentiment analysis
Understanding Session Analysis Limitations
Session analysis provides valuable context but has inherent limitations:
- Session patterns can change due to economic conditions, holidays, and market structure evolution
- Volume patterns may not repeat consistently across different market conditions
- Global events can override normal session characteristics
- Different asset classes respond differently to session boundaries
- Technology and algorithmic trading continue to blur traditional session distinctions
— Made with passion by officialjackofalltrades
Verified Astro-Table SimplifiedThis script, titled the **Financial Astrological Ephemeris Table**, is designed to be a high-precision astronomical dashboard for TradingView. Unlike standard indicators that rely on price formulas, this script serves as a **digital bridge** between professional Swiss Ephemeris data and your trading chart.
Here is a detailed breakdown of what the script provides and how to maximize its utility.
---
**1. What the Script Provides**
**A. 100% Ephemeris Synchronization**
Most "Astro" indicators in TradingView use "mean motion" math, which drifts over time. This script uses **Static Switch Logic**. By hard-coding the data from the Swiss Ephemeris, the script ensures that the degrees you see on your chart match the physical reality of the sky.
* **Sun & Moon**: Accurate to the degree for the current period.
* **Saturn & Outer Planets**: Corrects the "sign drift" found in other scripts, keeping Saturn in its true position (late Pisces for 2025).
**B. Sign & Degree Tracking**
The script translates raw longitude (0–360°) into the traditional 12-sign zodiac format (`Sign` + `Degree`). This allows you to immediately identify where planets are transiting relative to key price levels.
**C. The Sun-Relative House System**
The script calculates an **Equal House System** based on the Sun's current position.
* This treats the Sun as the "Rising" point for the day's dashboard, showing you how other planets are "angled" relative to the Sun's current solar light.
**D. Stability and Performance**
Because the script uses `barstate.islast`, it only calculates for the most recent candle. This prevents "Runtime Errors" and ensures your TradingView platform remains fast and responsive, even on low-powered laptops.
---
**2. How to Use it Effectively**
**A. Identifying Confluence with Price**
Watch for "Degree Hits." If the table shows **Saturn at 25° Pisces** and your asset is hitting a major resistance level at a number ending in **25** (or a harmonic like 2.50), it signifies a moment of "Astro-Price Confluence." These are often high-probability reversal points.
**B. Customizing the Visual Experience**
You can tailor the dashboard to your specific chart layout via the **Settings (Gear Icon)**:
* **Position**: Move the table to any corner (Top Right, Bottom Left, etc.) so it doesn't block your price action.
* **Transparency**: Adjust the "Background Color" to make the table more subtle or more prominent.
* **Text Size**: If you trade on a mobile device, set the text to "Normal." If you use a 4K monitor, set it to "Tiny" to save space.
**C. Managing the "Switch" Data**
To keep the script accurate for the long term, I will update the `get_pdf_lon` block once a month (or once a year) with the new coordinates from the Swiss Ephemeris.
**D. Directional Trading (The "Dir" Column)**
The script includes a "Direction" column. Use this to track if a planet is **Direct (D)** or **Retrograde (Rx)**.
**Strategy**: If a planet is listed as "D," its influence is considered "forward-moving" and predictable. If you update the code to show "Rx," expect the market sectors associated with that planet to experience "re-evaluations" or delays.
---
### Summary of Benefits for the User
1. **Eliminates Guesswork**: You no longer have to flip between an Ephemeris and TradingView; the data is on your screen.
2. **Historical Analysis**: You can manually change the data in the script to a historical date to see exactly how the "Astro-Weather" looked during a previous market crash or rally.
Gamma Levels - Options Flow# 📊 Gamma Levels - Options Flow Indicator
## TradingView Free Indicator - By AsiaQuant
---
## 🎯 What Is This?
**Gamma Levels** is a simplified TradingView indicator that shows estimated support and resistance levels based on institutional options positioning. It helps traders identify key price zones where options market makers are likely positioned.
### Key Features:
- **⚡ Gamma Flip Level**: The inflection point where dealer hedging behavior changes
- **🔴 Call Wall**: Overhead resistance from call option concentration
- **🟢 Put Support**: Downside support from put option concentration
- **🎯 Trading Zone**: The range between support and resistance
- **📊 Regime Detection**: Positive vs Negative Gamma environments
---
## 📈 How To Use
### 1. **Gamma Flip Level (⚡)**
The Gamma Flip is the most critical level. It represents where market maker hedging flips from stabilizing to destabilizing:
- **Above Gamma Flip**: Positive gamma environment → Lower volatility, mean reversion
- **Below Gamma Flip**: Negative gamma environment → Higher volatility, trend continuation
**Trading Strategy:**
- When price is **above** gamma flip: Fade extremes, trade ranges
- When price is **below** gamma flip: Follow momentum, breakouts more likely
### 2. **Call Wall (🔴)**
The Call Wall represents overhead resistance where heavy call open interest sits:
- Acts as a **magnet** when price approaches from below
- Acts as **resistance** when price tests it
- Breaking above often leads to squeeze moves
**Trading Strategy:**
- Use as profit target for long positions
- Watch for rejection and reversal setups
- Breaking through = potential gamma squeeze
### 3. **Put Support (🟢)**
The Put Support level shows where heavy put positioning provides downside support:
- Acts as **support** on pullbacks
- Breaking below signals bearish momentum
- Often bounces near this level
**Trading Strategy:**
- Use as entry zone for long positions
- Stop loss just below this level
- Breaking through = potential flush lower
### 4. **Trading Zone (Blue Shaded Area)**
The zone between Call Wall and Put Support shows the expected trading range:
- **Narrow zones** = Low volatility, potential breakout setup
- **Wide zones** = High volatility, choppy action expected
- Price tends to stay within this zone
---
## 🚦 Regime Guide
### Positive Gamma Regime (Green Background)
- Price above Gamma Flip
- Lower volatility expected
- Mean reversion strategies work better
- Selling premium strategies favorable
### Negative Gamma Regime (Red Background)
- Price below Gamma Flip
- Higher volatility expected
- Trend following strategies work better
- Directional trades more profitable
---
## ⚠️ Important Limitations
This is a **SIMPLIFIED** indicator that uses price action and volume as proxies for options positioning. It does NOT use real options chain data.
### What This Indicator Does:
✅ Estimates levels using VWAP and ATR
✅ Shows general zones of interest
✅ Provides educational framework
✅ Works on any timeframe
### What This Indicator CANNOT Do:
❌ Access real options open interest
❌ Calculate actual gamma exposure
❌ Account for 0DTE dynamics
❌ Include Vanna/Charm effects
❌ Use volatility surface interpolation
---
## 🔓 Want The Full Professional Version?
### **GEX Pro - Institutional Grade Analysis**
**Visit: (gexpro.asiaquant.com)**
#### What You Get:
- ✅ **Real Options Data**: Live OI and volume from actual options chains
- ✅ **20+ Metrics**: GEX, DEX, Vanna, Charm, Volga, IV Skew, and more
- ✅ **0DTE Logic**: Proprietary algorithm for same-day expiration positioning
- ✅ **Volatility Surface**: Cubic spline interpolation eliminates "ghost walls"
- ✅ **Shadow Gamma**: Advanced second-order risk exposure
- ✅ **Multi-Expiration**: Analyze 0DTE, weekly, and monthly expirations simultaneously
- ✅ **Directional Scoring**: AI-powered conviction scoring with 5 components
- ✅ **Trade Ideas**: Specific setups based on positioning
- ✅ **440+ Tickers**: SPY, QQQ, IWM, AAPL, TSLA, NVDA, and more
#### The Difference:
| Feature | TradingView Free | GEX Pro |
|---------|------------------|---------|
| Data Source | Price/Volume Proxy | Real Options Chains |
| Gamma Calculation | Estimated | Actual Black-Scholes |
| Advanced Greeks | ❌ | ✅ Vanna, Charm, Volga |
| 0DTE Handling | ❌ | ✅ Volume Priority |
| Vol Surface | ❌ | ✅ Cubic Spline |
| Conviction Score | ❌ | ✅ 5-Component Model |
| Trade Setups | ❌ | ✅ Directional Ideas |
---
## 📚 Educational Resources
### Recommended Reading:
1. **"Gamma Exposure and Market Dynamics"** - Understanding dealer hedging
2. **"Volatility Trading"** by Euan Sinclair - Options Greeks in practice
3. **"The Volatility Surface"** by Jim Gatheral - Advanced vol modeling
### Key Concepts:
- **Gamma Exposure (GEX)**: The rate of change of delta with respect to price
- **Dealer Hedging**: How market makers adjust their stock positions
- **Positive Gamma**: Dealers buy dips, sell rips → stabilizing
- **Negative Gamma**: Dealers sell dips, buy rips → destabilizing
- **Vanna**: Sensitivity to spot and volatility changes
- **Charm**: Time decay of delta
---
## 🎓 Best Practices
### ✅ DO:
- Use in conjunction with price action and volume
- Combine with support/resistance levels
- Pay attention to regime changes
- Use for planning entries/exits
- Monitor gamma flip proximity
### ❌ DON'T:
- Rely solely on this indicator
- Ignore overall market conditions
- Trade against strong trends
- Over-leverage based on levels
- Treat estimates as absolute truth
---
## 📊 Example Scenarios
### Scenario 1: Approaching Call Wall
- Price rallies toward Call Wall ($595 on SPY)
- Volume increases as it approaches
- **Action**: Consider taking profits on longs, watch for rejection
### Scenario 2: Gamma Flip Cross
- Price crosses below Gamma Flip
- Regime changes to Negative Gamma
- **Action**: Reduce range trading, prepare for momentum
### Scenario 3: Bouncing Off Put Support
- Price tests Put Support ($580 on SPY)
- High volume at the test
- **Action**: Entry for longs with stop below support
---
## 🔧 Settings Guide
### Lookback Period (Default: 20)
- **Lower (10-15)**: More responsive, better for day trading
- **Higher (30-50)**: Smoother, better for swing trading
### Volatility Multiplier (Default: 1.5)
- **Lower (1.0-1.2)**: Tighter zones, more frequent tests
- **Higher (2.0-3.0)**: Wider zones, fewer tests but stronger
### Display Options
- Toggle individual levels on/off based on your strategy
- Customize colors to match your chart theme
---
## ❓ FAQ
**Q: Why don't the levels match actual options strikes?**
A: This free version uses price action approximations. For real strike-level precision, use GEX Pro.
**Q: How often should levels update?**
A: The indicator recalculates every bar. For real options data that updates throughout the day, use GEX Pro.
**Q: Can I use this for day trading?**
A: Yes, but it's approximations. For intraday 0DTE positioning, GEX Pro has specialized logic.
**Q: What timeframe works best?**
A: Works on all timeframes, but 15min-1hour is optimal for the simplified calculation.
**Q: Is this better than just support/resistance?**
A: It adds an options perspective, but should complement (not replace) standard TA.
---
## 🚀 Upgrade To GEX Pro
Ready for institutional-grade analysis?
### ** (gexpro.asiaquant.com)**
- Real options data from 440+ tickers
- 20+ advanced metrics
- AI-powered trade signals
- Professional-grade analytics
- API access available
**Stop guessing. Start knowing where the institutions are positioned.**
---
## 📧 Support & Contact
- **Website**: (gexpro.asiaquant.com)
- **Questions**: Contact form on website
- **TradingView**: Leave comments on the indicator
---
## ⚖️ Disclaimer
This indicator is for **educational purposes only**. It is not financial advice. Options and derivatives trading involves significant risk. Past performance does not guarantee future results. Always do your own research and consult with a financial advisor before making trading decisions.
The simplified calculations in this free version are approximations and may not reflect actual market conditions. For professional trading decisions, use verified data sources and professional-grade tools.
---
**Version**: 1.0
**Last Updated**: December 2024
**Created By**: AsiaQuant Research
### 🔓 **Unlock the full power: (gexpro.asiaquant.com)**
MA Crossover with R SquaredThis indicator enhances the classic Moving Average (MA) crossover strategy with statistical filtering and prediction capabilities.
Let me explain what it does:
Instead of just showing when a fast MA crosses above/below a slow MA, this indicator adds R² (R-squared) filtering to identify higher-quality crossovers and predicts future crossovers.
What is R²?
R² (Coefficient of Determination) is a statistical measure that shows how well one variable explains the movement of another variable. In simpler terms:
R² = 1.0: Perfect relationship - 100% of the movement in one MA is explained by the other MA
R² = 0.8: Strong relationship - 80%
R² = 0.5: Moderate relationship - 50%
R² = 0.0: No relationship - 0%
Imagine two cars driving on a highway:
High R² (0.9): Both cars are in the same lane, moving together consistently
Low R² (0.3): One car is weaving between lanes while the other stays straight - poor coordination.
Traditional MA crossovers often generate false signals during:
Choppy markets (price bouncing around)
Sideways/ranging markets
Low volatility periods
News events causing temporary spikes
The R² Solution:
R² acts as a "quality filter" that answers: "How meaningful this crossover is?"
What this means:
Before R² filtering: Every crossover generates a signal
After R² filtering: Only crossovers with R² > threshold generate signals
Result: Fewer but higher-quality signals.
MARKET REGIME DETECTION
High R² (> 0.7): Strong trending market - MA crossovers are reliable
Medium R² (0.4-0.7): Moderate trending - use with caution
Low R² (< 0.4): Choppy/range-bound market - avoid MA crossover signals
Increasing R²: MAs are converging/moving together more closely
Decreasing R²: MAs are diverging/losing coordination
Sudden R² drop: Potential market regime change.
Why Square the Correlation?
Correlation: Measures direction AND strength (-1 to +1)
R²: Measures strength ONLY (0 to 1)
In trading: We care about relationship strength, not direction
Direction is already indicated by crossover type (bullish/bearish)
Real-World Interpretation:
If R² = 0.64, it means:
64% of the variation in the fast MA is explained by the slow MA
36% is "noise" or unexplained movement
The MAs are moderately coordinated.
R² Trend Confirmation:
Entry: When crossover occurs AND R² is above threshold
Confirmation: R² continues rising after entry
Exit: R² drops below threshold (relationship weakening)
Multi-Timeframe R² Analysis
Check R² on higher timeframe for trend context
Use current timeframe for entry signals
Example: Daily R² > 0.7 gives bullish bias, use 1-hour for entries.
R² LIMITATIONS & CAUTIONS
1. Lagging Nature
R² is calculated from past data
By the time R² is high, the trend may already be established
2. Not a Standalone Indicator
R² should confirm other signals, not generate them alone
Always combine with price action, volume, support/resistance
3. Curve Fitting Risk
Don't over-optimize R² thresholds on historical data
What worked in the past may not work in the future
Use R² as a filter, not a predictor
4. Market-Specific Behavior
R² thresholds that work in trending stocks may fail in Forex
Cryptocurrencies may require different R² settings than commodities
Always test on your specific market/instrument
Before Taking Any Signal:
✅ Does the crossover have a colored circle? (R² > threshold)
✅ What's the R² number shown? (Higher = better)
✅ Is R² rising or falling? (Rising = strengthening relationship)
✅ Check history table - what happened with similar R² values?
✅ Consider prediction - does it align with current signal?
Simple R² Rules of Thumb:
R² > 0.8: Excellent signal quality
R² 0.6-0.8: Good signal quality
R² 0.4-0.6: Moderate - use additional confirmation
R² < 0.4: Poor - avoid or use extreme caution
Think of R² as:
A quality control inspector for MA crossovers
A relationship therapist for your moving averages
A statistical bouncer that only lets strong signals through
Higher win rate + Better risk/reward = More profitable trading
This script transforms the basic "when lines cross" approach into a sophisticated, statistically-validated trading system. R² is the secret sauce that separates random crossovers (Golden/Death) from meaningful trend changes.
DISCLAIMER: This information is provided for educational purposes only and should not be considered financial, investment, or trading advice. Please do boost if you like it. Happy Trading.
BTC - Liquisync: Macro Pulse & Desync EngineLiquisync: Macro Pulse & Desync Engine | RM
Strategic Context: The Macro Fuel Tank
Why compare Global Liquidity to Bitcoin? Because Bitcoin acts as a "Global M2 Sponge." As central banks expand their balance sheets, this "Fuel" filters into the system, taking roughly 56 to 70 days to reach Bitcoin's price. Liquisync measures this lead-lag relationship to determine if the "Engine" (Price) is properly supported by the "Fuel" (M2).
How the Model Differs: Liquisync vs. Standard Macro Composites
Many existing macro scripts focus on a Linear Sum of indicators—adding up M2, Spread, and Copper/Gold into a single Z-score. While useful for general sentiment, these "Composite" models often suffer from Directional Blindness. They tell you if the environment is "Risk-On," but they cannot tell you if the Price is currently lying about the Liquidity.
The Liquisync Edge:
• Conflict Detection: Unlike composites that simply turn red or green, Liquisync identifies Desync.
• Velocity Normalization: Instead of Z-scoring absolute values, we measure the Acceleration (Slope) of the move, allowing us to see "Decay" before the trend actually flips.
How the Model Works
1. Pulse Velocity Mapping (The Dual-Slope Architecture)
The engine utilizes a Dual-Slope Architecture to measure the "Dynamic Force" behind the market. By calculating the Linear Regression Slope for both Global Liquidity and BTC Price, we are measuring Acceleration.
• Liquidity Slope (The Fuel): Measures the speed at which central banks are expanding or contracting the money supply.
• Price Slope (The Engine): Measures the speed at which the market is repricing Bitcoin in response to that money (or due to other factors).
The Mathematical Bridge: We don't just plot these lines independently; we normalize them. Because Global M2 is measured in Trillions and BTC in Thousands of Dollars, we transform both into a unified Relative Pulse Score (-100 to +100).
Liquisync: The 4 Macro Scenarios (Directional Matrix) By measuring the interconnectivity of these two pulses, the engine identifies four distinct market regimes:
Scenario A: Institutional Expansion (Harmony) Liquidity Slope (+ rising) | Price Slope (+ rising) Harmony. The trend is "True." The price increase is fully supported by global money. (Scenario Jan 2023)
Scenario B: The Bear Trap (Desync / "Open Mouth") Liquidity Slope (+ rising) | Price Slope (- falling) The Core Edge. Liquidity is filling up, but price is dropping due to short-term panic. Because the fuel is there, the price must eventually snap upward to catch up with the liquidity reality. (Scenario Jun 2020)
Scenario C: The Bull Trap (Desync / "Open Mouth") Liquidity Slope (- falling) | Price Slope (+ rising) The Danger Zone. Price is climbing on "Empty Fuel." Retail FOMO is driving the market while liquidity is being pulled. Highly unstable. (Scenario Jul 2022)
Scenario D: Macro Contraction (Harmony) Liquidity Slope (- falling) | Price Slope (- falling) The Drain. Global liquidity is shrinking and price is following. A fundamental bear market. (Scenario Nov/Dec 2021)
2. Directional Desync (The Conflict Filter)
Liquisync is a Conflict Filter. It ignores "Synchronous" phases where both lines move together and focuses 100% of its visual energy on the Desync scenarios (Bear Trap or Bull Trap). When the lines travel in opposite directions, the indicator generates Cyan Columns. The height of these columns tells you the intensity of the conflict. When the pulses move in Harmony (Scenario A & D), the desync value remains at zero. This creates a 'Visual Silence' on the chart, signaling that the current price trend is structurally healthy and macro-supported.
3. Liquisync Extreme (The Snap-Back Star ✦)
This triggers when the "Open Mouth" (the Liquidity Pulse (Golden Line) and the Price Pulse (White Area) pull in diametrically opposite directions) desync reaches 85% of its 1-year historical record. This is a generational signal identifying the absolute limits of market irrationality relative to the macro reality (Price up, M2 down or vice versa).
How to Read the Chart
• Golden Pulse: The Liquidity Slope
• White Area: The Price Slope
• Harmony (No Columns): Price and Liquidity are in sync. Trend-following is safe.
• Open Mouth (Cyan Columns): These are not momentum bars; they are Conflict Bars . They only appear when the Price and Liquidity are traveling in opposite directions. The taller the column, the more "stretched" the macro rubber band has become.
• Magenta Stars: The desync is at a statistical limit. Expect a violent Macro Snap-Back toward the Golden Liquidity line.
The 60-Day Lead-Lag Principle: Why the Delay?
The Liquisync engine utilizes a specific forward-lag (defaulted to 60–80 days or 9 weeks, to be parametrized by the user) based on the Monetary Transmission Mechanism. Research into global liquidity cycles shows that central bank injections (M2 expansion) do not impact high-beta risk assets instantaneously. Capital follows a "Waterfall Effect": it moves first into primary dealer banks, then into credit markets and equities, and finally—once the "liquidity tide" has sufficiently risen—into the cryptocurrency ecosystem. Statistical correlation studies confirm that the peak relationship between Global M2 and Bitcoin historically occurs with a 56 to 63-day delay. By shifting the liquidity data forward, we align the "Macro Cause" with its "Market Effect," revealing a clearer predictive map that standard, unlagged indicators miss.
Settings & Calibration: Tuning the Liquisync Engine
The Liquisync engine is a precision instrument that requires specific calibration to align the "Macro Fuel" with the "Price Engine."
Slope Lookback defines the sensitivity of our acceleration measurement; a setting of 6 (Weekly) or 30 (Daily) ensures we capture structural shifts while filtering out intraday noise
Liquidity Lag is perhaps the most critical setting, as it shifts the M2 data forward to account for the standard 60–80 day (or 9-week) transmission delay—the time it takes for central bank liquidity to actually hit the crypto order books.
Extreme Window establishes our statistical benchmark; by default, this is set to 52 (representing one full year on the Weekly timeframe), allowing the engine to identify "Magenta Star" signals by comparing the current directional desync against the highest records of the last 365 days.
Recommended Calibration :
• Daily (1D): Set Lag to 60–80 and Lookback to 30 .
• Weekly (1W): Set Lag to 9 (9 weeks) and Lookback to 6 . The 1W chart is the preferred filter for macro cycles.
Detailed Script Calculations
The script aggregates liquidity from the FED, RRP, TGA, PBoC, ECB, and BoJ using request.security. We calculate the ta.linreg slope of this aggregate, normalize it via EMA-smoothed RSI mapping (-100 to +100), and apply a ta.change filter to identify directional opposition. The "Extreme" signal is derived from a rolling ta.highest window of the desync intensity.
The Liquisync engine calculates the Linear Regression Slope (m) over a user-defined window:
m =
Where:
• Δy = The distance between the current linear regression end-point and the previous bar.
• Δx = The defined bar-count (Lookback).
Risk Disclaimer & Credits
The Liquisync is a thematic macro tool. Global liquidity data is subject to reporting delays (Note: Because central bank M2 data is typically reported with a lag, the Golden Pulse represents the most recently available macro data, not a real-time high-frequency feed.). This is not financial advice; it is a statistical model for institutional education. Rob Maths is not liable for losses incurred via use of this model.
Tags:
indicator, bitcoin, btc, macro, liquidity, desync, liquisync, institutional, m2, robmaths, Rob Maths
ATR Based SL & TP Targets from Entry (Long/Short)ATR-based target helper for manual trade planning.
Plots a single entry level plus ATR-based stop loss and take-profit targets on the price scale. The script uses a standard ATR (default 14) and lets you select the position side (Long or Short). For Long positions, it places the stop loss 1× ATR below the entry and take-profit levels at 1, 2, 3, and 4× ATR above. For Short positions, it mirrors this logic, placing the stop 1× ATR above the entry and targets 1–4× ATR below. You can adjust the entry price and ATR multipliers from the settings, and all levels update instantly, giving a clean visual of your risk and reward targets on the price scale.
-------------------
Tip:
After entry, and after I set my SL & TP levels, I hide the indicator until it's needed again.
ZLT - Date and Time MarkerPine Script v5 indicator called “DateTime Marker” that overlays on the chart and marks bars whose timestamp matches a user-defined schedule. When a bar “matches,” it can draw:
a vertical line through the bar,
a label with a time/date string, and
a triangle marker below the bar (always plotted on matches).
What you can configure
Marker Type (the matching rule)
You choose one of five modes:
Every Minute
Inputs: everyNMinutes (default 15), minuteOffset (default 0)
Match condition: minute % everyNMinutes == minuteOffset
Example with defaults: marks bars at :00, :15, :30, :45 each hour.
Hourly
Inputs: everyNHours (default 4), hourlyMinute (default 0)
Match condition: hour % everyNHours == 0 AND minute == hourlyMinute
Example with defaults: marks bars at 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 (at minute 00).
Daily Time
Inputs: dailyHour (default 10), dailyMinute (default 0)
Match condition: hour == dailyHour AND minute == dailyMinute
Example with defaults: marks 10:00 every day.
Weekly Day & Time
Inputs: weekDay (default Tuesday), weeklyHour (default 16), weeklyMinute (default 0)
It converts the weekday name to Pine’s dayofweek number via getDayNumber().
Match condition: dayofweek == targetDay AND hour == weeklyHour AND minute == weeklyMinute
Example with defaults: marks Tuesday 16:00.
Monthly Date & Time
Inputs: monthlyDay (default 2), monthlyHour (default 23), monthlyMinute (default 0)
Match condition: dayofmonth == monthlyDay AND hour == monthlyHour AND minute == monthlyMinute
Example with defaults: marks the 2nd day of each month at 23:00.
Visual settings
showLine: whether to draw the vertical line.
lineStyle: Solid/Dashed/Dotted (mapped to Pine line styles by getLineStyle()).
lineColor, lineWidth: styling for the line (width is rounded to an integer because Pine line width is integer).
showLabel: whether to draw a label.
labelColor: background color of the label (text is forced white).
What happens when a bar matches
When isMatch becomes true on a bar:
Vertical line: line.new() at that bar’s bar_index, from low to high, extended extend.both (so it spans the full chart vertically).
Label: label.new() at the bar’s high, with mode-specific text:
Minute/Hourly/Daily: "HH:mm"
Weekly: "Tuesday HH:mm" (or whatever day selected)
Monthly: "Day 2 - HH:mm" (or chosen day)
Triangle marker: plotshape() draws a triangle up below the bar on every match (this happens regardless of showLine / showLabel).
Important practical implications
This uses the bar’s exchange/chart time (TradingView’s time, hour, minute, etc.), so results depend on the symbol/session and chart timezone settings.
On timeframes coarser than 1 minute, “Every Minute” still checks only the bar’s timestamp minute value; it won’t mark intra-bar minutes that don’t exist as separate bars.
Because it can create many objects (lines/labels), it sets max_labels_count=500. Lines are not capped here, so very dense marking can still clutter the chart.
If you tell me your intended use (e.g., “mark NY open,” “mark every 15m candle close,” “mark macro events weekly”), I can point out whether the current matching logic fits that precisely or needs adjustments (sessions, timezones, avoiding duplicates, limiting lines, etc.).
NQ Pro Dashboard (Master Fix)This indicator is a "Head-Up Display" designed specifically for trading NQ (Nasdaq-100 Futures). It aggregates data from the broader market (volatility) and the specific stocks that drive the Nasdaq index (The "Magnificent 7") to give you a single Trend Power Score.
Here is a breakdown of how the logic works under the hood:
1. The Inputs (Data Feed)
The script watches 9 specific assets in real-time (daily timeframe data):
Fear Gauges:
VIX: The volatility index for the S&P 500.
VXN: The volatility index specifically for the Nasdaq-100.
The Engine (Mag 7):
NVDA, AAPL, MSFT, AMZN, GOOGL, META, TSLA.
2. The Logic: "Weighted" Market Strength
Instead of treating every stock equally, the script applies a Weighting Multiplier to the Mag 7 stocks based on their approximate impact on the Nasdaq-100 index.
Heavyweights (1.5x): NVDA, AAPL, MSFT (These move the market the most).
Middleweights (1.0x): AMZN, GOOGL, META.
Lightweight (0.7x): TSLA (Has the least pull of the group).
It calculates a single percentage number (MAG 7 (W)) representing the combined push or pull of these stocks.
3. The "Trend Power" Score (0-100)
This is the core signal. It starts at a neutral 50 and adds/subtracts points based on market conditions.
Fear Factor:
If VIX or VXN drops > 2% (Fear dying), it adds points (Bullish).
If VIX or VXN spikes > 2% (Fear rising), it subtracts points (Bearish).
Stock Strength:
If the Weighted Mag 7 Average is > 1.0% (Strong Rally), it adds a massive 30 points.
If it's negative (Sell-off), it subtracts points.
The Score Breakdown:
80 - 100 (Green): STRONG BULL. The engines are firing (stocks up) and the brakes are off (VIX down). Do not short.
0 - 20 (Red): STRONG BEAR. Panic selling is occurring. Do not buy.
40 - 60 (Orange): CHOP / RANGE. Conflicting signals (e.g., stocks are up but VIX is also up). Be careful.
4. The "Exhaustion" Meter (ATR)
The RANGE row tells you if the market has "gas left in the tank."
It compares Today's Range (High - Low) to the 14-Day Average Range (ATR).
< 50% (Yellow): Compressed. The market hasn't moved much yet. Expect a breakout soon.
> 120% (Purple): Extended. The market has moved massive amounts today. A reversal or pause is statistically likely (mean reversion).
5. The Visuals (Leaders Row)
The bottom row gives you a quick visual scan of the individual stocks:
N▲ (Green): Nvidia is up.
T▼ (Red): Tesla is down.
This helps you spot "divergences"—for example, if the Trend Score is high but NVDA is Red, the rally might be fragile.
Ultimate MACD [captainua]Ultimate MACD - Comprehensive MACD Trading System
Overview
This indicator combines traditional MACD calculations with advanced features including divergence detection, volume analysis, histogram analysis tools, regression forecasting, strong top/bottom detection, and multi-timeframe confirmation to provide a comprehensive MACD-based trading system. The script calculates MACD using configurable moving average types (EMA, SMA, RMA, WMA) and applies various smoothing methods to reduce noise while maintaining responsiveness. The combination of these features creates a multi-layered confirmation system that reduces false signals by requiring alignment across multiple indicators and timeframes.
Core Calculations
MACD Calculation:
The script calculates MACD using the standard formula: MACD Line = Fast MA - Slow MA, Signal Line = Moving Average of MACD Line, Histogram = MACD Line - Signal Line. The default parameters are Fast=12, Slow=26, Signal=9, matching the traditional MACD settings. The script supports four moving average types:
- EMA (Exponential Moving Average): Standard and most responsive, default choice
- SMA (Simple Moving Average): Equal weight to all periods
- RMA (Wilder's Moving Average): Smoother, less responsive
- WMA (Weighted Moving Average): Recent prices weighted more heavily
The price source can be configured as Close (standard), Open, High, Low, HL2, HLC3, or OHLC4. Alternative sources provide different sensitivity characteristics for various trading strategies.
Configuration Presets:
The script includes trading style presets that automatically configure MACD parameters:
- Scalping: Fast/Responsive settings (8,18,6 with minimal smoothing)
- Day Trading: Balanced settings (10,22,7 with minimal smoothing)
- Swing Trading: Standard settings (12,26,9 with moderate smoothing)
- Position Trading: Smooth/Conservative settings (15,35,12 with higher smoothing)
- Custom: Full manual control over all parameters
Histogram Smoothing:
The histogram can be smoothed using EMA to reduce noise and filter minor fluctuations. Smoothing length of 1 = raw histogram (no smoothing), higher values (3-5) = smoother histogram. Increased smoothing reduces noise but may delay signals slightly.
Percentage Mode:
MACD values can be converted to percentage of price (MACD/Close*100) for cross-instrument comparison. This is useful when comparing MACD signals across instruments with different price levels (e.g., BTC vs ETH). The percentage mode normalizes MACD values, making them comparable regardless of instrument price.
MACD Scale Factor:
A scale factor multiplier (default 1.0) allows adjusting MACD display size for better visibility. Use 0.3-0.5 if MACD appears too compressed, or 2.0-3.0 if too small.
Dynamic Overbought/Oversold Levels:
Overbought and oversold levels are calculated dynamically based on MACD's mean and standard deviation over a lookback period. The formula: OB = MACD Mean + (StdDev × OB Multiplier), OS = MACD Mean - (StdDev × OS Multiplier). This adapts to current market conditions, widening in volatile markets and narrowing in calm markets. The lookback period (default 20) controls how quickly the levels adapt: longer periods (30-50) = more stable levels, shorter (10-15) = more responsive.
OB/OS Background Coloring:
Optional background coloring can highlight the entire panel when MACD enters overbought or oversold territory, providing prominent visual indication of extreme conditions. The background colors are drawn on top of the main background to ensure visibility.
Divergence Detection
Regular Divergence:
The script uses the MACD line (not histogram) for divergence detection, which provides more reliable signals. Bullish divergence: Price makes a lower low while MACD line makes a higher low. Bearish divergence: Price makes a higher high while MACD line makes a lower high. Divergences often precede reversals and are powerful reversal signals.
Pivot-Based Divergence:
The divergence detection uses actual pivot points (pivotlow/pivothigh) instead of simple lowest/highest comparisons. This provides more accurate divergence detection by identifying significant pivot lows/highs in both price and MACD line. The pivot-based method compares two recent pivot points: for bullish divergence, price makes a lower low while MACD makes a higher low at the pivot points. This method reduces false divergences by requiring actual pivot points rather than just any low/high within a period.
The pivot lookback parameters (left and right) control how many bars on each side of a pivot are required for confirmation. Higher values = more conservative pivot detection.
Hidden Divergence:
Continuation patterns that signal trend continuation rather than reversal. Bullish hidden divergence: Price makes a higher low but MACD makes a lower low. Bearish hidden divergence: Price makes a lower high but MACD makes a higher high. These patterns indicate the trend is likely to continue in the current direction.
Zero-Line Filter:
The "Don't Touch Zero Line" option ensures divergences occur in proper context: for bullish divergence, MACD must stay below zero; for bearish divergence, MACD must stay above zero. This filters out divergences that occur in neutral zones.
Range Filtering:
Minimum and maximum lookback ranges control the time window between pivots to consider for divergence. This helps filter out divergences that are too close together (noise) or too far apart (less relevant).
Volume Confirmation System
Volume threshold filtering requires current volume to exceed the volume SMA multiplied by the threshold factor. The formula: Volume Confirmed = Volume > (Volume SMA × Threshold). If the threshold is set to 1.0 or lower, volume confirmation is effectively disabled (always returns true). This allows you to use the indicator without volume filtering if desired. Volume confirmation significantly increases divergence and signal reliability.
Volume Climax and Dry-Up Detection:
The script can mark bars with extremely high volume (volume climax) or extremely low volume (volume dry-up). Volume climax indicates potential reversal points or strong momentum continuation. Volume dry-up indicates low participation and may produce unreliable signals. These markers use standard deviation multipliers to identify extreme volume conditions.
Zero-Line Cross Detection
MACD zero-line crosses indicate momentum shifts: above zero = bullish momentum, below zero = bearish momentum. The script includes alert conditions for zero-line crosses with cooldown protection to prevent alert spam. Zero-line crosses can provide early warning signals before MACD crosses the signal line.
Histogram Analysis Tools
Histogram Moving Average:
A moving average applied to the histogram itself helps identify histogram trend direction and acts as a signal line for histogram movements. Supports EMA, SMA, RMA, and WMA types. Useful for identifying when histogram momentum is strengthening or weakening.
Histogram Bollinger Bands:
Bollinger Bands are applied to the MACD histogram instead of price. The calculation: Basis = SMA(Histogram, Period), StdDev = stdev(Histogram, Period), Upper = Basis + (StdDev × Deviation Multiplier), Lower = Basis - (StdDev × Deviation Multiplier). This creates dynamic zones around the histogram that adapt to histogram volatility. When the histogram touches or exceeds the bands, it indicates extreme conditions relative to recent histogram behavior.
Stochastic MACD (StochMACD):
Stochastic MACD applies the Stochastic oscillator formula to the MACD histogram instead of price. This normalizes the histogram to a 0-100 scale, making it easier to identify overbought/oversold conditions on the histogram itself. The calculation: %K = ((Histogram - Lowest Histogram) / (Highest Histogram - Lowest Histogram)) × 100. %K is smoothed, and %D is calculated as the moving average of smoothed %K. Standard thresholds are 80 (overbought) and 20 (oversold).
Regression Forecasting
The script includes advanced regression forecasting that predicts future MACD values using mathematical models. This helps anticipate potential MACD movements and provides forward-looking context for trading decisions.
Regression Types:
- Linear: Simple trend line (y = mx + b) - fastest, works well for steady trends
- Polynomial: Quadratic curve (y = ax² + bx + c) - captures curvature in MACD movement
- Exponential Smoothing: Weighted average with more weight on recent values - responsive to recent changes
- Moving Average: Uses difference between short and long MA to estimate trend - stable and smooth
Forecast Horizon:
Number of bars to forecast ahead (default 5, max 50 for linear/MA, max 20 for polynomial due to performance). Longer horizons predict further ahead but may be less accurate.
Confidence Bands:
Optional upper/lower bands around forecast show prediction uncertainty based on forecast error (standard deviation of prediction vs actual). Wider bands = higher uncertainty. The confidence level multiplier (default 1.5) controls band width.
Forecast Display:
Forecast appears as dotted lines extending forward from current bar, with optional confidence bands. All forecast values respect percentage mode and scale factor settings.
Strong Top/Bottom Signals
The script detects strong recovery from extreme MACD levels, generating "sBottom" and "sTop" signals. These identify significant reversal potential when MACD recovers substantially from overbought/oversold extremes.
Strong Bottom (sBottom):
Triggered when:
1. MACD was at or near its lowest point in the bottom period (default 10 bars)
2. MACD was in or near the oversold zone
3. MACD has recovered by at least the threshold amount (default 0.5) from the lowest point
4. Recovery persists for confirmation bars (default 2 consecutive bars)
5. MACD has moved out of the oversold zone
6. Volume is above average
7. All enabled filters pass
8. Minimum bars have passed since last signal (reset period, default 5 bars)
Strong Top (sTop):
Triggered when:
1. MACD was at or near its highest point in the top period (default 7 bars)
2. MACD was in or near the overbought zone
3. MACD has declined by at least the threshold amount (default 0.5) from the highest point
4. Decline persists for confirmation bars (default 2 consecutive bars)
5. MACD has moved out of the overbought zone
6. Volume is above average
7. All enabled filters pass
8. Minimum bars have passed since last signal (reset period, default 5 bars)
Label Placement:
sTop/sBottom labels appear on the historical bar where the actual extreme occurred (not on current bar), showing the exact MACD value at that extreme. Labels respect the unified distance checking system to prevent overlaps with Buy/Sell Strength labels.
Signal Strength Calculation
The script calculates a composite signal strength score (0-100) based on multiple factors:
- MACD distance from signal line (0-50 points): Larger separation indicates stronger signal
- Volume confirmation (0-15 points): Volume above average adds points
- Secondary timeframe alignment (0-15 points): Higher timeframe agreement adds points
- Distance from zero line (0-20 points): Closer to zero can indicate stronger reversal potential
Higher scores (70+) indicate stronger, more reliable signals. The signal strength is displayed in the statistics table and can be used as a filter to only accept signals above a threshold.
Smart Label Placement System
The script includes an advanced label placement system that tracks MACD extremes and places Buy/Sell Strength labels at optimal locations:
Label Placement Algorithm:
- Labels appear on the current bar at confirmation (not on historical extreme bars), ensuring they're visible when the signal is confirmed
- The system tracks pending signals when MACD enters OB/OS zones or crosses the signal line
- During tracking, the system continuously searches for the true extreme (lowest MACD for buys, highest MACD for sells) within a configurable historical lookback period
- Labels are only finalized when: (1) MACD exits the OB/OS zone, (2) sufficient bars have passed (2x minimum distance), (3) MACD has recovered/declined by a configurable percentage from the extreme (default 15%), and (4) tracking has stopped (no better extreme found)
Label Spacing and Overlap Prevention:
- Minimum Bars Between Labels: Base distance requirement (default 5 bars)
- Label Spacing Multiplier: Scales the base distance (default 1.5x) for better distribution. Higher values = more spacing between labels
- Effective distance = Base Distance × Spacing Multiplier (e.g., 5 × 1.5 = 7.5 bars minimum)
- Unified distance checking prevents overlaps between all label types (Buy Strength, Sell Strength, sTop, sBottom)
Strength-Based Filtering:
- Label Strength Minimum (%): Only labels with strength at or above this threshold are displayed (default 75%)
- When multiple potential labels are close together, the system automatically compares strengths and keeps only the strongest one
- This ensures only the most significant signals are displayed, reducing chart clutter
Zero Line Polarity Enforcement:
- Enforce Zero Line Polarity (default enabled): Ensures labels follow traditional MACD interpretation
- Buy Strength labels only appear when the tracked extreme MACD value was below zero (negative territory)
- Sell Strength labels only appear when the tracked extreme MACD value was above zero (positive territory)
- This prevents counter-intuitive labels (e.g., Buy labels above zero line) and aligns with standard MACD trading principles
Recovery/Decline Confirmation:
- Recovery/Decline Confirm (%): Percent move away from the extreme required before finalizing (default 15%)
- For Buy labels: MACD must recover by at least this percentage from the tracked bottom
- For Sell labels: MACD must decline by at least this percentage from the tracked top
- Higher values = more confirmation required, fewer but more reliable labels
Historical Lookback:
- Historical Lookback for Label Placement: Number of bars to search for true extremes (default 20)
- The system searches within this period to find the actual lowest/highest MACD value
- Higher values analyze more history but may be slower; lower values are faster but may miss some extremes
Cross Quality Score
The script calculates a MACD cross quality score (0-100) that rates crossover quality based on:
- Cross angle (0-50 points): Steeper crosses = stronger signals
- Volume confirmation (0-25 points): Volume above average adds points
- Distance from zero line (0-25 points): Crosses near zero line are stronger
This score helps identify high-quality crossovers and can be used as a filter to only accept signals meeting minimum quality threshold.
Filtering System
Histogram Filter:
Requires histogram to be above zero for buy signals, below zero for sell signals. Ensures momentum alignment before generating signals.
Signal Strength Filter:
Requires minimum signal strength score for signals. Higher threshold = only strongest signals pass. This combines multiple confirmation factors into a single filter.
Cross Quality Filter:
Requires minimum cross quality score for signals. Rates crossover quality based on angle, volume, momentum, and distance from zero. Only signals meeting minimum quality threshold will be generated.
All filters use the pattern: filterResult = not filterEnabled OR conditionMet. This means if a filter is disabled, it always passes (returns true). Filters can be combined, and all must pass for a signal to fire.
Multi-Timeframe Analysis
The script can display MACD from a secondary (higher) timeframe and use it for confirmation. When secondary timeframe confirmation is enabled, signals require the higher timeframe MACD to align (bullish/bearish) with the signal direction. This ensures signals align with the larger trend context, reducing counter-trend trades.
Secondary Timeframe MACD:
The secondary timeframe MACD uses the same calculation parameters (fast, slow, signal, MA type) as the main MACD but from a higher timeframe. This provides context for the current timeframe's MACD position relative to the larger trend. The secondary MACD lines are displayed on the chart when enabled.
Noise Filtering
Noise filtering hides small histogram movements below a threshold. This helps focus on significant moves and reduces chart clutter. When enabled, only histogram movements above the threshold are displayed. Typical threshold values are 0.1-0.5 for most instruments, depending on the instrument's price range and volatility.
Signal Debounce
Signal debounce prevents duplicate MACD cross signals within a short time period. Useful when MACD crosses back and forth quickly, creating multiple signals. Debounce ensures only one signal per period, reducing signal spam during choppy markets. This is separate from alert cooldown, which applies to all alert types.
Background Color Modes
The script offers three background color modes:
- Dynamic: Full MACD heatmap based on OB/OS conditions, confidence, and momentum. Provides rich visual feedback.
- Monotone: Soft neutral background but still allows overlays (OB/OS zones). Keeps the chart clean without overpowering candles.
- Off: No MACD background (only overlays and plots). Maximum chart cleanliness.
When OB/OS background colors are enabled, they are drawn on top of the main background to ensure visibility.
Statistics Table
A real-time statistics table displays current MACD values, signal strength, distance from zero line, secondary timeframe alignment, volume confirmation status, and all active filter statuses. The table dynamically adjusts to show only enabled features, keeping it clean and relevant. The table position can be configured (Top Left, Top Right, Bottom Left, Bottom Right).
Performance Statistics Table
An optional performance statistics table shows comprehensive filter diagnostics:
- Total buy/sell signals (raw crossover count before filters)
- Filtered buy/sell signals (signals that passed all filters)
- Overall pass rates (percentage of signals that passed filters)
- Rejected signals count
- Filter-by-filter rejection diagnostics showing which filters rejected how many signals
This table helps optimize filter settings by showing which filters are most restrictive and how they impact signal frequency. The diagnostics format shows rejections as "X B / Y S" (X buy signals rejected, Y sell signals rejected) or "Disabled" if the filter is not active.
Alert System
The script includes separate alert conditions for each signal type:
- MACD Cross: MACD line crosses above/below Signal line (with or without secondary confirmation)
- Zero-Line Cross: MACD crosses above/below zero
- Divergence: Regular and hidden divergence detections
- Secondary Timeframe: Higher timeframe MACD crosses
- Histogram MA Cross: Histogram crosses above/below its moving average
- Histogram Zero Cross: Histogram crosses above/below zero
- StochMACD: StochMACD overbought/oversold entries and %K/%D crosses
- Histogram BB: Histogram touches/breaks Bollinger Bands
- Volume Events: Volume climax and dry-up detections
- OB/OS: MACD entry/exit from overbought/oversold zones
- Strong Top/Bottom: sTop and sBottom signal detections
Each alert type has its own cooldown system to prevent alert spam. The cooldown requires a minimum number of bars between alerts of the same type, reducing duplicate alerts during volatile periods. Alert types can be filtered to only evaluate specific alert types (All, MACD Cross, Zero Line, Divergence, Secondary Timeframe, Histogram MA, Histogram Zero, StochMACD, Histogram BB, Volume Events, OB/OS, Strong Top/Bottom).
How Components Work Together
MACD crossovers provide the primary signal when the MACD line crosses the Signal line. Zero-line crosses indicate momentum shifts and can provide early warning signals. Divergences identify potential reversals before they occur.
Volume confirmation ensures signals occur with sufficient market participation, filtering out low-volume false breakouts. Histogram analysis tools (MA, Bollinger Bands, StochMACD) provide additional context for signal reliability and identify significant histogram zones.
Signal strength combines multiple confirmation factors into a single score, making it easy to filter for only the strongest signals. Cross quality score rates crossover quality to identify high-quality setups. Multi-timeframe confirmation ensures signals align with higher timeframe trends, reducing counter-trend trades.
Usage Instructions
Getting Started:
The default configuration shows MACD(12,26,9) with standard EMA calculations. Start with default settings and observe behavior, then customize settings to match your trading style. You can use configuration presets for quick setup based on your trading style.
Customizing MACD Parameters:
Adjust Fast Length (default 12), Slow Length (default 26), and Signal Length (default 9) based on your trading timeframe. Shorter periods (8,17,7) for faster signals, longer (15,30,12) for smoother signals. You can change the moving average type: EMA for responsiveness, RMA for smoothness, WMA for recent price emphasis.
Price Source Selection:
Choose Close (standard), or alternative sources (HL2, HLC3, OHLC4) for different sensitivity. HL2 uses the midpoint of the high-low range, HLC3 and OHLC4 incorporate more price information.
Histogram Smoothing:
Set smoothing to 1 for raw histogram (no smoothing), or increase (3-5) for smoother histogram that reduces noise. Higher smoothing reduces false signals but may delay signals slightly.
Percentage Mode:
Enable percentage mode when comparing MACD across instruments with different price levels. This normalizes MACD values, making them directly comparable.
Dynamic OB/OS Levels:
The dynamic thresholds automatically adapt to volatility. Adjust the multipliers (default 1.5) to fine-tune sensitivity: higher values (2.0-3.0) = more extreme thresholds (fewer signals), lower (1.0-1.5) = more frequent signals. Adjust the lookback period to control how quickly levels adapt. Enable OB/OS background colors for visual indication of extreme conditions.
Volume Confirmation:
Set volume threshold to 1.0 (default, effectively disabled) or higher (1.2-1.5) for standard confirmation. Higher values require more volume for confirmation. Set to 0.1 to completely disable volume filtering.
Filters:
Enable filters gradually to find your preferred balance. Start with histogram filter for basic momentum alignment, then add signal strength filter (threshold 50+) for moderate signals, then cross quality filter (threshold 50+) for high-quality crossovers. Combine filters for highest-quality signals but expect fewer signals.
Divergence:
Enable divergence detection and adjust pivot lookback parameters. Pivot-based divergence provides more accurate detection using actual pivot points. Hidden divergence is useful for trend-following strategies. Adjust range parameters to filter divergences by time window.
Zero-Line Crosses:
Zero-line cross alerts are automatically available when alerts are enabled. These provide early warning signals for momentum shifts.
Histogram Analysis Tools:
Enable Histogram Moving Average to see histogram trend direction. Enable Histogram Bollinger Bands to identify extreme histogram zones. Enable Stochastic MACD to normalize histogram to 0-100 scale for overbought/oversold identification.
Multi-Timeframe:
Enable secondary timeframe MACD to see higher timeframe context. Enable secondary confirmation to require higher timeframe alignment for signals.
Signal Strength:
Signal strength is automatically calculated and displayed in the statistics table. Use signal strength filter to only accept signals above a threshold (e.g., 50 for moderate, 70+ for strong signals only).
Smart Label Placement:
Configure label placement settings to control label appearance and quality:
- Label Strength Minimum (%): Set threshold (default 75%) to show only strong signals. Higher = fewer, stronger labels
- Label Spacing Multiplier: Adjust spacing (default 1.5x) for better distribution. Higher = more spacing between labels
- Recovery/Decline Confirm (%): Set confirmation requirement (default 15%). Higher = more confirmation, fewer labels
- Enforce Zero Line Polarity: Enable (default) to ensure Buy labels only appear when tracked extreme was below zero, Sell labels only when above zero
- Historical Lookback: Adjust search period (default 20 bars) for finding true extremes. Higher = more history analyzed
Cross Quality:
Cross quality score is automatically calculated for crossovers. Use cross quality filter to only accept high-quality crossovers (threshold 50+ for moderate, 70+ for high quality).
Alerts:
Set up alerts for your preferred signal types. Enable alert cooldown (default enabled, 5 bars) to prevent alert spam. Use alert type filter to only evaluate specific alert types (All, MACD Cross, Zero Line, Divergence, Secondary Timeframe, Histogram MA, Histogram Zero, StochMACD, Histogram BB, Volume Events, OB/OS, Strong Top/Bottom). Each signal type has its own alert condition, so you can be selective about which signals trigger alerts.
Visual Elements and Signal Markers
The script uses various visual markers to indicate signals and conditions:
- MACD Line: Green when above signal (bullish), red when below (bearish) if dynamic colors enabled. Optional black outline for enhanced visibility
- Signal Line: Orange line with optional black outline for enhanced visibility
- Histogram: Color-coded based on direction and momentum (green for bullish rising, lime for bullish falling, red for bearish falling, orange for bearish rising)
- Zero Line: Horizontal reference line at MACD = 0
- Fill to Zero: Green/red semi-transparent fill between MACD line and zero line showing bullish/bearish territory
- Fill Between OB/OS: Blue semi-transparent fill between overbought/oversold thresholds highlighting neutral zone
- OB/OS Background Colors: Background coloring when MACD enters overbought/oversold zones
- Background Colors: Dynamic or monotone backgrounds indicating MACD state, or custom chart background
- Divergence Labels: "🐂" for bullish, "🐻" for bearish, "H Bull" for hidden bullish, "H Bear" for hidden bearish
- Divergence Lines: Colored lines connecting pivot points when divergences are detected
- Volume Climax Markers: ⚡ symbol for extremely high volume
- Volume Dry-Up Markers: 💧 symbol for extremely low volume
- Buy/Sell Strength Labels: Show signal strength percentage (e.g., "Buy Strength: 75%")
- Strong Top/Bottom Labels: "sTop" and "sBottom" for extreme level recoveries
- Secondary MACD Lines: Purple lines showing higher timeframe MACD
- Histogram MA: Orange line showing histogram moving average
- Histogram BB: Blue bands around histogram showing extreme zones
- StochMACD Lines: %K and %D lines with overbought/oversold thresholds
- Regression Forecast: Dotted blue lines extending forward with optional confidence bands
Signal Priority and Interpretation
Signals are generated independently and can occur simultaneously. Higher-priority signals generally indicate stronger setups:
1. MACD Cross with Multiple Filters - Highest priority: Requires MACD crossover plus all enabled filters (histogram, signal strength, cross quality) and secondary timeframe confirmation if enabled. These are the most reliable signals.
2. Zero-Line Cross - High priority: Indicates momentum shift. Can provide early warning signals before MACD crosses the signal line.
3. Divergence Signals - Medium-High priority: Pivot-based divergence is more reliable than simple divergence. Hidden divergence indicates continuation rather than reversal.
4. MACD Cross with Basic Filters - Medium priority: MACD crosses signal line with basic histogram filter. Less reliable alone but useful when combined with other confirmations.
Best practice: Wait for multiple confirmations. For example, a MACD crossover combined with divergence, volume confirmation, and secondary timeframe alignment provides the strongest setup.
Chart Requirements
For proper script functionality and compliance with TradingView requirements, ensure your chart displays:
- Symbol name: The trading pair or instrument name should be visible
- Timeframe: The chart timeframe should be clearly displayed
- Script name: "Ultimate MACD " should be visible in the indicator title
These elements help traders understand what they're viewing and ensure proper script identification. The script automatically includes this information in the indicator title and chart labels.
Performance Considerations
The script is optimized for performance:
- Calculations use efficient Pine Script functions (ta.ema, ta.sma, etc.) which are optimized by TradingView
- Conditional execution: Features only calculate when enabled
- Label management: Old labels are automatically deleted to prevent accumulation
- Array management: Divergence label arrays are limited to prevent memory accumulation
The script should perform well on all timeframes. On very long historical data with many enabled features, performance may be slightly slower, but it remains usable.
Known Limitations and Considerations
- Dynamic OB/OS levels can vary significantly based on recent MACD volatility. In very volatile markets, levels may be wider; in calm markets, they may be narrower.
- Volume confirmation requires sufficient historical volume data. On new instruments or very short timeframes, volume calculations may be less reliable.
- Higher timeframe MACD uses request.security() which may have slight delays on some data feeds.
- Stochastic MACD requires the histogram to have sufficient history. Very short periods on new charts may produce less reliable StochMACD values initially.
- Divergence detection requires sufficient historical data to identify pivot points. Very short lookback periods may produce false positives.
Practical Use Cases
The indicator can be configured for different trading styles and timeframes:
Swing Trading:
Use MACD(12,26,9) with secondary timeframe confirmation. Enable divergence detection. Use signal strength filter (threshold 50+) and cross quality filter (threshold 50+) for higher-quality signals. Enable histogram analysis tools for additional context.
Day Trading:
Use MACD(8,17,7) or use "Day Trading" preset with minimal histogram smoothing for faster signals. Enable zero-line cross alerts for early signals. Use volume confirmation with threshold 1.2-1.5. Enable histogram MA for momentum tracking.
Trend Following:
Use MACD(12,26,9) or longer periods (15,30,12) for smoother signals. Enable secondary timeframe confirmation for trend alignment. Hidden divergence signals are useful for trend continuation entries. Use cross quality filter to identify high-quality crossovers.
Reversal Trading:
Focus on divergence detection (pivot-based for accuracy) combined with zero-line crosses. Enable volume confirmation. Use histogram Bollinger Bands to identify extreme histogram zones. Enable StochMACD for overbought/oversold identification.
Multi-Timeframe Analysis:
Enable secondary timeframe MACD to see context from larger timeframes. For example, use daily MACD on hourly charts to understand the larger trend context. Enable secondary confirmation to require higher timeframe alignment for signals.
Practical Tips and Best Practices
Getting Started:
Start with default settings and observe MACD behavior. The default configuration (MACD 12,26,9 with EMA) is balanced and works well across different markets. After observing behavior, customize settings to match your trading style. Consider using configuration presets for quick setup.
Reducing Repainting:
All signals are based on confirmed bars, minimizing repainting. The script uses confirmed bar data for all calculations to ensure backtesting accuracy.
Signal Quality:
MACD crosses with multiple filters provide the highest-quality signals because they require alignment across multiple indicators. These signals have lower frequency but higher reliability. Use signal strength scores to identify the strongest signals (70+). Use cross quality scores to identify high-quality crossovers (70+).
Filter Combinations:
Start with histogram filter for basic momentum alignment, then add signal strength filter for moderate signals, then cross quality filter for high-quality crossovers. Combining all filters significantly reduces false signals but also reduces signal frequency. Find your balance based on your risk tolerance.
Volume Filtering:
Set volume threshold to 1.0 (default, effectively disabled) or lower to effectively disable volume filtering if you trade instruments with unreliable volume data or want to test without volume confirmation. Standard confirmation uses 1.2-1.5 threshold.
MACD Period Selection:
Standard MACD(12,26,9) provides balanced signals suitable for most trading. Shorter periods (8,17,7) for faster signals, longer (15,30,12) for smoother signals. Adjust based on your timeframe and trading style. Consider using configuration presets for optimized settings.
Moving Average Type:
EMA provides balanced responsiveness with smoothness. RMA is smoother and less responsive. WMA gives more weight to recent prices. SMA gives equal weight to all periods. Choose based on your preference for responsiveness vs. smoothness.
Divergence:
Pivot-based divergence is more reliable than simple divergence because it uses actual pivot points. Hidden divergence indicates continuation rather than reversal, useful for trend-following strategies. Adjust pivot lookback parameters to control sensitivity.
Dynamic Thresholds:
Dynamic OB/OS thresholds automatically adapt to volatility. In volatile markets, thresholds widen; in calm markets, they narrow. Adjust the multipliers to fine-tune sensitivity. Enable OB/OS background colors for visual indication.
Zero-Line Crosses:
Zero-line crosses indicate momentum shifts and can provide early warning signals before MACD crosses the signal line. Enable alerts for zero-line crosses to catch these early signals.
Alert Management:
Enable alert cooldown (default enabled, 5 bars) to prevent alert spam. Use alert type filter to only evaluate specific alert types. Signal debounce (default enabled, 3 bars) prevents duplicate MACD cross signals during choppy markets.
Technical Specifications
- Pine Script Version: v6
- Indicator Type: Non-overlay (displays in separate panel below price chart)
- Repainting Behavior: Minimal - all signals are based on confirmed bars, ensuring accurate backtesting results
- Performance: Optimized with conditional execution. Features only calculate when enabled.
- Compatibility: Works on all timeframes (1 minute to 1 month) and all instruments (stocks, forex, crypto, futures, etc.)
- Edge Case Handling: All calculations include safety checks for division by zero, NA values, and boundary conditions. Alert cooldowns and signal debounce handle edge cases where conditions never occurred or values are NA.
Technical Notes
- All MACD values respect percentage mode conversion when enabled
- Volume confirmation uses cached volume SMA for performance
- Label arrays (divergence) are automatically limited to prevent memory accumulation
- Background coloring: OB/OS backgrounds are drawn on top of main background to ensure visibility
- All calculations are optimized with conditional execution - features only calculate when enabled (performance optimization)
- Signal strength calculation combines multiple factors into a single score for easy filtering
- Cross quality calculation rates crossover quality based on angle, volume, and distance from zero
- Secondary timeframe MACD uses request.security() for higher timeframe data access
- Histogram analysis features (Bollinger Bands, MA, StochMACD) provide additional context beyond basic MACD signals
- Statistics table dynamically adjusts to show only enabled features, keeping it clean and relevant
- Divergence detection uses MACD line (not histogram) for more reliable signals
- Configuration presets automatically optimize MACD parameters for different trading styles
- Smart label placement: Labels appear on current bar at confirmation, using strength from tracked extreme point
- Label spacing uses effective distance (base distance × spacing multiplier) for better distribution
- Zero line polarity enforcement ensures Buy labels only appear when tracked extreme MACD < 0, Sell labels only when tracked extreme MACD > 0
- Label finalization requires MACD exit from OB/OS zone, sufficient bars passed, and recovery/decline percentage confirmation
- Strength-based filtering automatically compares and keeps only the strongest label when multiple signals are close together
- Enhanced visualization: Line outlines drawn behind main lines for superior visibility (black default, configurable)
- Enhanced visualization: Fill between MACD and zero line provides instant visual feedback (green above, red below)
- Enhanced visualization: Fill between OB/OS thresholds highlights neutral zone when dynamic levels are active
- Custom chart background overrides background mode when enabled, allowing theme-consistent indicator panels






















