OPEN-SOURCE SCRIPT
Mis à jour

VB Finviz-style MTF Screener

118
📊 VB Multi-Timeframe Stock Screener (Daily + 4H + 1H)

A structured, high-signal stock screener that blends Daily fundamentals, 4H trend confirmation, and 1H entry timing to surface strong trading opportunities with institutional discipline.

🟦 1. Daily Screener — Core Stock Selection

All fundamental and structural filters run strictly on Daily data for maximum stability and signal quality.
Daily filters include:

  • 📈 Average Volume & Relative Volume
  • 💲 Minimum Price Threshold
  • 📊 Beta vs SPY
  • 🏢 Market Cap (Billions)
  • 🔥 ATR Liquidity Filter
  • 🧱 Float Requirements
  • 📘 Price Above Daily SMA50
  • 🚀 Minimum Gap-Up Condition


This layer acts like a Finviz-style engine, identifying stocks worth trading before momentum or timing is considered.

🟩 2. 4H Trend Confirmation — Momentum Check

Once a stock passes the Daily screen, the 4-hour timeframe validates trend strength:

  • 🔼 Price above 4H MA
  • 📈 MA pointing upward


This removes structurally good stocks that are not in a healthy trend.

🟧 3. 1H Entry Alignment — Timing Layer

The Hourly timeframe refines near-term timing:

🔼 Price above 1H MA

📉 Short-term upward movement detected

This step ensures the stock isn’t just good on paper—it’s moving now.

🧪 MTF Debug Table (Your Transparency Engine)

A live diagnostic table shows:

  • All Daily values
  • All 4H checks
  • All 1H checks
  • Exact PASS/FAIL per condition


Perfect for tuning thresholds or understanding why a ticker qualifies or fails.

🎯 Who This Screener Is For

  • Swing traders
  • Momentum/trend traders
  • Systematic and rules-based traders
  • Traders who want clean, multi-timeframe alignment


By combining Daily fundamentals, 4H trend structure, and 1H momentum, this screener filters the market down to the stocks that are strong, aligned, and ready.
Notes de version
📌 Change Log – VB Finviz-Style Daily Screener (Latest Update)
🆕 1. Added Intraday Trend Alignment Filter (Local Price > Daily EMA-200)

Introduced an optional multi-timeframe rule requiring the active chart’s timeframe
(4H, 2H, 1H, or any smaller TF) to maintain price above the Daily EMA-200.
This ensures intraday signals only align with the higher-timeframe trend bias.

🛠 2. Entire Daily Engine Hard-Locked to Daily Timeframe

All core screen conditions (volume, relative volume, beta, ATR, SMA-50, gap, market cap, float)
are now computed exclusively through request.security(..., "D", ...).
This guarantees consistent results across all chart timeframes and eliminates TF-drift issues.

📊 3. Relative Volume Standardized to 50-Day Lookback

Daily RV is now calculated as:
Current Daily Volume / 50-day Daily Average Volume
This aligns with institutional volume screening conventions and improves reliability.

📦 4. Introduced New Debug Table Row for EMA-200 Alignment

Added a dedicated row showing:

Local timeframe close

Daily EMA-200

PASS / FAIL alignment status

Improves transparency when analyzing intraday vs. daily conditions.

🔧 5. Updated On-Chart Output Label

Outcome label revised to:

POST PASS (DAILY + EMA200)

POST FAIL (DAILY + EMA200)

Reflects the combined daily screening + intraday trend alignment logic.

🧹 6. Cleaned All Default Inputs (Numbers Only)

All numeric inputs standardized to plain numeric values
(e.g., 1000000.0 instead of formatted values).
This avoids Pine parsing issues and improves user clarity.

💡 7. Codebase Simplification & Reliability Improvements

Removed residual local timeframe dependencies in daily calculations.

Consolidated daily computations into atomic, single-source expressions.

Ensured all daily filters behave deterministically regardless of chart TF.

✔ Final Result

The screener now behaves exactly as intended:

Daily rules never change no matter the chart timeframe

Intraday charts apply the Daily EMA-200 alignment rule

Debug table shows full transparency for every decision

Output label reflects both the daily and intraday logic in one glance
Notes de version
📌 Change Log (VB Finviz-Style Screener)
v1.4 – Stability, Compatibility, and Data Integrity Update

Removed unsupported Pine functions (math.clamp) and simplified multi-line expressions for full TradingView compiler compatibility.

Rebuilt daily-data engine to use true Daily OHLCV, stabilizing behavior across intraday timeframes.

Corrected Daily SMA50 and Daily EMA200 calculations (computed after daily series retrieval to match built-in indicators precisely).

Implemented intraday-adjusted Relative Volume using session-progress approximation and Finviz-style rounding (1 decimal).

Standardized |Beta| calculation using absolute and rounded output (2 decimals) for Finviz alignment.

Revised all condition blocks to ensure clean daily-anchored logic with no unintended recalculations on lower timeframes.

Improved internal table rendering (typed cells, simplified row builder) and removed unsupported multi-line table logic.

Updated badge-mode summary with a consistent status hierarchy (overall → daily → EMA200).

v1.3 – EMA200 Intraday Anchor + UI Enhancements

Added optional requirement: price must be above Daily EMA200 on intraday charts up to 4H.

Introduced PASS/FAIL status badge with emojis for rapid visual screening.

Debug Table revamped: now displays raw values, thresholds, and evaluation outcome per condition.

v1.2 – Relative Volume & Finviz Alignment

Introduced true Finviz-style 3-month daily average volume.

Added running daily volume tracking via request.security() for cross-TF accuracy.

Implemented intraday scaling to approximate Finviz’s session-adjusted relative volume.

v1.1 – Core Filter Expansion

Added: Market Cap (Billions), ATR, Float (Millions), Gap %, SMA50.

Unified all filters into a structured pass-fail framework.

v1.0 – Initial Release

Core Finviz-style screener logic (Price > 30, AvgVol > 1M, RelVol ≥ 1.0, etc.).

Clean PASS/FAIL label.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.