OPEN-SOURCE SCRIPT
Gold Scalper V4.2

GOLD SCALPER V4.2 — GOLD (XAUUSD) SCALPING GUIDELINE
Kalman Filter + Double Bollinger Bands + 3-Confluence System
Version 4.2
PART 1 — WHAT IS THIS INDICATOR?
GOLD SCALPER V4.2 is a scalping tool built exclusively for Gold (XAUUSD). It combines three components:
COMPONENT | WHAT IT DOES
Kalman Filter | Smooths price baseline mathematically. Filters Gold's news spikes without lag.
SCALPER Architecture | Creates 3 price zones: Sell / Neutral / Buy. Identifies statistically extreme positions.
3-Confluence System | Requires 3 conditions before firing a signal. Filters signals during band-walking.
PART 2 — THE THREE ZONES ON THE CHART
The chart is always divided into three labeled zones. Each zone tells you exactly what to do.
🔴 SELL ZONE — Price > BB2 Upper — Overbought
DO NOT BUY here. Look for SELL only. Deeper in zone = potential reversal area.
⚪ NEUTRAL ZONE — Inside BB1 bands — Normal range
No extreme condition. WAIT. Do not trade here.
🟢 BUY ZONE — Price < BB2 Lower — Oversold
DO NOT SELL here. Look for BUY only. Deeper in zone = potential reversal area.
VOLUME GRADIENT (Zone fill color):
• Vibrant / saturated color → Strong volume conviction → Potential signal
• Faded / pale color → Weak volume → WAIT, skip signal
PART 3 — ENTRY, TARGETS, AND STOP LOSS
Logic: Price moves to one extreme zone → target is the OPPOSITE extreme zone. Bollinger Bands are mean-reverting by math.
── BUY SETUP (Entry from Green BUY ZONE) ─────────────────────
• Entry → Close of signal candle (below BB2 Lower)
• TP1 (50%) → LTF BB1 Upper (close HALF your position here)
• TP2 (50%) → LTF BB2 Upper (close remaining half here)
• Stop Loss → LTF BB2 Lower × 0.998 (0.2% buffer below band)
── SELL SETUP (Entry from Red SELL ZONE) ─────────────────────
• Entry → Close of signal candle (above BB2 Upper)
• TP1 (50%) → LTF BB1 Lower (close HALF your position here)
• TP2 (50%) → LTF BB2 Lower (close remaining half here)
• Stop Loss → LTF BB2 Upper × 1.002 (0.2% buffer above band)
NOTE: All four levels (Entry, TP1, TP2, SL) are drawn automatically on the chart as lines and labels when a signal fires. You do not need to calculate them manually.
PART 4 — THE 3-CONFLUENCE SIGNAL SYSTEM
A signal (▲ BUY or ▼ SELL) fires ONLY when ALL THREE conditions align at the same time. Missing even one = no signal fires.
── CONDITION 1: Statistical Exhaustion (The Zone) ────────────
• BUY → Price must close BELOW LTF BB2 Lower
• SELL → Price must close ABOVE LTF BB2 Upper
This confirms price has entered statistically extreme territory. An internal latch is set and stays active until price returns inside the BB1 bands (signal cycle complete).
── CONDITION 2: Momentum Shift (The Slope) ───────────────────
• BUY → LTF BB2 Lower band is RISING (current > previous bar)
• SELL → LTF BB2 Upper band is FALLING (current < previous bar)
*** THIS IS THE MOST IMPORTANT CONDITION ***
Gold often "walks the band" — price stays in the extreme zone for many bars during strong trends. Condition 2 prevents entries during band-walking by waiting for the band itself to reverse.
── CONDITION 3: Macro Trend Filter (HTF) ─────────────────────
• BUY → Current price must be ABOVE the HTF Basis line
• SELL → Current price must be BELOW the HTF Basis line
This ensures you trade WITH the macro trend, not against it.
── SIGNAL RESET LOGIC ────────────────────────────────────────
• After BUY fires → No new BUY until price returns above BB1 Lower (LTF + HTF)
• After SELL fires → No new SELL until price returns below BB1 Upper (LTF + HTF)
This prevents duplicate signals during a single move.
PART 5 — STEP-BY-STEP TRADE EXECUTION
── BEFORE THE SESSION ────────────────────────────────────────
1. Open XAUUSD chart with the indicator applied.
2. Set the correct HTF Timeframe in Settings.
3. Check the time — avoid trading 15 min before/after major USD news.
4. Confirm you are in an active session:
- London Open → 08:00–10:00 GMT
- NY Open → 13:00–17:00 GMT
── FINDING THE SETUP ─────────────────────────────────────────
1. Is price above or below the HTF Basis line?
- Above HTF Basis → BULLISH macro → BUY setups only today
- Below HTF Basis → BEARISH macro → SELL setups only today
2. Wait for price to enter the matching extreme zone:
- Bullish day → Wait for price to enter 🟢 BUY ZONE
- Bearish day → Wait for price to enter 🔴 SELL ZONE
3. Check the zone fill color:
- Vibrant saturated color → Strong volume → Proceed
- Faded pale color → Weak volume → Wait more
4. Wait for the signal triangle:
- ▲ green triangle → BUY signal confirmed
- ▼ red triangle → SELL signal confirmed
── ENTERING THE TRADE ────────────────────────────────────────
1. Enter at market price on close of signal candle.
2. Set Stop Loss, TP1, and TP2 at the lines shown on chart.
── MANAGING THE TRADE ────────────────────────────────────────
1. TP1 hit → Close 50% of position and move SL to Break Even.
2. TP2 hit → Close remaining 50%. Trade complete.
3. SL hit → Accept the loss.
★ GOLDEN RULE: Never let a winning trade turn into a loss.
PART 6 — THE VOLUME GRADIENT EXPLAINED
READING THE COLOR:
• Deep saturated GREEN in BUY zone → Strong buying pressure → Potential BUY signal
• Faded pale GREEN in BUY zone → Weak volume → Lower probability
• Deep saturated RED in SELL zone → Strong selling pressure → Potential SELL signal
PRACTICAL RULE: Only trade when the zone fill is vibrant.
PART 7 — TIMEFRAME SETTINGS FOR GOLD
CHART TF | HTF SETTING
1 minute | 5 minutes
3 minutes | 15 minutes
5 minutes | 15 minutes
15 minutes | 1 Hour
1 Hour | 4 Hours
RECOMMENDED START: 15-minute chart + 1-Hour HTF.
LTF BAND SETTINGS:
• Length → 20 bars
• Inner Multiplier → 1.0
• Outer Multiplier → 2.0
HTF BAND SETTINGS:
• Length → 20 bars
• Inner Multiplier → 1.5
• Outer Multiplier → 2.25
PART 8 — RISK MANAGEMENT RULES
• RULE 1 — POSITION SIZING: Never risk more than 1–2% of account per trade.
• RULE 2 — NEWS AVOIDANCE: Avoid new trades 15 minutes BEFORE and AFTER major news.
• RULE 3 — DAILY LOSS LIMIT: If you lose 3 trades in a row → STOP for the day.
• RULE 4 — MINIMUM RISK/REWARD: Only enter trades where RRR is 1.5:1 or better.
• RULE 5 — SESSION AWARENESS: Best hours: London Open (08:00–10:00), NY Open (13:00–15:00), Overlap (13:00–17:00).
• RULE 6 — TREND ALIGNMENT IS NON-NEGOTIABLE: HTF Bearish → SELL only. HTF Bullish → BUY only.
PART 9 — COMMON MISTAKES TO AVOID
MISTAKE | HOW TO AVOID
Trading against HTF trend | Check HTF Basis direction FIRST.
Entering in Neutral Zone | Only enter in Sell Zone or Buy Zone.
Ignoring volume gradient | Faded fill = low conviction.
Moving SL further away | Honor the calculated SL. Period.
Not taking TP1 | Always close 50% at TP1 and move SL to BE.
Chasing missed signals | If you missed the entry candle, skip it.
PART 10 — ZONE LABEL SETTINGS
The zone labels have fully customizable colors in Settings → Zone Labels.
PART 11 — ALERT SETUP (TRADINGVIEW)
• Alert 1 → "🟢 BUY Signal | Gold Scalper"
• Alert 2 → "🔴 SELL Signal | Gold Scalper"
QUICK REFERENCE CARD
PRE-TRADE CHECKLIST:
[ ] HTF Basis direction confirmed?
[ ] Price is in Sell Zone or Buy Zone?
[ ] Zone fill color is vibrant / saturated?
[ ] Signal triangle has appeared?
[ ] No major news in the next 15 minutes?
[ ] RRR is 1.5:1 or better?
---
Disclaimer: This guideline and the GOLD SCALPER V4.2 indicator are provided for educational purposes only. Trading carries a high level of risk. Always trade with capital you can afford to lose.
Kalman Filter + Double Bollinger Bands + 3-Confluence System
Version 4.2
PART 1 — WHAT IS THIS INDICATOR?
GOLD SCALPER V4.2 is a scalping tool built exclusively for Gold (XAUUSD). It combines three components:
COMPONENT | WHAT IT DOES
Kalman Filter | Smooths price baseline mathematically. Filters Gold's news spikes without lag.
SCALPER Architecture | Creates 3 price zones: Sell / Neutral / Buy. Identifies statistically extreme positions.
3-Confluence System | Requires 3 conditions before firing a signal. Filters signals during band-walking.
PART 2 — THE THREE ZONES ON THE CHART
The chart is always divided into three labeled zones. Each zone tells you exactly what to do.
🔴 SELL ZONE — Price > BB2 Upper — Overbought
DO NOT BUY here. Look for SELL only. Deeper in zone = potential reversal area.
⚪ NEUTRAL ZONE — Inside BB1 bands — Normal range
No extreme condition. WAIT. Do not trade here.
🟢 BUY ZONE — Price < BB2 Lower — Oversold
DO NOT SELL here. Look for BUY only. Deeper in zone = potential reversal area.
VOLUME GRADIENT (Zone fill color):
• Vibrant / saturated color → Strong volume conviction → Potential signal
• Faded / pale color → Weak volume → WAIT, skip signal
PART 3 — ENTRY, TARGETS, AND STOP LOSS
Logic: Price moves to one extreme zone → target is the OPPOSITE extreme zone. Bollinger Bands are mean-reverting by math.
── BUY SETUP (Entry from Green BUY ZONE) ─────────────────────
• Entry → Close of signal candle (below BB2 Lower)
• TP1 (50%) → LTF BB1 Upper (close HALF your position here)
• TP2 (50%) → LTF BB2 Upper (close remaining half here)
• Stop Loss → LTF BB2 Lower × 0.998 (0.2% buffer below band)
── SELL SETUP (Entry from Red SELL ZONE) ─────────────────────
• Entry → Close of signal candle (above BB2 Upper)
• TP1 (50%) → LTF BB1 Lower (close HALF your position here)
• TP2 (50%) → LTF BB2 Lower (close remaining half here)
• Stop Loss → LTF BB2 Upper × 1.002 (0.2% buffer above band)
NOTE: All four levels (Entry, TP1, TP2, SL) are drawn automatically on the chart as lines and labels when a signal fires. You do not need to calculate them manually.
PART 4 — THE 3-CONFLUENCE SIGNAL SYSTEM
A signal (▲ BUY or ▼ SELL) fires ONLY when ALL THREE conditions align at the same time. Missing even one = no signal fires.
── CONDITION 1: Statistical Exhaustion (The Zone) ────────────
• BUY → Price must close BELOW LTF BB2 Lower
• SELL → Price must close ABOVE LTF BB2 Upper
This confirms price has entered statistically extreme territory. An internal latch is set and stays active until price returns inside the BB1 bands (signal cycle complete).
── CONDITION 2: Momentum Shift (The Slope) ───────────────────
• BUY → LTF BB2 Lower band is RISING (current > previous bar)
• SELL → LTF BB2 Upper band is FALLING (current < previous bar)
*** THIS IS THE MOST IMPORTANT CONDITION ***
Gold often "walks the band" — price stays in the extreme zone for many bars during strong trends. Condition 2 prevents entries during band-walking by waiting for the band itself to reverse.
── CONDITION 3: Macro Trend Filter (HTF) ─────────────────────
• BUY → Current price must be ABOVE the HTF Basis line
• SELL → Current price must be BELOW the HTF Basis line
This ensures you trade WITH the macro trend, not against it.
── SIGNAL RESET LOGIC ────────────────────────────────────────
• After BUY fires → No new BUY until price returns above BB1 Lower (LTF + HTF)
• After SELL fires → No new SELL until price returns below BB1 Upper (LTF + HTF)
This prevents duplicate signals during a single move.
PART 5 — STEP-BY-STEP TRADE EXECUTION
── BEFORE THE SESSION ────────────────────────────────────────
1. Open XAUUSD chart with the indicator applied.
2. Set the correct HTF Timeframe in Settings.
3. Check the time — avoid trading 15 min before/after major USD news.
4. Confirm you are in an active session:
- London Open → 08:00–10:00 GMT
- NY Open → 13:00–17:00 GMT
── FINDING THE SETUP ─────────────────────────────────────────
1. Is price above or below the HTF Basis line?
- Above HTF Basis → BULLISH macro → BUY setups only today
- Below HTF Basis → BEARISH macro → SELL setups only today
2. Wait for price to enter the matching extreme zone:
- Bullish day → Wait for price to enter 🟢 BUY ZONE
- Bearish day → Wait for price to enter 🔴 SELL ZONE
3. Check the zone fill color:
- Vibrant saturated color → Strong volume → Proceed
- Faded pale color → Weak volume → Wait more
4. Wait for the signal triangle:
- ▲ green triangle → BUY signal confirmed
- ▼ red triangle → SELL signal confirmed
── ENTERING THE TRADE ────────────────────────────────────────
1. Enter at market price on close of signal candle.
2. Set Stop Loss, TP1, and TP2 at the lines shown on chart.
── MANAGING THE TRADE ────────────────────────────────────────
1. TP1 hit → Close 50% of position and move SL to Break Even.
2. TP2 hit → Close remaining 50%. Trade complete.
3. SL hit → Accept the loss.
★ GOLDEN RULE: Never let a winning trade turn into a loss.
PART 6 — THE VOLUME GRADIENT EXPLAINED
READING THE COLOR:
• Deep saturated GREEN in BUY zone → Strong buying pressure → Potential BUY signal
• Faded pale GREEN in BUY zone → Weak volume → Lower probability
• Deep saturated RED in SELL zone → Strong selling pressure → Potential SELL signal
PRACTICAL RULE: Only trade when the zone fill is vibrant.
PART 7 — TIMEFRAME SETTINGS FOR GOLD
CHART TF | HTF SETTING
1 minute | 5 minutes
3 minutes | 15 minutes
5 minutes | 15 minutes
15 minutes | 1 Hour
1 Hour | 4 Hours
RECOMMENDED START: 15-minute chart + 1-Hour HTF.
LTF BAND SETTINGS:
• Length → 20 bars
• Inner Multiplier → 1.0
• Outer Multiplier → 2.0
HTF BAND SETTINGS:
• Length → 20 bars
• Inner Multiplier → 1.5
• Outer Multiplier → 2.25
PART 8 — RISK MANAGEMENT RULES
• RULE 1 — POSITION SIZING: Never risk more than 1–2% of account per trade.
• RULE 2 — NEWS AVOIDANCE: Avoid new trades 15 minutes BEFORE and AFTER major news.
• RULE 3 — DAILY LOSS LIMIT: If you lose 3 trades in a row → STOP for the day.
• RULE 4 — MINIMUM RISK/REWARD: Only enter trades where RRR is 1.5:1 or better.
• RULE 5 — SESSION AWARENESS: Best hours: London Open (08:00–10:00), NY Open (13:00–15:00), Overlap (13:00–17:00).
• RULE 6 — TREND ALIGNMENT IS NON-NEGOTIABLE: HTF Bearish → SELL only. HTF Bullish → BUY only.
PART 9 — COMMON MISTAKES TO AVOID
MISTAKE | HOW TO AVOID
Trading against HTF trend | Check HTF Basis direction FIRST.
Entering in Neutral Zone | Only enter in Sell Zone or Buy Zone.
Ignoring volume gradient | Faded fill = low conviction.
Moving SL further away | Honor the calculated SL. Period.
Not taking TP1 | Always close 50% at TP1 and move SL to BE.
Chasing missed signals | If you missed the entry candle, skip it.
PART 10 — ZONE LABEL SETTINGS
The zone labels have fully customizable colors in Settings → Zone Labels.
PART 11 — ALERT SETUP (TRADINGVIEW)
• Alert 1 → "🟢 BUY Signal | Gold Scalper"
• Alert 2 → "🔴 SELL Signal | Gold Scalper"
QUICK REFERENCE CARD
PRE-TRADE CHECKLIST:
[ ] HTF Basis direction confirmed?
[ ] Price is in Sell Zone or Buy Zone?
[ ] Zone fill color is vibrant / saturated?
[ ] Signal triangle has appeared?
[ ] No major news in the next 15 minutes?
[ ] RRR is 1.5:1 or better?
---
Disclaimer: This guideline and the GOLD SCALPER V4.2 indicator are provided for educational purposes only. Trading carries a high level of risk. Always trade with capital you can afford to lose.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Forex Signals:
Youtube:
youtube.com/channel/UCMRAU6KDZOro-KmFFSKlfYA
Linkedin:
linkedin.com/company/investor-tipster
Website:
investortipster.com/
Youtube:
youtube.com/channel/UCMRAU6KDZOro-KmFFSKlfYA
Linkedin:
linkedin.com/company/investor-tipster
Website:
investortipster.com/
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Forex Signals:
Youtube:
youtube.com/channel/UCMRAU6KDZOro-KmFFSKlfYA
Linkedin:
linkedin.com/company/investor-tipster
Website:
investortipster.com/
Youtube:
youtube.com/channel/UCMRAU6KDZOro-KmFFSKlfYA
Linkedin:
linkedin.com/company/investor-tipster
Website:
investortipster.com/
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.