PROTECTED SOURCE SCRIPT
NADY 45M ADX-RSI Strategy

ADX-RSI Scalping Strategy for Gold (XAUUSD) – Pine Script v5
This script is a powerful scalping & swing trading strategy that combines the strength of ADX (Average Directional Index) and RSI (Relative Strength Index), along with a Moving Average trend filter, designed specifically for XAUUSD (Gold/USD) but can be adapted to other assets.
Core Logic:
🔹 Trend Strength Filter (ADX):
Trades are allowed only when ADX > 20, ensuring signals occur during strong trends.
Custom-coded ADX calculation for precision (no lagging built-in functions).
🔹 RSI Overbought/Oversold Signals:
Buy when RSI is deeply oversold (<20).
Sell when RSI is overbought (>85).
Exit conditions are also governed by RSI reversals (RSI > 75 for closing longs, RSI < 25 for closing shorts).
🔹 Trend Confirmation with Moving Average (MA):
A 300-period SMA ensures only trades in the direction of the larger trend.
Avoids false signals during sideways markets.
🔹 Risk Filters:
No overtrading: Trades are allowed only when all three conditions (ADX, RSI, MA) align.
Session visual filter (background color highlights signal bars).
Features Included:
✅ Precise ADX Calculation
✅ Configurable RSI & MA lengths
✅ Clean Buy/Sell Entry & Exit logic
✅ Alerts Ready (Webhook-compatible for bots)
✅ Visuals: MA line, background highlights, ADX Threshold line.
Best Timeframes:
45M
Recommended Pairing:
XAUUSD (Gold/USD)
Works well with trending assets, can adapt to Forex Majors with slight tweaks.
Customization Parameters:
MA Length (default 300)
RSI Length (default 2)
ADX Length (default 14)
ADX Threshold (default 20)
Backtest Insights:
High accuracy during strong trends.
Works best during London & US sessions.
Filters out sideways, low-volatility zones effectively.
This script is a powerful scalping & swing trading strategy that combines the strength of ADX (Average Directional Index) and RSI (Relative Strength Index), along with a Moving Average trend filter, designed specifically for XAUUSD (Gold/USD) but can be adapted to other assets.
Core Logic:
🔹 Trend Strength Filter (ADX):
Trades are allowed only when ADX > 20, ensuring signals occur during strong trends.
Custom-coded ADX calculation for precision (no lagging built-in functions).
🔹 RSI Overbought/Oversold Signals:
Buy when RSI is deeply oversold (<20).
Sell when RSI is overbought (>85).
Exit conditions are also governed by RSI reversals (RSI > 75 for closing longs, RSI < 25 for closing shorts).
🔹 Trend Confirmation with Moving Average (MA):
A 300-period SMA ensures only trades in the direction of the larger trend.
Avoids false signals during sideways markets.
🔹 Risk Filters:
No overtrading: Trades are allowed only when all three conditions (ADX, RSI, MA) align.
Session visual filter (background color highlights signal bars).
Features Included:
✅ Precise ADX Calculation
✅ Configurable RSI & MA lengths
✅ Clean Buy/Sell Entry & Exit logic
✅ Alerts Ready (Webhook-compatible for bots)
✅ Visuals: MA line, background highlights, ADX Threshold line.
Best Timeframes:
45M
Recommended Pairing:
XAUUSD (Gold/USD)
Works well with trending assets, can adapt to Forex Majors with slight tweaks.
Customization Parameters:
MA Length (default 300)
RSI Length (default 2)
ADX Length (default 14)
ADX Threshold (default 20)
Backtest Insights:
High accuracy during strong trends.
Works best during London & US sessions.
Filters out sideways, low-volatility zones effectively.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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 dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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.