OPEN-SOURCE SCRIPT
Trend with ADX, multiple EMAs - Buy & Sell

📊 Core Components
ADX Calculation
Computes DI+ and DI– manually using smoothed true range and directional movement.
Plots background color:
Green when DI+ > DI–
Red when DI– > DI+
Alerts: “ADX Trend Green” or “ADX Trend Red.”
Moving Averages
Fast EMA (5)
Slow EMA (8)
EMA 13
EMA 48
EMA 200
All plotted on the chart with different colors.
VWAP
Plotted as black circles.
📈 Signals & Conditions
Fast EMA vs Slow EMA
Buy Signal: 5 EMA crosses above 8 EMA.
Sell Signal: 5 EMA crosses below 8 EMA.
Avoids repeat signals using CondIni.
Labels: “Buy” (green) / “Sell” (red).
Alerts: “Buy Alert” / “Sell Alert.”
Trend Signals (EMA 13 vs EMA 48)
TBuy: 13 EMA crosses above 48 EMA.
TSell: 13 EMA crosses below 48 EMA.
Labels: “TBuy” (dark green) / “TSell” (dark red).
Alerts: “TBuy Alert” / “TSell Alert.”
🛠️ Overall Purpose
This script combines trend strength (ADX) with short-term EMA crossovers and medium-term EMA trend shifts (13 vs 48).
It provides visual signals, background trend coloring, VWAP reference, and alert triggers for both scalping (5 vs 8 EMA) and trend trading (13 vs 48 EMA).
ADX Calculation
Computes DI+ and DI– manually using smoothed true range and directional movement.
Plots background color:
Green when DI+ > DI–
Red when DI– > DI+
Alerts: “ADX Trend Green” or “ADX Trend Red.”
Moving Averages
Fast EMA (5)
Slow EMA (8)
EMA 13
EMA 48
EMA 200
All plotted on the chart with different colors.
VWAP
Plotted as black circles.
📈 Signals & Conditions
Fast EMA vs Slow EMA
Buy Signal: 5 EMA crosses above 8 EMA.
Sell Signal: 5 EMA crosses below 8 EMA.
Avoids repeat signals using CondIni.
Labels: “Buy” (green) / “Sell” (red).
Alerts: “Buy Alert” / “Sell Alert.”
Trend Signals (EMA 13 vs EMA 48)
TBuy: 13 EMA crosses above 48 EMA.
TSell: 13 EMA crosses below 48 EMA.
Labels: “TBuy” (dark green) / “TSell” (dark red).
Alerts: “TBuy Alert” / “TSell Alert.”
🛠️ Overall Purpose
This script combines trend strength (ADX) with short-term EMA crossovers and medium-term EMA trend shifts (13 vs 48).
It provides visual signals, background trend coloring, VWAP reference, and alert triggers for both scalping (5 vs 8 EMA) and trend trading (13 vs 48 EMA).
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.