OPEN-SOURCE SCRIPT

Multi-Symbol EMA Crossover Scanner with Multi-Timeframe Analysis

45
Description
What This Indicator Does:
This indicator is a comprehensive market scanner that monitors up to 10 symbols simultaneously across 4 different timeframes (15-minute, 1-hour, 4-hour, and daily) to detect exponential moving average (EMA) crossovers in real-time. Instead of manually checking multiple charts and timeframes for EMA crossover signals, this scanner automatically does the work for you and presents all detected signals in a clean, organized table that updates continuously throughout the trading session.
Key Features:

Multi-Symbol Monitoring: Scan up to 10 different symbols at once (stocks, forex, crypto, or any TradingView symbol)
Multi-Timeframe Analysis: Simultaneously tracks 4 timeframes (15m, 1H, 4H, 1D) with toggle options to enable/disable each
Comprehensive EMA Pairs: Detects crossovers between all major EMA combinations: 20×50, 20×100, 20×200, 50×100, 50×200, and 100×200
Real-Time Signal Feed: Displays the most recent signals in a sorted table (newest first) with timestamp, direction, price, and EMA pair information
Session Filter: Built-in time filter (default 10:00-18:00) to focus on specific trading hours and avoid pre-market/after-hours noise
Pagination System: Navigate through signals using a page selector when you have more signals than fit in one view
Signal Statistics: Footer displays total signals, bullish/bearish breakdown, and page navigation hints
Customizable Display: Choose table position (4 corners), signals per page (5-20), and maximum signal history (10-100)

How It Works:
The scanner uses the request.security() function to fetch EMA data from multiple symbols and timeframes simultaneously. For each symbol-timeframe combination, it calculates four exponential moving averages (20, 50, 100, and 200 periods) and monitors for crossovers:
Bullish Crossovers (▲ Green):

Faster EMA crosses above slower EMA
Indicates potential upward momentum
Common entry signals for long positions

Bearish Crossovers (▼ Red):

Faster EMA crosses below slower EMA
Indicates potential downward momentum
Common entry signals for short positions or exits

The scanner prioritizes crossovers involving faster EMAs (20×50) over slower ones (100×200), as faster crossovers typically generate more frequent signals. Each detected crossover is stored with its timestamp, allowing the scanner to sort signals chronologically and remove duplicates within the same timeframe.
Signal Table Columns:

Sym: Symbol name (abbreviated, e.g., "ASELS" instead of "BIST:ASELS")
TF: Timeframe where the crossover occurred (15m, 1h, 4h, 1D)
⏰: Exact time of the crossover (HH:MM format in Istanbul timezone)
↕: Direction indicator (▲ bullish green / ▼ bearish red)
₺: Price level where the crossover occurred (average of the two EMAs)
MA: Which EMA pair crossed (e.g., "20×50", "50×200")

How to Use:
For Day Traders:

Enable 15m and 1h timeframes
Monitor symbols from your watchlist
Use crossovers as entry timing signals in the direction of the larger trend
Adjust the time filter to match your trading session (e.g., market open to 2 hours before close)

For Swing Traders:

Enable 4h and 1D timeframes
Focus on 50×200 and 100×200 crossovers (golden/death crosses)
Look for multiple timeframe confluence (same symbol showing bullish crossovers on both 4h and 1D)
Use as a pre-market scanner to identify potential setups for the day

For Multi-Market Traders:

Mix symbols from different markets (stocks, forex, crypto)
Use the scanner to identify which markets are showing the most momentum
Track relative strength by comparing crossover frequency across symbols
Identify rotation opportunities when one asset shows bullish signals while another shows bearish

Setup Recommendations:
Default BIST (Turkish Stock Market) Setup:
The code comes pre-configured with 10 popular BIST stocks:

ASELS, EKGYO, THYAO, AKBNK, PGSUS, ASTOR, OTKAR, ALARK, ISCTR, BIMAS

