OPEN-SOURCE SCRIPT
EMA Crossover Visual Setup (RS Clásico Confirmado)

Overview
This script is designed to visually highlight classic swing trading setups based on the crossover of exponential moving averages (EMAs), with additional confirmation using Relative Strength (RS) compared to a benchmark asset (e.g., SPY).
The goal is to identify bullish momentum shifts that align both with technical structure (EMA crossover) and relative outperformance, helping traders focus on strong stocks in strong markets.
Logic
A signal is triggered when the following conditions are met:
The fast EMA (e.g., 10) crosses above the slow EMA (e.g., 20).
The closing price is above a third EMA (e.g., 50) to confirm bullish structure.
The asset's Relative Strength (RS) versus a benchmark is confirmed manually, based on an RSI comparison (not calculated inside the script).
The script is meant to be used alongside manual RS confirmation, using a secondary chart or overlay of the RS ratio.
Features
Visual labels and markers for clean charting of valid entry setups
Fully customizable EMA lengths
Optional highlighting of candle patterns near entry
Ideal for use with top-down analysis and watchlist filtering
Suggested Use
Works best on daily and 4H charts for swing trading setups
Combine with volume and price action analysis for higher probability trades
Use manual RS validation: confirm that the RSI of the selected stock is stronger than the RSI of SPY (or any benchmark of your choice)
Notes
This script does not execute trades or include stop loss/take profit logic, as it is intended for discretionary traders who want to visually scan for opportunities.
It also does not calculate RS internally, allowing flexibility in how you define strength (RS line, RSI comparison, or price ratio).
This script is designed to visually highlight classic swing trading setups based on the crossover of exponential moving averages (EMAs), with additional confirmation using Relative Strength (RS) compared to a benchmark asset (e.g., SPY).
The goal is to identify bullish momentum shifts that align both with technical structure (EMA crossover) and relative outperformance, helping traders focus on strong stocks in strong markets.
Logic
A signal is triggered when the following conditions are met:
The fast EMA (e.g., 10) crosses above the slow EMA (e.g., 20).
The closing price is above a third EMA (e.g., 50) to confirm bullish structure.
The asset's Relative Strength (RS) versus a benchmark is confirmed manually, based on an RSI comparison (not calculated inside the script).
The script is meant to be used alongside manual RS confirmation, using a secondary chart or overlay of the RS ratio.
Features
Visual labels and markers for clean charting of valid entry setups
Fully customizable EMA lengths
Optional highlighting of candle patterns near entry
Ideal for use with top-down analysis and watchlist filtering
Suggested Use
Works best on daily and 4H charts for swing trading setups
Combine with volume and price action analysis for higher probability trades
Use manual RS validation: confirm that the RSI of the selected stock is stronger than the RSI of SPY (or any benchmark of your choice)
Notes
This script does not execute trades or include stop loss/take profit logic, as it is intended for discretionary traders who want to visually scan for opportunities.
It also does not calculate RS internally, allowing flexibility in how you define strength (RS line, RSI comparison, or price ratio).
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.