Claude
Skills
Sign in
Back

xauusd-trading

Included with Lifetime
$97 forever

Fetch XAUUSD (Gold) price data and analyze it using LLM reasoning to generate scalping signals. Optimized for small accounts with tight stop losses (5 points). Use 5m/15m timeframes for precise entry timing.

AI Agentsscripts

What this skill does


# XAUUSD LLM Scalping Analysis

Skill for **small account scalping** with tight stop losses (~5 points / $5).

## Philosophy

You ARE the analyst. Your PRIMARY decision tool is **price structure** — where price is relative to support, resistance, swing points, and key levels.

Indicators (RSI, MACD, Stoch, etc.) are **context only** — they confirm or deny what structure is telling you. Never take a trade purely because an indicator says so. Structure first, indicators second, TradingView rating last.

**Your priority stack**:
1. Price structure (where is price relative to levels?)
2. Candle patterns (rejection wicks, engulfing, momentum)
3. Indicator confluence (do RSI/MACD/Stoch agree with structure?)
4. TradingView signal rating (treat as a secondary opinion, not gospel)

## Quick Start - Fetch Data

### 1. Real-time price + indicators (TradingView - NO DELAY)

```bash
bash /home/hazeruno/.config/opencode/skill/xauusd-trading/scripts/fetch_price.sh
```

Returns live price, current candle OHLC, RSI, MACD, Stoch, ADX, CCI, EMA, BB, ATR on 5m/15m/1h timeframes. **Use for current snapshot and indicator context.**

### 2. Real-time candle history (Twelve Data - NO DELAY)

```bash
# Requires: export TWELVE_DATA_API_KEY="your_key"
# Get free key: https://twelvedata.com (800 requests/day, free forever)

# 5-minute candles (primary for scalping)
bash /home/hazeruno/.config/opencode/skill/xauusd-trading/scripts/fetch_candles.sh 5min 30

# 15-minute candles (for trend/structure)
bash /home/hazeruno/.config/opencode/skill/xauusd-trading/scripts/fetch_candles.sh 15min 20

# 1-minute candles (for micro entries)
bash /home/hazeruno/.config/opencode/skill/xauusd-trading/scripts/fetch_candles.sh 1min 40
```

Returns last N candles with OHLC — **real-time, no delay**. Use for structure analysis: swing highs/lows, support/resistance, patterns.

**Intervals**: 1min, 5min, 15min, 30min, 1h, 4h, 1day

### 3. Fallback candle history (Yahoo Finance - ~15-20min delay, NO key needed)

```bash
bash /home/hazeruno/.config/opencode/skill/xauusd-trading/scripts/fetch_gold.sh 5m 1d 50
```

Only use if Twelve Data key is not set. Data is delayed ~15-20 minutes.

## Analysis Workflow

1. **Run `fetch_price.sh`** → get live price + indicators snapshot
2. **Run `fetch_candles.sh 5min 30`** → get real-time candle structure (swing points, patterns)
3. **Optionally run `fetch_candles.sh 15min 20`** → for higher timeframe trend
4. **Analyze** → structure first, indicators as context
5. **Output signal** → with checklist, levels, and probabilities

## Scalping Analysis Framework (5-Point Stop Loss)

### 1. IDENTIFY MICRO STRUCTURE
With only 5 points of risk, you need PRECISE entries:
- Find the **immediate swing high/low** (last 5-10 candles)
- Identify **micro support/resistance** levels
- Look for **tight consolidation** ranges (< 10 points)

### 2. ENTRY TIMING CRITERIA
Only signal when:
- Price is AT a clear level (not in the middle of a range)
- Recent candle shows **rejection wick** or **engulfing pattern**
- Stop loss placement is LOGICAL (behind structure, not arbitrary)

### 3. CALCULATE EXACT LEVELS
For every signal, specify:
```
Entry: [exact price]
Stop Loss: [entry ± 5 points]
Take Profit: [minimum 1:1.5 R:R = 7.5 points]
```

### 4. MOMENTUM CHECK
On 5m chart, confirm:
- Last 3-5 candles show directional bias
- No major wick rejections against your direction
- Volume/candle size increasing in your direction

### 5. EXTREME INDICATOR READINGS (High-Probability Triggers)
These extreme readings often precede reversals — use them as entry confirmations:

| Indicator | Extreme LONG Zone | Extreme SHORT Zone |
|-----------|-------------------|-------------------|
| Stochastic K | **< 10** | **> 90** |
| CCI | **< -100** | **> +100** |
| RSI | **< 30** | **> 70** |

**When multiple indicators are extreme simultaneously**, bounce probability increases significantly.

Example from real session: Stoch K hit 7.2 with CCI at -92 → price bounced 12+ points.

