Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

TradeMemory Protocol

v0.3.2

AI trading memory for MT5/forex traders. Record every trade, discover patterns, and get AI-powered reflections with automatic strategy adjustments. The only...

1· 441·0 current·0 all-time
bySean | Mnemox@zychenpeng
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (trading memory for MT5/forex) matches the provided artifacts: SKILL.md documents MT5 sync, local server, and AI reflections; scripts install the Python package and set up MT5 sync. Required binaries (python3, pip) are appropriate. Optional env vars (MT5 credentials, ANTHROPIC_API_KEY, TRADEMEMORY_API) all have clear, relevant purposes.
Instruction Scope
SKILL.md and the scripts instruct the agent to pip install the package, run a local server (python -m src.tradememory.server), and run a mt5_sync.py sync script that reads MT5 credentials from a local .env. The sync/test code prints local account info when connecting to MT5 (balance/account ID). The instructions do not contain hidden exfiltration paths, but they do guide the user to run a server and optional networked reflection calls (Anthropic) if configured — you should review the package's server/reflection implementation (installed from PyPI) before enabling external APIs.
Install Mechanism
Installation is via pip (tradememory-protocol from PyPI) and git clone from the linked GitHub repo — standard for Python projects. This requires downloading and executing code from external sources (PyPI/GitHub). This is expected for this type of skill, but it is a network install that should be reviewed (check the PyPI package contents and the GitHub repo) before running in a sensitive environment.
Credentials
No required environment variables are forced by the registry; SKILL.md documents several optional sensitive variables (MT5_LOGIN, MT5_PASSWORD, MT5_SERVER, ANTHROPIC_API_KEY, TRADEMEMORY_API). Each is justified by the functionality (MT5 sync, LLM reflections, custom API endpoint). They are optional and scoped to the project (.env). Note: enabling ANTHROPIC_API_KEY causes data to be sent to Anthropic (albeit described as anonymized).
Persistence & Privilege
The skill does not request always:true and does not attempt to modify other skills or system settings in the provided scripts. The installer and setup operate in the project directory and do not require elevated privileges. The agent-autonomy default is unchanged (disable-model-invocation:false), which is expected and not by itself a concern.
Assessment
This skill is coherent with its stated purpose, but take these precautions before installing or running it: 1) Review the tradememory-protocol package code (server/reflection logic) on PyPI/GitHub before pip installing and before running the server. 2) Only provide MT5 credentials if you understand they will be stored in a local .env file and used to connect to your MT5 terminal; the setup prints account info locally during verification. 3) Do not set ANTHROPIC_API_KEY unless you are willing to send (allegedly anonymized) trading-pattern data to Anthropic — audit what is sent. 4) Run installation and server in an isolated environment (virtualenv/container) and avoid running as root. 5) Note MT5 Python API usage is Windows-specific; on macOS/Linux you must use manual recording, the REST API, or your own sync script. Review the GitHub repo and package release provenance if you need higher assurance.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📊 Clawdis
OSLinux · macOS · Windows
Binspython3, pip
aivk973hahcwwewg5x445n1pqtpzd826hngforexvk973hahcwwewg5x445n1pqtpzd826hnglatestvk978njrwxwnwjmtkz4weta84ns826kmamcpvk973hahcwwewg5x445n1pqtpzd826hngmt5vk973hahcwwewg5x445n1pqtpzd826hngtradingvk973hahcwwewg5x445n1pqtpzd826hng
441downloads
1stars
3versions
Updated 11h ago
v0.3.2
MIT-0
Linux, macOS, Windows

TradeMemory Protocol

Give your AI agent persistent trading memory. TradeMemory records every trade decision, discovers patterns across sessions, uses AI to reflect on your trading behavior, and automatically adjusts risk recommendations. It works with MT5, Binance, Alpaca, or any platform that outputs trade data.

Built on MCP (Model Context Protocol). 203 tests passing. MIT licensed.

Installation

pip install tradememory-protocol

Verify installation:

python -c "import tradememory; print('TradeMemory ready')"

Setup for MT5 Users

If you trade on MetaTrader 5, TradeMemory can auto-sync your closed trades every 60 seconds — zero modifications to your EA.

# 1. Install MT5 Python API
pip install MetaTrader5 python-dotenv requests

# 2. Clone repo for sync scripts
git clone https://github.com/mnemox-ai/tradememory-protocol.git
cd tradememory-protocol

# 3. Configure credentials
cp .env.example .env
# Edit .env with your MT5 login, password, server

# 4. Start the TradeMemory server
python -m src.tradememory.server
# Runs on http://localhost:8000

# 5. Start MT5 sync (in a second terminal)
python scripts/mt5_sync.py
# Polls MT5 every 60 seconds for closed trades

See MT5_SYNC_SETUP.md for the full setup guide, auto-start configuration, and troubleshooting.

Security & Permissions

Network access during install: install.sh and setup_mt5.sh run pip install (downloads from PyPI) and git clone (downloads from GitHub). These are standard Python project install steps — review the scripts before running.

Network access at runtime: The TradeMemory server runs on localhost:8000 by default and does not make outbound network requests. If you set TRADEMEMORY_API to a remote URL, trade data will be sent to that endpoint — only do this with endpoints you control. If ANTHROPIC_API_KEY is set, the reflection engine sends anonymized trade patterns to the Claude API for analysis.

