OPEN-SOURCE SCRIPT
Updated

RSI Scalping Gold (XAUUSD) - v5

178
Displays the EMA9 and SMA20 to identify the trend.

Colors the area between the two averages to better visualize the equilibrium zone.

Displays green (buy) and red (sell) arrows aligned with the candles.

The RSI is calculated but hidden from the main chart (you can activate it by checking “Display on chart” in the settings).
Release Notes
What this version adds:

Visible and offset arrows and labels → clearer across all timeframes.
SL/TP directly on the label for each signal.
EMA9/SMA20 zone with transparent sky blue background.
Automatic BUY/SELL alerts as soon as the signal appears.
RSI chart updated in real time.
Release Notes
Custom Alerts

Each signal (BUY, SELL, VWAP touch) triggers:

an audio alert

a TradingView popup (via alertcondition() + alert()).

You can then go to "Create an alert" → choose the script → select:

BUY Signal

SELL Signal

VWAP Touch Volume
Release Notes
XAUUSD RSI Scalping + VWAP + SMA200 - v6 Enhanced

🎯 Strategy Overview

This strategy combines the power of RSI, trend confirmation from EMA/SMA, and precision of VWAP, to identify high-probability entry and exit zones on Gold (XAUUSD).
It’s specifically designed for scalping and intraday trading, with dynamic risk management through the ATR.

The goal is clear:
➡️ Trade only in the direction of the trend,
➡️ Exit before momentum fades,
➡️ And maintain dynamic SL/TP levels using volatility.

⚙️ Technical Components
🔹 Main Indicators

RSI (14) → detects overbought (>70) / oversold (<30) levels.

EMA 9 → short-term price impulse.

SMA 20 → short-term market structure.

SMA 200 → confirms the global trend.

VWAP → institutional volume-weighted mean price.

ATR (14) → defines Stop Loss / Take Profit zones dynamically.

🧠 Trading Logic
🟢 BUY Conditions

RSI crosses above 30,

Price above EMA9,

EMA9 > SMA20,

Price above SMA200 (uptrend confirmed).

📈 → A green BUY triangle appears under the candle with ATR-based SL/TP labels.

🔴 SELL Conditions

RSI crosses below 70,

Price below EMA9,

EMA9 < SMA20,

Price below SMA200 (downtrend confirmed).

📉 → A red SELL triangle appears above the candle with ATR-based SL/TP labels.

⚪ Exit Conditions

Exit Long → when RSI drops below 70 or EMA9 crosses under SMA20.

Exit Short → when RSI rises above 30 or EMA9 crosses over SMA20.

💡 You can easily rename “Exit Long” / “Exit Short” to “Close Long” / “Close Short” in the code for English labeling.

💥 Advanced Features

EMA9/SMA20 zone → blue shaded area showing short-term structure.

EMA9/VWAP zone → turns green (bullish) or red (bearish) to visualize momentum strength.

VWAP Touch + Volume Filter →
When price touches VWAP with volume above 1.2× average, a yellow label appears:
💥 “VWAP Touch Confirmed – Volume Spike”, signaling institutional reactions.

Built-in Alerts:

🚀 BUY Signal

🔻 SELL Signal

💥 VWAP Touch with Volume Confirmation

📊 RSI Dashboard

A small RSI panel in the top-right corner:

🟢 Green → RSI below 30 (oversold)

🟠 Orange → neutral

🔴 Red → RSI above 70 (overbought)

🧩 Customization Options

Adjust RSI, EMA, SMA, and ATR lengths in the settings.

Modify ATR multipliers for your preferred SL/TP ratio.

Tune RSI sensitivity for other assets (indices, forex, etc.).

Customize labels or alert messages for your trading style.

⚠️ Disclaimer

This script is for educational purposes only.
It is not financial advice.
Always test on a demo account before applying to live markets.
Past performance does not guarantee future results.

💬 Recommended Usage

Timeframes: 1min to 15min (scalping), up to 1H (intraday).

Asset: XAUUSD CFD (Gold).

Combine with volume analysis and London/New York sessions for better accuracy.

✨ Author: [Your Name or Alias]
📌 Version: v6 Enhanced (RSI + VWAP + EMA/SMA + ATR SL/TP)
🛠️ Optimized for Gold scalping traders seeking structured and visual momentum confirmation.
Release Notes
Correctif
Release Notes
correctif
Release Notes
new
Release Notes
Correctif
Release Notes
correctif
Release Notes
Update
Release Notes
update
Release Notes
update
Release Notes
update

Disclaimer

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.