PROTECTED SOURCE SCRIPT

Enhanced Trend & EMA Screener

50


Overview
Enhanced Trend & ML Screener is a multi-ticker overlay indicator that scans up to 8 symbols (e.g., SPY, QQQ, major tech stocks) across user-defined timeframes for trend signals via EMA crossovers, Ichimoku cloud positioning, ADX directionality, ATR volatility regimes, and linear regression slope (as a simple ML proxy for momentum). It generates a real-time dashboard summarizing bullish/bearish/neutral sentiments per metric, plus a debug table for raw values. Crossover labels and alerts highlight actionable events, making it a streamlined tool for portfolio monitoring and confluence hunting without manual chart-switching.

Core Mechanics
The screener processes each ticker in parallel, fetching data via secure requests (no lookahead bias):

EMA Crossovers: Monitors price crosses over/under EMAs (10, 21, 50, 89 periods)—e.g., close > EMA10 flags bullish momentum.
Ichimoku Sentiment: Scores cloud position (above both spans = Bullish 8/10; below = Bearish 2/10; inside = Neutral 5/10).
ADX Direction: Compares +DI/-DI for Bullish (up > down), Bearish (down > up), or Neutral.
ATR Regime: Normalizes ATR% vs. close; percentile ranks over lookback classify as Rising (high + increasing = Bullish), Falling (low + decreasing = Bearish), or Stable (Neutral).
ML Slope (Linear Regression): Computes 21-bar slope % (threshold 0% default); >0% = Bullish, <0% = Bearish, near-zero = Neutral.
MTF Trend: Pulls weekly ML slope for higher-timeframe bias. Data aggregates into a main dashboard (7 columns: Symbol, ML Trend, MTF, Ichimoku, ADX, ATR, Crossover) with color-coded cells (green/red for Bull/Bear, gray Neutral). A debug table lists prices, EMAs, and slopes. Plots include EMAs and LinReg line on the chart; labels mark crossovers (e.g., "AAPL ↑ EMA10").
Why This Adds Value & Originality
Basic screeners track one metric; multi-indicator ones overload. This fuses EMAs (momentum), Ichimoku (structure), ADX (strength), ATR (volatility), and LinReg (ML-like slope) into a unified sentiment matrix per ticker—e.g., AAPL showing Bullish across 5/6 metrics signals strong confluence. The MTF weekly overlay adds depth without extra charts, while percentile-based ATR avoids raw-value bias across assets. It's original for its compact, color-coded aggregation (no similar public script scans 8 tickers with this blend + debug view), reducing noise via thresholded LinReg and enabling quick "at-a-glance" portfolio scans.

How to Use

Setup: Add to any chart (overlay=true). Customize tickers (e.g., replace GOOGL with NVDA), timeframe (D default), periods (EMA 89 for long-term). Set LinReg threshold (0% for sensitive).
Interpret Dashboard:
Rows: Per-ticker sentiments (e.g., "Bullish" green for ML Trend if slope >0%).
Crossover Column: "↑ 50" for price > EMA50; "--" if none.
Scan for confluence (e.g., 4+ Bullish = long bias).
Debug Table: Raw values (e.g., EMA10=150.25) for verification.
Trading:
Labels/alerts on crossovers (e.g., "TSLA ↓ EMA21" warns downside).
Use MTF for bias (Weekly Bullish = favor longs).
Example: SPY all Bullish + ↑ EMA10 = portfolio buy signal.
Best For: Daily/weekly scans on indices/stocks; 1H–D timeframes.
Limitations & Disclaimer
Data lags by TF resolution; crossovers confirm on close (no repaint, but delayed). Sentiments are directional filters—not entries (pair with volume/SR). LinReg "ML" is basic regression, not trained model. Alerts once/bar close. No risk tools—use stops <1% risk. Not advice; backtest on your symbols. Feedback in comments.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.