Environment variables: All environment variables are optional. MT5 credentials (MT5_LOGIN, MT5_PASSWORD, MT5_SERVER) are only needed for MT5 sync. They are stored in your local .env file and read by mt5_sync.py to connect to your MT5 terminal. They are not logged or sent to any external service.

File system access: TradeMemory writes to a single SQLite database file (tradememory.db) in the project directory. No files are created or modified outside the project.

No implicit permissions: This skill does not auto-install dependencies, modify system files, or require elevated privileges. All setup steps are explicit and user-initiated.

Available Commands

Tell your agent these things in natural language. TradeMemory will handle the rest.

Record a Trade

"Record my trade: XAUUSD long 0.05 lots, entry 2847, exit 2855, profit $40"

Calls store_trade_memory. Stores the trade in L1 (raw trade layer) with full context. You can add market conditions and reflections:

"Record my XAUUSD short trade, entry 5180, exit 5165, profit $75. London session breakout, high volume. I noticed the pullback confirmed before entry."

Check Performance

"Show my trading performance this week"

Calls get_strategy_performance. Returns per-strategy stats: win rate, profit factor, average winner/loser, max drawdown, best and worst trades.

"Compare my VolBreakout vs Pullback strategy performance"

Recall Past Trades

"Show my XAUUSD trades from last month"

Calls recall_similar_trades with symbol and date filter. Returns trades with their context, outcomes, and lessons.

"What were my last 5 losing trades? What went wrong?"

Run AI Reflection

"Run a reflection on my last 20 trades"

Calls the reflection engine to analyze patterns across your trades. Discovers session-based edges (London vs Asian), strategy performance gaps, confidence-outcome correlations, and drawdown sequences.

"What patterns have you found in my London session trades?"

Compare Time Periods

"How am I doing compared to last week?"

Calls get_strategy_performance for both periods and compares. Shows whether your win rate, profit factor, and risk management are improving or declining.

Deep-Dive a Specific Trade

"Tell me about trade MT5-2350547759"

Calls get_trade_reflection. Returns the full context: entry reasoning, market conditions, exit reasoning, P&L, lessons learned, and grade.

MCP Tools Reference

ToolPurpose
store_trade_memoryStore a trade decision with full context (symbol, direction, price, strategy, market context, reflection)
recall_similar_tradesFind past trades with similar market context for pattern matching
get_strategy_performanceAggregate stats per strategy: win rate, PnL, profit factor, best/worst trades
get_trade_reflectionDeep-dive into a specific trade's reasoning and lessons

3-Layer Memory Architecture

TradeMemory organizes your trading data into three layers:

L1 — Raw Trades (Hot) Every trade recorded with: symbol, direction, lot size, entry/exit price, P&L, timestamps, strategy name, confidence score, reasoning, market context, and post-trade reflection.

L2 — Discovered Patterns (Warm) The reflection engine runs daily and discovers patterns from L1 data:

  • Session performance (London 78% WR vs Asian 31% WR)
  • Strategy edges (VolBreakout PF 1.89 vs MeanReversion PF 0.72)
  • Confidence correlation (high confidence trades: 85% WR, low confidence: 20% WR)
  • Drawdown sequences and recovery patterns

L3 — Strategy Adjustments (Cold) Rule-based tuning generated from L2 patterns:

  • Disable losing strategies automatically
  • Increase lot size for proven edges
  • Restrict direction in trending markets
  • Adjust confidence thresholds based on historical correlation

Daily Reflection Setup

Set up a cron job so your agent sends you a daily trading summary:

# OpenClaw cron: run reflection every day at 23:55
openclaw cron add --name "Daily Trade Reflection" \
  --cron "55 23 * * *" \
  --session isolated \
  --message "Run a reflection on today's trades and send me a summary" \
  --announce

Weekly and monthly reflections are also supported:

# Weekly reflection (every Sunday at 23:55)
openclaw cron add --name "Weekly Trade Reflection" \
  --cron "55 23 * * 0" \
  --session isolated \
  --message "Run a weekly reflection on my trading performance and compare to last week" \
  --announce

# Monthly reflection (1st of each month at 00:00)
openclaw cron add --name "Monthly Trade Reflection" \
  --cron "0 0 1 * *" \
  --session isolated \
  --message "Run a monthly reflection on my trading. Summarize wins, losses, pattern changes, and strategy adjustments." \
  --announce

Note: Add --channel whatsapp or --channel slack to the --announce flag to route notifications to a specific channel. Channel availability depends on your OpenClaw configuration.

Hosted API (Coming Soon)

The current version runs locally on your machine. A hosted version at mcp.mnemox.ai is planned, which will include:

  • Cloud-based reflection engine (no local API key needed)
  • Cross-session pattern analysis with persistent storage
  • Multi-account monitoring (run multiple EAs, one memory)
  • Webhook alerts when the system detects behavioral drift

Free tier: local install (this version). Pro tier: hosted API with cloud reflections and multi-account support. Pricing TBD.

Environment Variables

VariableRequiredDescription
ANTHROPIC_API_KEYNoEnables LLM-powered reflections (Claude). Without it, reflections use rule-based analysis.
MT5_LOGINMT5 onlyMetaTrader 5 account number
MT5_PASSWORDMT5 onlyMetaTrader 5 password
MT5_SERVERMT5 onlyBroker server name (e.g. "ForexTimeFXTM-Demo01")
TRADEMEMORY_APINoAPI endpoint, defaults to http://localhost:8000
SYNC_INTERVALNoMT5 sync polling interval in seconds, defaults to 60

Links

Comments

Loading comments...