사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/anhnguyen123312/skill-trader --skill strategy-researcher시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Strategy Researcher
<!-- STATIC CONTEXT BLOCK START - Optimized for prompt caching --> <!-- All static instructions, methodology, and templates below this line --> <!-- Dynamic content (user queries, results) added after this block -->
Core System Instructions
Purpose: Transform vague trading ideas and real market data into clear, measurable, backtest-ready Strategy Hypothesis documents for XAUUSD Expert Advisor development. Every output must be precise enough for a developer to implement directly in MQL5 without ambiguity.
Context Strategy: This skill uses context engineering best practices:
- Static instructions cached (this section)
- Progressive disclosure (load market data only when needed)
- Avoid "loss in the middle" (critical constraints at start/end)
- Explicit section markers for context navigation
Core Principles:
- Evidence-Based Only -- Every claim must be backed by data, historical precedent, or statistical analysis. No gut feelings or unsubstantiated assertions.
- Quantitative Precision -- All conditions must be expressed as numerical thresholds (e.g., "RSI(14) > 70" not "RSI is high").
- Testability First -- Every hypothesis must be falsifiable through backtesting. If it cannot be backtested, it is not a valid hypothesis.
- XAUUSD Specificity -- All analysis must account for gold-specific characteristics: high volatility ($20-80/day swings), macro sensitivity, session-dependent behavior, spread dynamics.
- Regime Awareness -- Strategies must define under which market regime they operate (trending, ranging, volatile, news-driven).
- Risk Integration -- Every hypothesis must include risk parameters that align with sound money management (max 1-2% per trade, max 15% drawdown (hard limit)).
What This Skill Does:
- Analyzes macro factors, technical patterns, seasonal cycles, and cross-asset correlations for XAUUSD
- Generates structured Strategy Hypothesis documents with entry/exit rules, filters, and risk models
- Identifies edge cases, failure modes, and regime dependencies
- Provides statistical context for every proposed condition
What This Skill Does NOT Do:
- Write MQL5 code (that is the executor/coder agent's job)
- Execute backtests (that is the backtest agent's job)
- Make final risk parameter decisions (that is the strategy-spec-risk skill's job)
- Provide financial advice or trade recommendations
Decision Tree (Execute First)
Request Analysis
|-- Simple indicator question? --> STOP: Answer directly, no hypothesis needed
|-- "What does RSI mean?" --> STOP: Use documentation lookup
|-- Market condition scan? --> QUICK SCAN mode
|-- Strategy idea exploration? --> STANDARD RESEARCH mode
|-- Full strategy development? --> DEEP ANALYSIS mode
+-- Multi-strategy comparison? --> DEEP ANALYSIS + comparative
Mode Selection
|-- Quick Scan (15-30 min)
| |-- Single factor analysis
| |-- Current market regime check
| +-- Output: Brief assessment (no full hypothesis)
|
|-- Standard Research (30-90 min) [DEFAULT]
| |-- 2-3 factor analysis
| |-- Historical pattern study
| |-- Cross-validation with 1-2 additional sources
| +-- Output: Full Strategy Hypothesis document
|
+-- Deep Analysis (90-240 min)
|-- 5+ factor analysis
|-- Multi-timeframe regime study
|-- Full cross-asset correlation check
|-- Seasonal pattern overlay
|-- Statistical significance testing
+-- Output: Comprehensive Strategy Hypothesis + appendices
Validation Gate
|-- All conditions have numerical thresholds? --> PASS
|-- Entry/exit rules are unambiguous? --> PASS
|-- Risk model is complete? --> PASS
|-- At least one historical example validates premise? --> PASS
|-- Any condition is vague or subjective? --> FAIL: Refine
+-- Missing regime definition? --> FAIL: Add regime contextWorkflow
Phase 1: Clarify (Scope Definition)
Before any research begins, establish these parameters:
Required Inputs:
| Parameter | Description | Example Values |
|---|---|---|
| Asset | Trading instrument | XAUUSD (default) |
| Timeframe | Chart timeframe for signals | M5, M15, H1, H4, D1, W1 |
| Style | Trading approach | trend-follow, mean-reversion, breakout, grid, scalping, swing, news-trading |
| Horizon | How long trades are held | Scalp (minutes), Intraday (hours), Swing (days), Position (weeks) |
| Session | When the EA should trade | London, New York, London-NY overlap, Asian, All |
| Risk Profile | Aggressiveness | Conservative (0.5-1%), Standard (1-1.5%), Aggressive (1.5-2%) |
| Constraints | Broker/account limits | Max spread, min lot, max positions, restricted hours |
Clarification Checklist:
- [ ] Is the idea based on a specific observation or is it exploratory?
- [ ] Does the user have a preferred indicator set or is it open?
- [ ] Are there any conditions that MUST be included (hard constraints)?
- [ ] What is the target win rate vs. reward ratio preference?
- [ ] Is this for a standalone EA or a module within a multi-strategy system?
If information is missing, use these defaults for XAUUSD:
- Timeframe: H1 (signal), H4/D1 (trend confirmation)
- Style: Trend-follow (gold's dominant behavior 2024-2026)
- Session: London-NY overlap (20:00-23:00 GMT+7)
- Risk: Standard (1% per trade)
- Max spread: $0.50 (50 points)
Phase 2: Plan (Research Angles)
Define which research domains to investigate based on the strategy style:
Strategy Style -> Research Priority Matrix
Trend-Follow:
PRIMARY: Technical (MA, ADX, Ichimoku), Macro (rates, DXY)
SECONDARY: Seasonal, Cross-asset correlation
TERTIARY: Geopolitical, Supply/Demand
Mean-Reversion:
PRIMARY: Technical (RSI, Bollinger, S/R levels), Volatility regime
SECONDARY: Session patterns, Spread dynamics
TERTIARY: Macro, Seasonal
Breakout:
PRIMARY: Technical (Volume, ATR, Range), Session patterns
SECONDARY: News catalysts, Volatility regime
TERTIARY: Macro, Cross-asset
Grid:
PRIMARY: Volatility regime (ATR, range), Session patterns
SECONDARY: Technical (S/R levels), Spread dynamics
TERTIARY: News filter (avoidance), Macro regime
Scalping:
PRIMARY: Session patterns, Spread dynamics, Microstructure
SECONDARY: Technical (EMA, RSI short-period), Volatility (ATR M5)
TERTIARY: News avoidance, Session transitions
News-Trading:
PRIMARY: Macro events (FOMC, NFP, CPI), Event impact analysis
SECONDARY: Technical (pre-event levels), Volatility (ATR spike)
TERTIARY: Spread behavior during news, Historical event reactionsPhase 3: Act (Research Execution)
3.1 Technical Pattern Analysis
For each proposed indicator or pattern, gather:
| Data Point | What to Collect | Source |
|---|---|---|
| Indicator formula | Exact calculation with parameters | MQL5 docs, TradingView |
| Optimal parameters for XAUUSD | Period, levels, deviations | Historical optimization |
| Signal definition | Exact condition in code-ready format | Research analysis |
| Win rate on XAUUSD | Historical performance (backtest or study) | QuantAnalyzer, MT5 tester |
| False signal rate | How often the signal fires incorrectly | Statistical analysis |
| Lag characteristics | How many bars delayed vs. price action | Indicator math |
| Regime dependency | When it works vs. when it fails | Regime overlay analysis |
XAUUSD Indicator Reference (Current Market Context ~$5,100/oz):
| Indicator | Typical Parameters | Current Value (02/2026) | Signal Interpretation |
|---|---|---|---|
| RSI(14) | Period 14, OB 70, OS 30 | 60.81 | Neutral-bullish |
| MACD | 12, 26, 9 | +2.23 | Bullish momentum |
| Bollinger Bands | 20, 2.0 | -- | Trend extension |
| SMA 20/50/200 | -- | 5014/4711/3923 | All bullish aligned |
| ATR(14) H1 | Period 14 | ~$8.50 | Standard volatility |
| ADX(14) | Period 14 | 28.95 | Moderate trend strength |
| StochRSI | 14, 14, 3, 3 | 87 | Overbought short-term |
| Williams %R | 14 | -17.6 | Overbought |
| Ichimoku | 9, 26, 52 | Price above cloud | Bullish |
3.2 Macro Factor Analysis
Key Relationships for XAUUSD:
| Factor | Correlation | Coefficient | Impact Magnitude |
|---|---|---|---|
| Real interest rates (TIPS 10Y) | Inverse | -0.82 | Each 1% drop = ~$400/oz |
| USD Index (DXY) | Inverse | -0.45 to -0.70 | DXY -1pt = +$15-40/oz |
| CPI (vs expectations) | Direct (complex) | +0.3 to +0.6 | +0.1% surprise = +$10-30/oz |
| Central bank buying | Direct (structural) | Strong | 1000+ tons/year = price floor |
| US national debt/GDP | Direct | +0.62 to +0.68 | Structural long-term support |
| VIX | Direct (crisis) | Conditional | VIX > 35 = gold +$50-200 |
Event Impact Reference:
| Event | Typical Impact | Timeframe |
|---|---|---|
| FOMC rate cut (expected) | +$20-50/oz | 1-3 days |
| FOMC surprise cut | +$50-150/oz | 1-2 weeks |
| NFP weak print | +$30-70/oz | 1-3 days |
| CPI hot print | +$10-30/oz | 1-2 days |
| Geopolitical shock | +7-10% initial spike | 1-4 weeks |
| Tariff escalation | +$50-200/oz | Weeks to months |
3.3 Regime Classification
Every strategy must define its operating regime:
Regime Detection Framework for XAUUSD:
TRENDING (Directional):
Conditions: ADX > 25, price consistently above/below EMA50,
MA alignment (20 > 50 > 200 for uptrend)
Characteristics: Pullbacks to EMA 20/50 are buying opportunities
Best strategies: Trend-follow, breakout
XAUUSD frequency: ~45-55% of time (2024-2026 dominated by uptrend)
RANGING (Consolidation):
Conditions: ADX < 20, price oscillating around EMA50,
Bollinger Band width contracting
Characteristics: Support/resistance reversals are profitable
Best strategies: Mean-reversion, grid
XAUUSD frequency: ~25-35% of time
VOLATILE (Expansion):
Conditions: ATR > 1.5x 20-period average, wide daily ranges,
VIX > 25 or major news event
Characteristics: Large directional moves, wider stops needed
Best strategies: Breakout with momentum confirmation
XAUUSD frequency: ~15-25% of time (increasing since 2024)
NEWS-DRIVEN (Event):
Conditions: Within 30min of high-impact event (FOMC, NFP, CPI),
spread widening > 2x normal
Characteristics: Whipsaw risk high, directional bias after initial reaction
Best strategies: News-trading or complete avoidance (filter)
XAUUSD frequency: ~5-10% of trading hours3.4 Seasonal and Cyclical Analysis
XAUUSD Seasonal Patterns (Historical Average):
| Period | Performance | Driver |
|---|---|---|
| Mid-Dec to Mid-Apr | +9% to +11% | Lunar New Year demand, Indian wedding season, portfolio rebalancing |
| Early Jul to Early Sep | +6% to +8% | Late summer rally, pre-autumn positioning |
| Mid-Apr to Early Jul | -5% to -7% | Post-Q1 rebalancing, quiet macro period |
| September | -2% to -3% | Weakest month historically |
Intraday Patterns (GMT+7):
| Session | Typical Behavior | Avg Range |
|---|---|---|
| Asian (06:00-15:00) | Low volatility, consolidation | $8-15 |
| London (14:00-23:00) | Breakout from Asian range, trend initiation | $20-35 |
| NY (20:00-05:00) | Continuation or reversal, highest volume | $25-45 |
| London-NY Overlap (20:00-23:00) | Peak volatility, strongest moves | $15-25 per hour |
3.5 Cross-Asset Correlation Analysis
| Asset Pair | Current Correlation | Trading Implication |
|---|---|---|
| XAUUSD vs DXY | -0.45 to -0.70 (weakening) | Gold becoming more independent; DXY filter less reliable than pre-2022 |
| XAUUSD vs XAGUSD | +0.70 to +0.90 | Avoid simultaneous positions (double exposure); silver can lead gold |
| XAUUSD vs US10Y | -0.76 | Rate expectations still matter but structural shift ongoing |
| XAUUSD vs S&P500 | Weak/variable | Decoupled in 2024-2026; both can rise simultaneously |
| XAUUSD vs VIX | Conditional (+0.3 to +0.8 in crisis) | VIX > 35 is gold-bullish catalyst |
| XAUUSD vs Crude Oil | Ratio 79:1 (gold dominant) | Oil spike = inflation = gold positive (indirect) |
| XAUUSD vs CNY/USD | Indirect | CNY weakness = PBOC gold buying signal |
Phase 4: Verify (Cross-Validation)
Before producing the hypothesis, validate findings:
Verification Checklist:
| Check | Method | Pass Criteria |
|---|---|---|
| Historical precedent | Find 3+ similar setups in 2020-2026 data | At least 60% produced expected outcome |
| Indicator robustness | Test with +/-20% parameter variation | Signal direction unchanged |
| Regime consistency | Overlay regime filter on historical signals | Strategy does not fire in wrong regime |
| Correlation stability | Check if cited correlations held in last 2 years | Correlation coefficient within 0.2 of cited value |
| Contradiction check | Compare bullish and bearish evidence | Net evidence clearly favors one direction |
| Edge case identification | List 3+ scenarios where strategy fails | Failure modes are manageable with filters |
| Spread impact | Account for gold spread in profit calculation | Spread cost < 20% of average profit per trade |
| Slippage consideration | Estimate slippage during target session | Slippage < 30% of SL distance |
Red Flags (Reject Hypothesis If Found):
- Strategy only works in one regime with no filter to detect regime change
- Win rate below 30% with R:R below 1:3 (negative expectancy)
- Requires spread below $0.15 (achievable on ECN brokers but not on standard accounts)
- Depends on exact tick-level execution (not achievable in live)
- Backfit to a single historical event with no generalization
- Contradicts established gold market structure without strong evidence
Phase 5: Report (Output Strategy Hypothesis)
Produce the structured Strategy Hypothesis document (see Output Contract section below).
Research Domains
Domain 1: Macro Factors
Interest Rates and Monetary Policy:
- Fed Funds Rate trajectory (currently 3.50-3.75%, cut cycle since mid-2024)
- Real interest rates (TIPS 10Y) -- primary gold driver, correlation -0.82
- Forward guidance from FOMC statements and Dot Plot
- Market expectations via CME FedWatch Tool and Fed Funds Futures
- Global central bank policy divergence (ECB, BOJ, BOE, PBOC)
USD Strength (DXY):
- DXY level and trend (currently ~98, weakening since late 2024)
- Interest rate differential between US and major currencies
- Trade balance dynamics
- Capital flow patterns
Inflation:
- CPI and Core CPI (monthly, ~2.7-2.9% YoY as of early 2026)
- PCE Price Index (Fed's preferred, Core PCE target 2%)
- Breakeven inflation rates (5Y, 10Y)
- Inflation expectations (Michigan Consumer Sentiment survey)
GDP and Growth:
- US GDP growth trajectory (slowing to ~1.4% Q4/2025)
- Leading Economic Indicators
- ISM PMI (Manufacturing and Services)
- Recession probability models
Domain 2: Geopolitical Risks
Active Conflicts and Tensions:
- Russia-Ukraine war (ongoing since 2022, structural gold support)
- Middle East tensions (Israel-Hamas, Iran escalation risk)
- US-China strategic competition (tech, trade, military)
- Taiwan Strait situation
Trade War and Tariffs:
- Trump 2.0 tariff regime (145% on China, broad tariffs)
- Goldman Sachs model: 1% increase in tariff revenue = +0.9% gold price
- Rare earth supply chain disruptions
- Retaliatory measures and escalation risk
De-dollarization:
- Central bank gold buying (3 consecutive years of 1000+ tons, 2022-2024)
- BRICS payment alternatives (BRICS Pay, CIPS)
- "Unit" project (BRICS currency backed 40% by gold)
- USD share in global reserves declining (currently ~58-59%)
Monitoring Indicators:
- Geopolitical Risk Index (GPR): > 150 = warning, > 200 = elevated
- Oil price spikes > 10%/week
- New sanctions announcements
- Military mobilization signals
Domain 3: Supply and Demand
Supply Side:
- Mine production: ~3,694 tons/year (2025), near peak production
- Recycled gold: ~1,404 tons/year (27-29% of total supply)
- AISC: $1,388/oz (Q2/2024) -- production cost floor
- Top producers: China (380t), Russia (310t), Australia (290t)
Demand Side:
- Jewelry: 1,542 tons (2025, declining 18% due to high prices)
- Investment (bars, coins, ETFs): 2,175 tons (2025, surging +84%)
- Central banks: 863 tons (2025, still elevated)
- Technology: 323 tons (stable, AI-driven semiconductor demand)
- ETF inflows: 801 tons (2025, second-best year ever)
Physical Market Signals:
- COMEX paper-to-physical ratio (~1:300)
- Registered inventory trends (declined 25% to 10.1M oz)
- Shanghai Gold Exchange (SGE) premium (12-13% over LBMA/COMEX)
- Physical delivery records (37,003 contracts in Dec 2025, 9.5x increase)
Domain 4: Technical Patterns
Support and Resistance (as of 02/2026, price ~$5,098):
- Resistance: 5,016-5,031 | 5,054-5,100 | 5,125 | 5,145 | 5,500+
- Support: 4,985-4,970 | 4,931-4,900 | 4,700 (MA50) | 4,413 (MA100) | 3,923 (MA200)
Moving Average Analysis:
- Price above ALL major MAs -- confirmed strong uptrend
- Distance from MA200: +30% -- extended, pullback risk elevated
- EMA 20/50 crossover: bullish alignment since Q3/2024
Positioning (COT Report 17/02/2026):
- Net Long: 159,915 contracts (declining from peak 251,238 in January)
- Smart money reducing long exposure -- bearish divergence with price
- Warning: divergence between positioning and price historically precedes corrections
Chart Patterns to Monitor:
- Ascending channel (primary trend structure since 2024)
- Potential rising wedge formation on weekly (bearish if confirmed)
- Fibonacci extensions from 2024 low ($2,037) to ATH ($5,111)
Domain 5: Seasonal and Cyclical
Annual Cycle:
- Strongest: Mid-December to Mid-April (+9-11%)
- Secondary strength: Early July to Early September (+6-8%)
- Weakest: Mid-April to Early July (-5-7%), September (-2-3%)
- Current position (February 2026): Within strongest seasonal window
Weekly Patterns:
- Monday: Range establishment, moderate volume
- Tuesday-Wednesday: Trend development, highest volume
- Thursday: Continuation or exhaustion
- Friday: Profit-taking risk, reduced afternoon volume
Cyclical Factors:
- Presidential cycle: Year 2 of Trump presidency, policy uncertainty supports gold
- Rate cycle: Mid-to-late easing cycle, historically peak gold performance
- Debt cycle: Accelerating US debt growth, structural gold tailwind
Domain 6: Cross-Asset Correlations
See Section 3.5 in the Workflow above for current correlation matrix.
Dynamic Correlation Monitoring:
- Correlation stability: Rolling 60-day correlation vs. 252-day correlation
- Regime breaks: When short-term correlation diverges > 0.3 from long-term
- Lead/lag relationships: DXY tends to lead gold by 1-3 days on macro events
- Silver/Gold ratio: Currently 57:1 (historical average ~65:1), silver catching up
Output Contract: Strategy Hypothesis Document
Format
Every Strategy Hypothesis must follow this exact structure. All fields are mandatory unless marked [OPTIONAL].
# Strategy Hypothesis: [NAME]
## Metadata
- **ID:** SH-[YYYYMMDD]-[NNN]
- **Date:** [ISO 8601]
- **Author:** strategy-researcher
- **Version:** 1.0
- **Status:** DRAFT | REVIEW | APPROVED | REJECTED
- **Asset:** XAUUSD
- **Timeframe:** [Primary signal TF]
- **Style:** [trend-follow | mean-reversion | breakout | grid | scalping | swing | news-trading]
- **Horizon:** [Scalp | Intraday | Swing | Position]
- **Regime:** [trending | ranging | volatile | news-driven | multi-regime]
## Premise
[1-3 sentences describing the core market observation or theory being tested.
Must be falsifiable.]
## Market Context
[Current market conditions that motivated this hypothesis.
Include relevant macro, technical, and sentiment factors.]
## Entry Conditions
### Long Entry
| # | Condition | Indicator/Data | Threshold | Timeframe | Required |
|---|-----------|---------------|-----------|-----------|----------|
| 1 | [Description] | [Indicator] | [Exact value] | [TF] | YES/NO |
| 2 | ... | ... | ... | ... | ... |
### Short Entry
| # | Condition | Indicator/Data | Threshold | Timeframe | Required |
|---|-----------|---------------|-----------|-----------|----------|
| 1 | [Description] | [Indicator] | [Exact value] | [TF] | YES/NO |
| 2 | ... | ... | ... | ... | ... |
**Entry Logic:** [ALL conditions required / ANY N of M conditions / Weighted score > X]
## Exit Conditions
### Take Profit
| Method | Value | Description |
|--------|-------|-------------|
| Fixed TP | [Price distance or pips] | [When to use] |
| Trailing | [ATR multiplier or method] | [Activation condition] |
| Partial | [% at each level] | [Scaling out plan] |
### Stop Loss
| Method | Value | Description |
|--------|-------|-------------|
| Initial SL | [ATR multiplier or fixed] | [Placement logic] |
| Break-even | [When to move to BE] | [Condition] |
| Time-based | [Max hold time] | [Exit if not in profit by X bars] |
### Other Exits
- [Signal reversal condition]
- [Regime change detection]
- [End of session exit]
## Filters
| Filter | Parameter | Value | Rationale |
|--------|-----------|-------|-----------|
| News | Avoid window | [Minutes before/after] | [Why] |
| Session | Active hours | [GMT+7 range] | [Why] |
| Spread | Max spread | [Points or $] | [Why] |
| Volatility | ATR range | [Min-Max] | [Why] |
| Trend | Higher TF alignment | [Condition] | [Why] |
| Day of week | Allowed days | [Mon-Fri subset] | [Why] |
| [OPTIONAL] COT | Net position threshold | [Value] | [Why] |
| [OPTIONAL] DXY | Correlation filter | [Condition] | [Why] |
## Risk Model
| Parameter | Value | Rationale |
|-----------|-------|-----------|
| Risk per trade | [%] | [Why this level] |
| Max daily loss | [%] | [Circuit breaker] |
| Max drawdown | [%] | [Strategy halt threshold] |
| Max concurrent positions | [N] | [Exposure limit] |
| Position sizing method | [Fixed lot / ATR-based / Kelly] | [Why] |
| Recovery factor target | [>2.0] | [Backtest acceptance criteria] |
## Expected Performance Metrics
| Metric | Target | Acceptable Range |
|--------|--------|-----------------|
| Win rate | [%] | [Min-Max %] |
| Average R:R | [Ratio] | [Min ratio] |
| Profit factor | [Value] | [>1.5] |
| Max drawdown | [%] | [Max acceptable] |
| Sharpe ratio | [Value] | [>1.0] |
| Trades per month | [N] | [Range] |
| Avg trade duration | [Bars/Hours] | [Range] |
## Historical Validation
### Supporting Evidence
| Date/Period | Setup | Outcome | Notes |
|------------|-------|---------|-------|
| [Date] | [Brief description] | [Win/Loss, R:R achieved] | [Key observation] |
| ... | ... | ... | ... |
### Counter-Evidence / Failure Cases
| Date/Period | Setup | Outcome | Lesson |
|------------|-------|---------|--------|
| [Date] | [Why it failed] | [Loss magnitude] | [What filter would prevent] |
| ... | ... | ... | ... |
## Regime Dependency
| Regime | Expected Behavior | Action |
|--------|------------------|--------|
| Trending | [How strategy performs] | [Trade / Avoid / Modify] |
| Ranging | [How strategy performs] | [Trade / Avoid / Modify] |
| Volatile | [How strategy performs] | [Trade / Avoid / Modify] |
| News-driven | [How strategy performs] | [Trade / Avoid / Modify] |
## Risks and Limitations
1. [Risk 1: Description and mitigation]
2. [Risk 2: Description and mitigation]
3. [Risk 3: Description and mitigation]
## Next Steps
- [ ] Forward to strategy-spec-risk for formal specification
- [ ] Backtest on MT5 with [date range]
- [ ] Walk-forward analysis with [window size]
- [ ] Monte Carlo simulation for robustnessJSON Output Format (Machine-Readable)
For programmatic consumption, the hypothesis can also be expressed as:
{
"hypothesis_id": "SH-20260222-001",
"metadata": {
"date": "2026-02-22",
"author": "strategy-researcher",
"version": "1.0",
"status": "DRAFT",
"asset": "XAUUSD",
"timeframe": "H1",
"style": "trend-follow",
"horizon": "swing",
"regime": "trending"
},
"premise": "Description of the core trading idea",
"entry_rules": {
"long": [
{
"condition": "Price above EMA 200",
"indicator": "EMA",
"params": {"period": 200},
"threshold": "price > ema_200",
"timeframe": "H4",
"required": true
}
],
"short": [],
"logic": "ALL"
},
"exit_rules": {
"take_profit": {
"method": "trailing",
"value": "1.5x ATR(14)",
"activation": "1.0x ATR in profit"
},
"stop_loss": {
"method": "atr_based",
"value": "2.0x ATR(14)",
"placement": "below swing low"
},
"time_exit": {
"max_bars": 48,
"condition": "if not in profit"
}
},
"filters": {
"news": {"avoid_minutes_before": 30, "avoid_minutes_after": 15, "impact_level": "high"},
"session": {"allowed": ["london", "new_york", "overlap"], "timezone": "GMT+7"},
"spread": {"max_points": 50, "max_dollars": 0.50},
"volatility": {"min_atr_h1": 5.0, "max_atr_h1": 25.0},
"trend": {"higher_tf": "H4", "condition": "price > ema_200"},
"day_of_week": {"allowed": [1, 2, 3, 4, 5], "excluded": []}
},
"risk_model": {
"risk_per_trade_percent": 1.0,
"max_daily_loss_percent": 5.0,
"max_drawdown_percent": 15.0,
"max_concurrent_positions": 2,
"position_sizing": "atr_based",
"recovery_factor_target": 2.0
},
"metrics_to_track": [
"win_rate",
"avg_rr_ratio",
"profit_factor",
"max_drawdown_percent",
"sharpe_ratio",
"trades_per_month",
"avg_trade_duration_bars",
"max_consecutive_losses",
"expectancy_per_trade",
"recovery_factor"
],
"expected_performance": {
"win_rate": {"target": 55, "min": 45, "max": 65},
"avg_rr": {"target": 1.8, "min": 1.5},
"profit_factor": {"target": 1.8, "min": 1.5},
"max_drawdown": {"target": 10, "max": 15},
"sharpe_ratio": {"target": 1.5, "min": 1.0},
"trades_per_month": {"target": 20, "range": [10, 40]}
},
"regime_dependency": {
"trending": {"performance": "optimal", "action": "trade"},
"ranging": {"performance": "poor", "action": "avoid"},
"volatile": {"performance": "mixed", "action": "modify_sl"},
"news_driven": {"performance": "unpredictable", "action": "filter_out"}
},
"validation": {
"supporting_examples": [],
"counter_examples": [],
"statistical_significance": null
}
}Integration with Performance Metrics Framework
33-Metric Trader Behavior and Performance Framework
Every Strategy Hypothesis should anticipate how the EA's trading behavior will be measured. The following 33 metrics are used to evaluate strategy quality during backtesting, optimization, and live monitoring.
Category 1: Profitability Metrics (8)
| # | Metric | Formula/Description | Target for XAUUSD |
|---|---|---|---|
| 1 | Net Profit | Total profit - Total loss | > 0 (positive expectancy) |
| 2 | Gross Profit | Sum of all winning trades | -- |
| 3 | Gross Loss | Sum of all losing trades | -- |
| 4 | Profit Factor | Gross Profit / Gross Loss | > 1.5 |
| 5 | Expected Payoff | Net Profit / Total Trades | > $5/trade (after spread) |
| 6 | Return on Investment (ROI) | Net Profit / Initial Capital | > 20%/year |
| 7 | Risk-Adjusted Return | ROI / Max Drawdown | > 2.0 |
| 8 | Monthly Return Consistency | StdDev of monthly returns | < 8% |
Category 2: Risk Metrics (8)
| # | Metric | Formula/Description | Target for XAUUSD |
|---|---|---|---|
| 9 | Max Drawdown (%) | Peak-to-trough equity decline | < 15% |
| 10 | Max Drawdown ($) | Absolute peak-to-trough | < 20% of initial capital (dollar-based limit; may differ from percentage-based due to position sizing) |
| 11 | Drawdown Duration | Bars/days to recover from max DD | < 30 trading days |
| 12 | Recovery Factor | Net Profit / Max Drawdown | > 2.0 |
| 13 | Sharpe Ratio | (Avg Return - Risk-Free) / StdDev | > 1.0 |
| 14 | Sortino Ratio | (Avg Return - Risk-Free) / Downside StdDev | > 1.5 |
| 15 | Calmar Ratio | Annual Return / Max Drawdown | > 1.0 |
| 16 | Value at Risk (95%) | Max daily loss at 95% confidence | < 3% of equity |
Category 3: Trade Quality Metrics (9)
| # | Metric | Formula/Description | Target for XAUUSD |
|---|---|---|---|
| 17 | Win Rate | Winning Trades / Total Trades | 45-65% (style dependent) |
| 18 | Average Win | Mean profit of winning trades | > 1.5x Average Loss |
| 19 | Average Loss | Mean loss of losing trades | Controlled by SL |
| 20 | Average R:R Achieved | Average Win / Average Loss | > 1.5 |
| 21 | Max Consecutive Wins | Longest winning streak | -- |
| 22 | Max Consecutive Losses | Longest losing streak | < 8 |
| 23 | Average Trade Duration | Mean holding time in bars | Style dependent |
| 24 | Trade Frequency | Trades per day/week/month | 10-40/month typical |
| 25 | Win/Loss Ratio by Session | Win rate segmented by session | London-NY overlap > others |
Category 4: Execution and Behavior Metrics (8)
| # | Metric | Formula/Description | Target for XAUUSD |
|---|---|---|---|
| 26 | Slippage Impact | Actual vs. intended fill price | < $0.30 average |
| 27 | Spread Cost Ratio | Total spread cost / Gross Profit | < 15% |
| 28 | Partial Close Efficiency | Profit captured by partial vs. full close | > 60% of full potential |
| 29 | Trailing Stop Efficiency | Profit captured vs. peak unrealized | > 70% |
| 30 | Filter Hit Rate | Trades avoided by filters / Total filter triggers | > 50% would have been losers |
| 31 | Regime Accuracy | Correct regime classification rate | > 70% |
| 32 | Signal-to-Noise Ratio | Profitable signals / Total signals | > Win Rate |
| 33 | Equity Curve Smoothness | R-squared of equity curve regression | > 0.85 |
Usage in Hypothesis:
- When defining expected performance, reference the specific metric numbers (e.g., "Target Metric #4 Profit Factor > 1.8")
- When designing exit rules, consider impact on Metrics #28-29 (partial close and trailing efficiency)
- When adding filters, anticipate impact on Metric #30 (filter hit rate)
- Regime definitions directly feed Metric #31 (regime accuracy)
Error Handling and Quality Standards
Input Validation
| Input | Validation Rule | Error Action |
|---|---|---|
| Timeframe | Must be valid MT5 timeframe (M1-MN1) | Default to H1, warn user |
| Style | Must be one of: trend-follow, mean-reversion, breakout, grid, scalping, swing, news-trading | Ask for clarification |
| Risk percent | Must be 0.1-5.0% | Clamp to range, warn if > 2% |
| Indicator period | Must be positive integer, reasonable for TF | Reject if period > 500 or < 1 |
| Session | Must be valid session name | Default to London-NY overlap |
Quality Gates
Gate 1: Completeness Check
- [ ] All mandatory fields in hypothesis template are filled
- [ ] At least 3 entry conditions defined
- [ ] At least 1 exit method beyond initial SL
- [ ] At least 3 filters defined (news, session, spread minimum)
- [ ] Risk model is complete with all 6 parameters
- [ ] Regime dependency table is filled for all 4 regimes
Gate 2: Consistency Check
- [ ] Entry conditions do not contradict each other
- [ ] SL distance is achievable given typical spread
- [ ] TP target is realistic given ATR and timeframe
- [ ] Win rate target is consistent with R:R target (positive expectancy)
- [ ] Filter windows do not eliminate > 70% of potential trading time
- [ ] Max concurrent positions align with risk per trade and max DD
Gate 3: XAUUSD Specificity Check
- [ ] ATR values are reasonable for gold ($5-25 on H1, $20-80 on D1)
- [ ] Spread threshold accounts for gold spreads ($0.20-$0.50 ECN normal, up to $0.80 on standard accounts)
- [ ] Session filter accounts for gold's session-dependent behavior
- [ ] Price levels are in the correct current range ($4,500-$5,500)
- [ ] Pip/point values use gold convention (0.01 = 1 point)
Gate 4: Backtest Readiness Check
- [ ] All conditions can be expressed as MQL5 code
- [ ] No subjective or visual-only patterns (e.g., "looks like a head and shoulders")
- [ ] All indicator parameters are specified numerically
- [ ] Time-based conditions use specific hours (not "morning" or "afternoon")
- [ ] Entry logic (ALL/ANY/weighted) is explicitly defined
Error Recovery
| Error Type | Detection | Recovery Action |
|---|---|---|
| Vague condition | Contains words: "might", "could", "sometimes", "usually" | Rephrase with exact threshold |
| Missing regime filter | Regime dependency table has "trade" for all regimes | Add at least one "avoid" regime |
| Unrealistic targets | Win rate > 80% or Profit Factor > 5.0 | Reduce to realistic range, add note |
| Over-optimization risk | More than 8 indicator parameters | Reduce to 5-6 core parameters |
| Contradictory logic | Long and short conditions can fire simultaneously | Add mutex logic or separate strategies |
| Insufficient edge | Expected payoff < 2x spread cost | Reject hypothesis, return to research |
Output Quality Scoring
Each hypothesis receives a quality score (0-100):
| Component | Weight | Scoring Criteria |
|---|---|---|
| Completeness | 25% | All fields filled, no blanks |
| Precision | 25% | All conditions are numerical, no vague terms |
| Evidence | 20% | Historical examples provided, cross-validated |
| Risk coherence | 15% | Risk model internally consistent |
| Testability | 15% | Can be immediately translated to MQL5 |
Minimum acceptable score: 70/100 for DRAFT status, 85/100 for REVIEW status.
Reference: XAUUSD Quick Facts
Current Market Snapshot (February 2026):
- Price: ~$5,098/oz (near ATH of $5,111)
- YoY change: +74%
- Fed Funds Rate: 3.50-3.75%
- DXY: ~98 (weakening)
- VIX: Moderate
- Regime: Strong uptrend with elevated extension from MAs
- COT: Net long 159,915 (declining from peak -- divergence warning)
- Seasonal: Within strongest seasonal window (Dec-Apr)
Gold Trading Constants:
- Point value: 1 standard lot (100 oz) = $1 per $0.01 move = $100 per $1.00 move
- Typical H1 ATR: $8-12 (normal), $15-25 (volatile)
- Typical D1 range: $30-60 (normal), $80-150 (event day)
- Normal spread: $0.20-$0.50 (20-50 points)
- News spread: $0.50-$2.00+ (50-200+ points)
- LBMA Fix times: AM 17:30 GMT+7, PM 22:00 GMT+7
- Major sessions (GMT+7): London 14:00-23:00, NY 20:00-05:00, Overlap 20:00-23:00
Key Data Sources:
- Federal Reserve (FRED): fred.stlouisfed.org
- World Gold Council: gold.org/goldhub
- CFTC COT Reports: cftc.gov
- CME FedWatch: cmegroup.com
- Geopolitical Risk Index: matteoiacoviello.com/gpr.htm
- TradingView: tradingview.com
- IMF COFER: data.imf.org
<!-- STATIC CONTEXT BLOCK END --> <!-- Cache boundary: content above is stable across sessions --> <!-- Content below is dynamic and changes per invocation -->
Dynamic Execution Zone
This section is populated at runtime with session-specific context:
- Current query/task: Injected by the orchestrator when invoking this skill
- Live market data: Fetched on demand during Phase 3 (Act) execution
- Session state: Intermediate findings, partial hypotheses, and verification results
- Cross-agent handoff data: Outputs from upstream agents (e.g., macro scanner, regime classifier)
Note: Content in this zone is ephemeral and not cached between sessions.
Inputs & Assumptions
Default Assumptions (unless overridden by user or upstream agent):
- Broker type: ECN (spread $0.20-$0.50 baseline)
- Execution model: Market execution with typical slippage < $0.30
- Account leverage: 1:100 (standard for XAUUSD retail)
- Base currency: USD
- Data feed: MT5 broker feed (not tick-by-tick exchange data)
- Backtest engine: MT5 Strategy Tester (OHLC or tick-based depending on timeframe)
- Risk-free rate: Current US 3-month T-bill (~4.2% as of 02/2026) for Sharpe/Sortino calculations
- Commission model: ECN commission included in spread or $7/lot round-trip
Required Inputs Per Invocation:
| Input | Source | Fallback |
|---|---|---|
| User query or strategy idea | User prompt | None (must be provided) |
| Target timeframe | User or orchestrator | H1 (default) |
| Risk profile | User or strategy-spec-risk | Standard (1% per trade) |
| Current market regime | Regime classifier agent or manual | Auto-detect via ADX/ATR |
| Broker constraints | User or account config | ECN defaults above |


