Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Institutional Desk-Level Fully Automated Trading OS for XAU/USD and XAG/USD. Event-driven, risk-first, multi-engine architecture that runs as a continuous analysis and execution pipeline inside OpenClaw's trader agent.
Institutional Desk-Level Fully Automated Trading OS for XAU/USD and XAG/USD. Event-driven, risk-first, multi-engine architecture that runs as a continuous analysis and execution pipeline inside OpenClaw's trader agent.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
An institutional-grade metals trading operating system for gold (XAU/USD) and silver (XAG/USD). This skill transforms the OpenClaw trader agent into a full prop-desk assistant with real-time analysis, automated execution, risk management, and performance tracking.
Use this skill when: Analyzing gold or silver market structure (ICT/SMC methodology) Generating trade signals with full entry/SL/TP plans Running automated or semi-automated trade execution via MT5 Monitoring real-time risk, drawdown, and position management Tracking trading performance (win rate, expectancy, Sharpe, drawdown) Getting session-aware, macro-aware trading intelligence
The system runs as a continuous event-driven pipeline: PRICE FEED โ SESSION ENGINE โ STRUCTURE ENGINE โ LIQUIDITY ENGINE โ MACRO ENGINE โ BIAS ENGINE โ VOLATILITY ENGINE โ RISK ENGINE โ EXECUTION ENGINE โ BROKER โ PERFORMANCE ENGINE โ DASHBOARD โ ALERTS All engines communicate through a central Event Bus (EventEmitter pattern). Every event is logged and can be monitored in real-time via WebSocket.
EnginePurposeKey OutputsStructure EngineDetects HH/HL/LH/LL, BOS, CHoCH, FVG, Order BlocksMarket structure, trend direction, structural shiftsLiquidity EngineFinds equal highs/lows, stop clusters, session levels, sweepsLiquidity pools, sweep confirmationsBias EngineMulti-timeframe directional bias with conviction scoringHTF bias, intraday bias, conviction 0-100, alignment scoreMacro EngineTracks DXY, US10Y yields, risk sentiment, news proximitymacro_bias (bullish/bearish/neutral gold), macro_risk levelVolatility EngineATR calculation, spike detection, regime classificationATR, volatility regime (low/normal/high/extreme)Risk EnginePosition sizing, drawdown monitoring, halt triggersLot size, risk %, pass/fail gate for every tradeExecution EngineCombines all engines to generate trade signalsFull trade plan: entry, SL, TP1/TP2/TP3, position sizePerformance EngineWin rate, expectancy, Sharpe, monthly breakdownComprehensive performance metrics and trade log
ModeNameBehavior1AdvisoryFull analysis pipeline runs, signals logged, no execution2Semi-AutomatedSignals generated + automatic TP/SL/trailing management3Fully-AutomatedAutonomous execution: signal โ order โ manage โ close4Risk-OffMonitoring only, no signals generated Set the mode in data/state.json or via WebSocket command. Always start in Mode 1 for validation.
These hard rules are enforced by the Risk Engine and cannot be overridden: Max 2% risk per trade โ Position sized via (Balance ร Risk%) / StopDistance Max 5% daily exposure โ Cumulative open risk capped 3 consecutive losses โ halt trading for the session Volatility spike โ reduce size 50% (extreme = 75% reduction) Spread widening โ block entry (symbol-specific thresholds) High-impact news < 20 minutes โ block all entries Equity drawdown > 8% โ halt trading until manual resume API error on order โ cancel, do NOT retry Broker disconnect โ close all positions immediately
TP1 at 1.5R โ Partial close 40% โ Move SL to break-even TP2 at 2.5R โ Partial close 30% โ Trail SL under structure TP3 at 4.0R โ Close remaining 30% โ Log trade to performance
For the Execution Engine to generate a signal, every condition must be true: Bias conviction โฅ 65/100 Alignment score โฅ 0.6 Liquidity sweep confirmed (aligned with direction) BOS or CHoCH confirmed in trade direction Session = London or New York (kill zones preferred) Macro risk = low or medium Spread within threshold No news block active Daily loss below 80% of limit Consecutive losses < 3
metals-desk-os/ โโโ SKILL.md # This file โโโ index.js # Main orchestrator & entry point โโโ package.json # npm dependencies โโโ skill.json # OpenClaw registration manifest โโโ manifest.json # Runtime configuration โโโ core/ # 8 trading engines โ โโโ structure-engine.js # HH/HL/LH/LL, BOS, CHoCH, FVG, OB โ โโโ liquidity-engine.js # Pools, sweeps, equal levels โ โโโ bias-engine.js # MTF bias, conviction scoring โ โโโ macro-engine.js # DXY, yields, sentiment, news โ โโโ volatility-engine.js # ATR, regime, spikes โ โโโ risk-engine.js # Position sizing, halts โ โโโ execution-engine.js # Signal generation โ โโโ performance-engine.js # Metrics tracking โโโ automation/ # System automation layer โ โโโ event-bus.js # Central event system โ โโโ price-feed.js # MT5/MetaAPI price data โ โโโ session-engine.js # London/NY/Asian sessions โ โโโ scheduler.js # Cron tasks โ โโโ news-monitor.js # Economic calendar โโโ broker/ # MT5 broker integration โ โโโ mt5-connector.js # Order execution via MetaAPI โ โโโ risk-guard.js # Position monitoring & trailing โ โโโ order-manager.js # Order lifecycle management โโโ dashboard/ # Real-time monitoring โ โโโ websocket-feed.js # WebSocket broadcaster (port 3078) โ โโโ desk-dashboard.json # Widget layout config โ โโโ metrics.json # Metrics template โโโ alerts/ # Notification channels โ โโโ whatsapp-alert.js # WhatsApp Business API โ โโโ telegram-alert.js # Telegram Bot โ โโโ risk-alert.js # Centralized dispatcher โโโ data/ # Persistent state files โ โโโ state.json # System mode & connections โ โโโ trade-log.json # Trade history โ โโโ performance.json # Performance metrics โ โโโ bias-memory.json # Bias state persistence โโโ prompts/ # AI agent prompts โโโ system.txt # Main system prompt โโโ intraday.txt # Intraday trading protocol โโโ swing.txt # Swing trading protocol โโโ execution.txt # Execution protocol
cp -r metals-desk-os/ ~/.openclaw/agents/trader/agent/metals-desk-os/ cd ~/.openclaw/agents/trader/agent/metals-desk-os/
npm install
Create a .env file in the skill root with the following variables: # MetaAPI / MT5 Connection METAAPI_TOKEN=your_metaapi_token_here MT5_ACCOUNT_ID=your_mt5_account_id_here # WhatsApp Business API (optional) WHATSAPP_API_URL=https://graph.facebook.com/v18.0/YOUR_PHONE_NUMBER_ID/messages WHATSAPP_TOKEN=your_whatsapp_token_here WHATSAPP_PHONE=your_phone_number_with_country_code # Telegram Bot (optional) TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here TELEGRAM_CHAT_ID=your_telegram_chat_id_here # News API (optional) NEWS_API_KEY= # AI Keys (optional, for enhanced analysis) OPENROUTER_API_KEY= ANTHROPIC_API_KEY= MetaAPI: Sign up at https://metaapi.cloud and connect your Fusion Markets MT5 account. Telegram: Create a bot via @BotFather, get chat ID from @userinfobot. WhatsApp: Configure via Meta Business API dashboard.
Edit data/state.json and set "mode": 1 (Advisory) to start safely.
# Direct node index.js # Or with PM2 for production pm2 start index.js --name metals-desk-os pm2 save pm2 startup
Connect any WebSocket client to ws://localhost:3078 to receive real-time JSON payloads containing: Live prices and spread statistics HTF and intraday bias with conviction scores Active positions with live P&L and R:R Liquidity map (equal highs/lows, sweep markers) Macro panel (DXY, yields, news countdown) Performance metrics (win rate, expectancy, drawdown, Sharpe) Risk status (halt state, daily P&L, exposure) Event log (all system events)
Trade opened: TRADE OPENED Pair: XAUUSD Direction: Long Entry: 5024.50 SL: 5010.00 TP1: 5046.25 Risk: 1.5% Session: London Conviction: 82/100 Risk halt: RISK HALT ACTIVATED Reason: 3 consecutive losses Trading paused for session
The Event Bus broadcasts these events that external systems can subscribe to: price.update โ New price tick with candle data structure.shift โ BOS or CHoCH detected liquidity.sweep โ Liquidity pool swept bias.update โ Bias recalculated bias.flip โ HTF bias direction changed execution.signal โ Valid trade signal generated risk.halt / risk.resume โ Trading halted or resumed order.filled / order.closed โ Order lifecycle events performance.update โ New trade recorded to performance macro.news.block โ News event blocking execution
Before moving beyond Mode 1: Price feed produces ticks (live or simulated) Structure engine detects swing points and BOS/CHoCH Liquidity engine identifies pools and sweeps Bias engine produces conviction scores > 0 Session engine correctly identifies current session Risk engine validates and rejects test scenarios Execution engine generates signals with full entry plans Alerts arrive on configured channels WebSocket feed broadcasts state updates Once all pass, move to Mode 2 (Semi-Auto) to test position management, then Mode 3 (Full-Auto) for live execution.
Workflow acceleration for inboxes, docs, calendars, planning, and execution loops.
Largest current source with strong distribution and engagement signals.