| name | btcusd-trading |
| description | Fetch BTCUSD price data and analyze it using LLM reasoning to generate scalping signals. Optimized for small accounts with tight stop losses ($2). Use 5m/15m timeframes for precise entry timing. |
BTCUSD LLM Scalping Analysis
Skill for small account scalping with tight stop losses (~$2).
Account Configuration
This skill is configured for a cent account with symbol BTCUSDc:
- Point size: 0.01 (2 decimal places on this broker feed)
- Default lot size: 0.01 (ALWAYS use this unless user specifies otherwise)
- Default SL: 20000 points = $2.00
- Default TP: 40000 points = $4.00
- Max spread: 2500 points = 25.00 price delta
IMPORTANT: When executing trades, ALWAYS use 0.01 lot unless the user explicitly requests a different size. Never increase lot size on your own.
When the skill mentions "$2", it refers to the dollar value ($2.00), which equals 20000 points on cent accounts.
Philosophy
You ARE the analyst. Your PRIMARY decision tool is price structure — where price is relative to support, resistance, swing points, and key levels.
Candle patterns and momentum are your confirmation — they support or deny what structure is telling you. Never take a trade purely because price moved. Structure first, patterns second.
Your priority stack:
- Price structure (where is price relative to levels?)
- Candle patterns (rejection wicks, engulfing, momentum)
- Multi-timeframe confluence (does 15m agree with 5m?)
- Spread/cost awareness (is the risk:reward viable after costs?)
Quick Start - MetaTrader 5 (Primary Method)
Requirements: MetaTrader 5 terminal running on Windows, Python with MetaTrader5 and pandas packages.
1. Real-Time Tick Data (Exact Spread)
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_tick.py
Returns exact bid/ask/spread from your broker. Critical for $2 SL scalping — spread directly affects your effective risk.
Output includes:
- Current bid/ask prices
- Exact spread in points (not estimated)
- Spread warning if too high for scalping
2. Candle Data with Structure Analysis
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_candles.py M5 30
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_candles.py M15 20
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_candles.py M1 40
Timeframes: M1, M5, M15, M30, H1, H4, D1
Returns OHLC candles with automatic structure analysis:
- Recent swing high/low (last 10 candles)
- Period high/low
- Position in range (0-100%)
- Structure signals (near support/resistance)
3. Signal Generation
Generate trade setups with clear entry zone, SL, TP1/TP2, and probability-based verdict.
Analysis Workflow
- Run
mt5_tick.py → get exact bid/ask/spread
- Run
mt5_candles.py M5 30 → get candles + auto structure analysis
- Optionally run
mt5_candles.py M15 20 → for higher timeframe trend
- Analyze → structure first, patterns as context
- Output signal → with checklist, levels, and probabilities
- Output signal → provide levels, probabilities, and risk notes
Scalping Analysis Framework ($2 Stop Loss)
1. IDENTIFY MICRO STRUCTURE
With only $2 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 (< $4)
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 ± $2]
Take Profit: [minimum 1:1.5 R:R = $3.00]
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. PRICE POSITION CHECK (High-Probability Triggers)
These extreme positions often precede reversals — use them as entry confirmations:
- Price at period low (bottom 10% of range) → watch for LONG
- Price at period high (top 10% of range) → watch for SHORT
- Price shows rejection wick at level → confirmation
When price is at an extreme AND shows rejection, bounce probability increases significantly.
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: ATR-Based Volatility Filter (Broker-Calibrated)
Compute ATR(14) on both M5 and M15 from fresh candles.
- M5 hard gate: If latest M5 candle range >
1.8 x ATR(14, M5) → SKIP
- M15 hard gate: If latest M15 candle range >
1.6 x ATR(14, M15) → SKIP
- Baseline calibration for this BTCUSDc feed:
- Typical ATR(14, M5): 1200-2800 points
- Typical ATR(14, M15): 2600-5200 points
- If ATR is far above these bands for multiple candles, treat regime as unstable and favor NO TRADE
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
- BTC can move $30-50+ in seconds during these events. A $2 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
mt5_tick.py or mt5_candles.py returns an error → NO TRADE
- If data looks stale (price hasn't changed in multiple fetches) → NO TRADE
SOFT Gate 4: Spread/Slippage Cost Awareness (Broker-Calibrated)
On this BTCUSDc feed, spread is typically 1200-2200 points (12.00-22.00 price delta), with occasional spikes.
With MT5: Use mt5_tick.py to get the exact current spread from your broker. This is critical for $2 SL scalping.
Your REAL risk per trade (use live spread from mt5_tick.py):
Effective SL = $2 + spread_cost + slippage_cost
Effective TP1 = $2 - spread_cost
Effective TP2 = $4 - spread_cost
Use Cost@0.01 from mt5_tick.py for spread_cost. If spread is above 2200 points, downgrade confidence by one level.
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 $3-4 SL (not $2) to survive the wicks
- This gate was upgraded from SOFT to HARD based on real session experience where two consecutive $2 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
## BTCUSD 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 ($2 risk)
- Take Profit 1: $XXXX.XX (+$2)
- Take Profit 2: $XXXX.XX (+$4)
### 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 | Net After Live Spread | Est. Probability |
|----------|--------|-------|---------------------------|-----------------|
| SL Hit | $XXXX | -$2 | -($2 + spread_cost + slippage_cost) | XX-XX% |
| TP1 Hit | $XXXX | +$2 | +($2 - spread_cost) | XX-XX% |
| TP2 Hit | $XXXX | +$4 | +($4 - spread_cost) | 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 make disciplined decisions, not to force trades. If a setup has structural edge, report it with honest probabilities and strict risk framing.
### Pre-Signal Checklist
Answer these. Flag any "No" items as risks.
| # | Check | Answer |
|---|-------|--------|
| 1 | Is price near a clear level? | Yes/No |
| 2 | Is 5m volatility within ATR gate (latest range <= 1.8x ATR14)? | Yes/No |
| 3 | Is there a candle pattern or momentum confirming? | Yes/No |
| 4 | Does higher timeframe direction agree? | Yes/No |
| 5 | Is SL behind some structure? | Yes/No |
| 6 | No major news event right now? | Yes/No |
**Setup is actionable** if: Majority are "Yes" and #2 + #6 pass. Flag any "No" as a risk factor.
### Structure Analysis
[What micro structure you see - support/resistance, swing points]
### Entry Trigger
[Specific condition to enter - e.g., "break above local range high", "rejection candle at intraday support"]
### Reasoning
[2-3 sentences on why this setup works]
### Risk Warning
This is LLM-based analysis for testing only. Not financial advice.
What to Look For (5m Chart)
🟢 BUY Setups: Support bounce, breakout pullback, higher low, stop hunt reversal (wick sweeps lows then V-recovers)
🔴 SELL Setups: Resistance rejection, breakdown retest, lower high, stop hunt reversal (wick sweeps highs then V-reverses)
⚪ NO TRADE: Price mid-range, choppy action, high volatility, near session open/close
Important Notes
- LLM is NOT predictive - Pattern reading, not forecasting
- $2 is TIGHT - Real risk ~$2.40 after spread. Be selective.
- Session timing - Best: London-NY overlap (13:00-17:00 UTC)
- News kills scalpers - Check calendar before trading
Trade Management (Once in a Position)
- Trailing: At +$2, trail SL to +$1
- Session limit: After 2 consecutive losses (-$4), STOP for the session
- After losses: Widen SL to $3-4 if continuing
Experience Log
Add lessons learned here as you trade:
Setup
- Install MetaTrader 5 terminal from your broker
- Install Python packages:
pip install MetaTrader5 pandas
- Make sure MT5 terminal is running and logged in
- Test:
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_tick.py
Continuous Monitoring Mode
When asked to monitor BTCUSD for scalping opportunities, use this workflow:
Position Awareness Rules (REQUIRED)
- If any BTCUSDc position is open, switch to active-trade monitoring.
- If no position is open, continue normal setup monitoring.
Monitor Loop Execution Rules (CRITICAL)
This is an INFINITE loop. You MUST continue until user explicitly says "stop", "exit", or "pause".
| State | Action After Analysis |
|---|
NEUTRAL | sleep 30 → fetch again → DO NOT STOP |
WATCHING | sleep 15 → fetch again → DO NOT STOP |
CONSOLIDATING | sleep 45 → fetch again → DO NOT STOP |
SIGNAL | Output signal only → do not execute trade |
HARD RULES:
- After
NEUTRAL, WATCHING, or CONSOLIDATING → execute sleep → immediately fetch new data
- Do NOT say "let me know if you want me to continue" — just continue
- Do NOT rationalize stopping ("market seems quiet", "no setup forming") — keep monitoring
- Only stop on: user command, or HARD gate failure (market closed, script error)
After SIGNAL:
- Output full signal format with entry/SL/TP levels
- Continue monitoring based on state rules
Monitor Loop
- Load this skill for all analysis
- Fetch data — run BOTH tick and candle scripts every cycle:
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_tick.py
py C:/Users/trader69/.config/opencode/skill/btcusd-trading/scripts/mt5_candles.py M5 15
- Analyze and determine state (structure first, patterns as confirmation)
- Wait based on state, then repeat
Wait Discipline (Important)
When monitoring continuously, pause between cycles to avoid overwhelming the context.
WATCHING (15 seconds):
sleep 15
NEUTRAL (30 seconds):
sleep 30
CONSOLIDATING (45 seconds):
sleep 45
Rule: Do not run back-to-back fetches without waiting unless the user explicitly says "check now" or "new candle now".
Adaptive Intervals
| State | Description | Wait Time |
|---|
NEUTRAL | Price mid-range, no clear level nearby | 30 seconds |
WATCHING | Price near key level, rejection forming | 15 seconds |
CONSOLIDATING | Price stuck in tight range (<$2), low momentum, no breakout | 45 seconds |
SIGNAL | Entry opportunity confirmed per skill criteria | Alert only |
Detecting CONSOLIDATING State
Switch to CONSOLIDATING when ALL of these are true:
- Tight range: Last 3-5 candles have total range < $2 (highs and lows compressed)
- No breakout: Price not testing key support/resistance (stuck in middle)
- Low momentum: Small candle bodies, no direction
Why this matters: Checking every minute during consolidation wastes API calls and adds no value. Wait for the range to break, then switch back to WATCHING.
Exit CONSOLIDATING: When price breaks out of the range OR volatility expands (larger candles)
State Transitions
NEUTRAL → WATCHING: Price approaches support/resistance, or at extreme of range
NEUTRAL → CONSOLIDATING: Price enters tight range with no momentum
WATCHING → SIGNAL: Entry trigger confirmed (rejection wick, breakout, stop hunt reversal)
WATCHING → NEUTRAL: Price moves away from level without triggering
WATCHING → CONSOLIDATING: Price stalls at level, forms tight range instead of breaking
CONSOLIDATING → WATCHING: Range breaks, price moves toward key level
CONSOLIDATING → SIGNAL: Breakout with momentum confirms entry
SIGNAL → Output signal
On SIGNAL
Output the full signal format (see Signal Output Format above).
If entry range is specified, include a suggested limit midpoint, but do not place any order.
On Active Trade
When a position is open:
- Switch to 10-second monitoring intervals
- Track P&L, distance to SL/TP
- Alert on key levels (+$1.00 for breakeven move, approaching TP, approaching SL)
- Continue until trade closes