## Hard "NO TRADE" Gates

Before generating any signal, check these. Gates marked **HARD** = must skip. Gates marked **SOFT** = warn but can still trade.

### HARD Gate 1: Volatility Filter
- If 5m ATR > 8 points → **SKIP** (your 5-point SL is noise in this volatility)
- If 15m ATR > 20 points → **SKIP** (market too wild for scalping)

### HARD Gate 2: News Event Filter
Do NOT trade during or 15 minutes before/after these events:
- **US**: CPI, NFP (Non-Farm Payrolls), FOMC rate decisions, PCE, PPI
- **Global**: ECB/BOE/BOJ rate decisions, geopolitical shocks
- Gold can move 30-50+ points in seconds during these events. A 5-point SL is meaningless.

If you're unsure whether a news event is happening, add a warning: "Check economic calendar before entering."

### HARD Gate 3: Script Failure
- If `fetch_price.sh` returns an error or "Market may be closed" → **NO TRADE**
- If data looks stale (price hasn't changed in multiple fetches) → **NO TRADE**

### SOFT Gate 4: Spread/Slippage Cost Awareness
Gold spread is typically 2-3 points, plus ~1 point slippage on entries.

**Your REAL risk per trade**:
```
Effective SL = 5 (your SL) + 2-3 (spread) + 1 (slippage) = 8-9 points total cost
Effective TP1 = 5 (your TP) - 2-3 (spread) = 2-3 points net gain
Effective TP2 = 10 (your TP) - 2-3 (spread) = 7-8 points net gain
```

Always mention this in your analysis, but still suggest the trade if structure looks good.

### HARD Gate 5: Rollover Period (21:00-22:00 UTC)
- **DO NOT TRADE** during 21:00-22:00 UTC (daily rollover/swap time)
- Stop hunts are extremely common during this window — market makers sweep liquidity before the new session
- If you must trade during rollover, use **minimum 8-point SL** (not 5) to survive the wicks
- This gate was upgraded from SOFT to HARD based on real session experience where two consecutive 5-pt SLs were hunted during rollover

### SOFT Gate 6: Session Timing
- **Best**: London-NY overlap (13:00-17:00 UTC) — tightest spreads, best liquidity
- **OK**: London session (08:00-12:00 UTC), NY session (13:00-21:00 UTC)
- **Warn but allow**: Asian session (wider spreads, note it)

## Signal Output Format

```
## XAUUSD SCALP SIGNAL

**Action**: 🟢 BUY (Long) / 🔴 SELL (Short) / ⚪ NO TRADE
**Confidence**: [High / Medium / Low]

### Levels
- Current Price: $XXXX.XX
- Entry Zone: $XXXX.XX - $XXXX.XX
- Stop Loss: $XXXX.XX (5 points risk)
- Take Profit 1: $XXXX.XX (+5 points)
- Take Profit 2: $XXXX.XX (+10 points)

### Win Probability & Scenarios

**IMPORTANT**: These probabilities are HEURISTIC — educated guesses based on structure, not statistical models. Be honest but not paralyzed.

**Probability guidelines**:
- Use ranges: "35-45%", not "42%"
- Cap at 70% max for any single outcome
- If SL probability > TP1 probability by a wide margin → SKIP
- If everything is 33/33/33 → lean toward the direction momentum supports

Estimate how likely each outcome is based on the current structure:

| Scenario | Target | Gross Pts | Net After Spread (~3pts) | Est. Probability |
|----------|--------|-----------|--------------------------|-----------------|
| SL Hit | $XXXX | -5 | -8 (SL + spread + slip) | XX-XX% |
| TP1 Hit | $XXXX | +5 | +2 to +3 | XX-XX% |
| TP2 Hit | $XXXX | +10 | +7 to +8 | XX-XX% |

**Expected Value (cost-adjusted)**:
- TP1 play: (TP1% x net_TP1) - (SL% x net_SL) = $X.XX
- TP2 play: (TP2% x net_TP2) - (SL% x net_SL) = $X.XX

**Verdict**: [WORTH TAKING / MARGINAL / SKIP]

The goal is to help the user DECIDE, not to block all trades. If a setup has any structural edge at all, present it with honest probabilities and let the user judge.

### Pre-Signal Checklist

Answer these. Flag any "No" items as risks, but still suggest the trade if the overall picture has an edge.

| # | Check | Answer |
|---|-------|--------|
| 1 | Is price near a clear level? | Yes/No |
| 2 | Is 5m ATR reasonable (≤ 8)? | Yes/No |
| 3 | Is there a candle pattern or momentum confirming? | Yes/No |
| 4 | Does higher timeframe direction agree
Files: 4
Size: 27.5 KB
Complexity: 50/100
Category: AI Agents

Related in AI Agents