PROTECTED SOURCE SCRIPT
YBL – Doble EMA 20/50 (Nube + Alertas)

YBL – Doble EMA 20/50 (Cloud + Alerts)
This script plots a double EMA 20/50 setup with:
• A colored trend cloud between the EMAs
• Double-line styling (base + edge) for each EMA
• Crossover alerts when EMA 20 crosses EMA 50
It’s designed to be a clean trend filter and structure reference for swing and intraday traders.
⸻
🔧 Core logic
• EMA 20 (fast) → short-term direction.
• EMA 50 (slow) → higher timeframe / swing bias.
• Bullish trend when EMA 20 ≥ EMA 50.
• Bearish trend when EMA 20 < EMA 50.
The area between both EMAs is filled with a trend cloud:
• Bull cloud color when EMA 20 is above EMA 50.
• Bear cloud color when EMA 20 is below EMA 50.
Opacity of the cloud is fully configurable.
⸻
🎨 Visuals & customization
Inputs let you control:
• Lengths
• EMA rápida (20) – default 20
• EMA lenta (50) – default 50
• Line thickness (grpViz)
• Grosor base → thick, semi-transparent base line.
• Grosor borde → thinner edge line on top.
• Colors
• Color EMA 20 – fast EMA color
• Color EMA 50 – slow EMA color
• Color nube alcista – bullish cloud color
• Color nube bajista – bearish cloud color
• Opacidad nube – from opaque (0) to fully transparent (100)
Each EMA is drawn with two layers:
• A base line with higher transparency and greater width.
• A border line for sharp, precise visibility.
This makes the EMAs easy to read on any background and timeframe.
⸻
📈 How to use it
Typical use cases:
• Trend filter
• Only look for longs when EMA 20 is above EMA 50 and the cloud is bullish.
• Only look for shorts when EMA 20 is below EMA 50 and the cloud is bearish.
• Dynamic S/R
• EMA 20 can act as a short-term pullback level within the trend.
• EMA 50 can act as a deeper support/resistance zone.
• Context layer
• Works very well as a background bias combined with your main entry tool (order flow, volume, price action patterns, etc.).
⸻
🔔 Alerts
Two built-in, ready-to-use alert conditions:
• Bullish cross – EMA 20 > EMA 50
• Triggers when EMA 20 crosses above EMA 50.
• Marks the start of a potential bullish regime.
• Bearish cross – EMA 20 < EMA 50
• Triggers when EMA 20 crosses below EMA 50.
• Marks the start of a potential bearish regime.
Both alerts are confirmed at bar close and are ideal for:
• Getting notified of trend shifts on your watchlist.
• Automating scans across symbols/timeframes.
⸻
⚠️ Disclaimer
This script is for educational and analytical purposes only and does not constitute financial advice. Always do your own research and manage your risk.
This script plots a double EMA 20/50 setup with:
• A colored trend cloud between the EMAs
• Double-line styling (base + edge) for each EMA
• Crossover alerts when EMA 20 crosses EMA 50
It’s designed to be a clean trend filter and structure reference for swing and intraday traders.
⸻
🔧 Core logic
• EMA 20 (fast) → short-term direction.
• EMA 50 (slow) → higher timeframe / swing bias.
• Bullish trend when EMA 20 ≥ EMA 50.
• Bearish trend when EMA 20 < EMA 50.
The area between both EMAs is filled with a trend cloud:
• Bull cloud color when EMA 20 is above EMA 50.
• Bear cloud color when EMA 20 is below EMA 50.
Opacity of the cloud is fully configurable.
⸻
🎨 Visuals & customization
Inputs let you control:
• Lengths
• EMA rápida (20) – default 20
• EMA lenta (50) – default 50
• Line thickness (grpViz)
• Grosor base → thick, semi-transparent base line.
• Grosor borde → thinner edge line on top.
• Colors
• Color EMA 20 – fast EMA color
• Color EMA 50 – slow EMA color
• Color nube alcista – bullish cloud color
• Color nube bajista – bearish cloud color
• Opacidad nube – from opaque (0) to fully transparent (100)
Each EMA is drawn with two layers:
• A base line with higher transparency and greater width.
• A border line for sharp, precise visibility.
This makes the EMAs easy to read on any background and timeframe.
⸻
📈 How to use it
Typical use cases:
• Trend filter
• Only look for longs when EMA 20 is above EMA 50 and the cloud is bullish.
• Only look for shorts when EMA 20 is below EMA 50 and the cloud is bearish.
• Dynamic S/R
• EMA 20 can act as a short-term pullback level within the trend.
• EMA 50 can act as a deeper support/resistance zone.
• Context layer
• Works very well as a background bias combined with your main entry tool (order flow, volume, price action patterns, etc.).
⸻
🔔 Alerts
Two built-in, ready-to-use alert conditions:
• Bullish cross – EMA 20 > EMA 50
• Triggers when EMA 20 crosses above EMA 50.
• Marks the start of a potential bullish regime.
• Bearish cross – EMA 20 < EMA 50
• Triggers when EMA 20 crosses below EMA 50.
• Marks the start of a potential bearish regime.
Both alerts are confirmed at bar close and are ideal for:
• Getting notified of trend shifts on your watchlist.
• Automating scans across symbols/timeframes.
⸻
⚠️ Disclaimer
This script is for educational and analytical purposes only and does not constitute financial advice. Always do your own research and manage your risk.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. However, you can use it freely and without any limitations – learn more here.
إخلاء المسؤولية
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.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. However, you can use it freely and without any limitations – learn more here.
إخلاء المسؤولية
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.