For US Stocks:
Replace with symbols like: NASDAQ:AAPL, NASDAQ:TSLA, NASDAQ:NVDA, NYSE:JPM, etc.
For Forex:
Use pairs like: FX:EURUSD, FX:GBPUSD, FX:USDJPY, OANDA:XAUUSD, etc.
For Crypto:
Use exchanges like: BINANCE:BTCUSDT, COINBASE:ETHUSD, BINANCE:SOLUSDT, etc.
Settings Guide:
Symbol List (10 inputs):

Enter any valid TradingView symbol in "EXCHANGE:TICKER" format
Use symbols you actively trade or monitor
Mix different asset classes if desired

Timeframe Toggles:

15 Minutes: High-frequency signals, best for day trading
1 Hour: Balanced frequency, good for intraday swing trades
4 Hours: Lower frequency, quality swing trade signals
1 Day: Low frequency, major trend changes only

Time Filter:

Start Hour (10): Beginning of your trading session
End Hour (18): End of your trading session
Prevents signals during low-liquidity periods
Adjust to match your market's active hours

Display Settings:

Table Position: Choose corner placement (doesn't interfere with other indicators)
Max Signals (40): Total historical signals to keep in memory
Signals Per Page (10): How many rows to show at once
Page Number: Navigate through signal history (auto-adjusts to available pages)

What Makes This Original:
Multi-symbol scanners exist on TradingView, but this indicator's originality comes from:

Comprehensive EMA Pair Coverage: Most scanners focus on 1-2 EMA pairs, this monitors 6 different combinations simultaneously
Unified Multi-Timeframe View: Presents signals from 4 timeframes in a single, chronologically sorted feed rather than separate panels
Session-Aware Filtering: Built-in time filter prevents signal overload from 24-hour markets
Smart Pagination: Handles large signal volumes gracefully with page navigation instead of scrolling
Signal Deduplication: Prevents the same crossover from appearing multiple times if it persists across several bars
Price-at-Cross Recording: Captures the exact price where the crossover occurred, not just that it happened
Real-Time Statistics: Live tracking of bullish vs bearish signal distribution

Trading Strategy Examples:
Trend Confirmation Strategy:

Find a symbol showing bullish crossover on 1D (major trend change)
Wait for pullback
Enter when 1h shows bullish crossover (confirmation)
Exit when 1h shows bearish crossover

Multi-Timeframe Confluence:

Look for symbols appearing multiple times with same direction
Example: ASELS shows ▲ on both 4h and 1D = strong bullish signal
Avoid symbols showing conflicting signals (▲ on 1h but ▼ on 4h)

Rotation Scanner:

Monitor 10+ symbols from the same sector
Identify which are turning bullish (▲) first
Enter leaders, avoid laggards
Rotate out when crossovers turn bearish (▼)

Important Considerations:

Not a Complete System: EMA crossovers should be confirmed with price action, volume, and support/resistance analysis
Whipsaw Risk: During consolidation, EMAs can cross back and forth frequently (especially on 15m timeframe)
Lag: EMAs are lagging indicators; crossovers occur after the move has already begun
False Signals: More common during sideways markets; work best in trending environments
Symbol Limits: TradingView has limits on request.security() calls; this scanner uses 40 calls (10 symbols × 4 timeframes)
Performance: On lower-end devices, scanning 10 symbols across 4 timeframes may cause slight delays in chart updates

Best Practices:

Start with 5 symbols and 2 timeframes, then expand as you get comfortable
Use in conjunction with a main chart for price context
Don't trade every signal—filter for high-quality setups
Backtest your favorite EMA pairs on your symbols to understand their reliability
Adjust the time filter to exclude lunch hours if your market has low midday volume
Check the footer statistics—if you're getting 50+ signals per day, tighten your time filter or reduce symbols

Technical Notes:

Uses lookahead=barmerge.lookahead_off to prevent future data leakage
Signals are stored in arrays and sorted by timestamp (newest first)
Automatic daily reset clears old signals to prevent memory buildup
Table dynamically resizes based on signal count
All times displayed in Europe/Istanbul timezone (configurable in code)

免责声明

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.