Crypto Self-Learning 🧠
AI-powered self-improvement system for crypto trading. Learn from every trade to increase accuracy over time.
🎯 Core Concept
Every trade is a lesson. This skill:
- 1. Logs every trade with full context
- Analyzes patterns in wins vs losses
- Generates rules from real data
- Updates memory automatically
📝 Log a Trade
After EVERY trade (win or loss), log it:
CODEBLOCK0
Required Fields:
| Field | Description | Example |
|---|
| INLINECODE0 | Trading pair | BTCUSDT |
| INLINECODE1 |
LONG or SHORT | LONG |
|
--entry | Entry price | 78000 |
|
--exit | Exit price | 79500 |
|
--pnl_percent | Profit/Loss % | 1.92 or -2.5 |
|
--result | WIN or LOSS | WIN |
Optional but Recommended:
| Field | Description |
|---|
| INLINECODE6 | Leverage used |
| INLINECODE7 |
Why you entered |
|
--indicators | JSON with indicators at entry |
|
--market_context | JSON with macro conditions |
|
--notes | Post-trade observations |
📊 Analyze Performance
Run analysis to discover patterns:
CODEBLOCK1
Outputs:
- - Win rate by direction (LONG vs SHORT)
- Win rate by day of week
- Win rate by RSI ranges
- Win rate by leverage
- Best/worst setups identified
- Suggested rules
Analyze Specific Filters:
CODEBLOCK2
🧠 Generate Rules
Extract actionable rules from your trade history:
CODEBLOCK3
This analyzes patterns and outputs rules like:
CODEBLOCK4
📈 Auto-Update Memory
Apply learned rules to agent memory:
CODEBLOCK5
This appends a "## 🧠 Learned Rules" section with data-driven insights.
Dry Run (preview changes):
CODEBLOCK6
📋 View Trade History
CODEBLOCK7
🔄 Weekly Review
Run weekly to see progress:
CODEBLOCK8
Generates:
- - This week's performance vs last week
- New patterns discovered
- Rules that worked/failed
- Recommendations for next week
📁 Data Storage
Trades are stored in {baseDir}/data/trades.json:
CODEBLOCK9
🎯 Best Practices
- 1. Log EVERY trade - Wins AND losses
- Be honest - Don't skip bad trades
- Add context - More data = better patterns
- Review weekly - Patterns emerge over time
- Trust the data - If data says avoid something, AVOID IT
🔗 Integration with tess-cripto
Add to tess-cripto's workflow:
- 1. Before trade: Check rules in MEMORY.md
- After trade: Log with full context
- Weekly: Run analysis and update memory
Skill by Total Easy Software - Learn from every trade 🧠📈
加密货币自我学习 🧠
基于AI的加密货币交易自我改进系统。从每笔交易中学习,逐步提高准确率。
🎯 核心理念
每笔交易都是一堂课。此技能能够:
- 1. 记录 每笔交易的完整上下文
- 分析 盈利与亏损的模式
- 生成 基于真实数据的规则
- 自动更新 记忆库
📝 记录交易
每笔交易(无论盈亏)后,请记录:
bash
python3 {baseDir}/scripts/log_trade.py \
--symbol BTCUSDT \
--direction LONG \
--entry 78000 \
--exit 79500 \
--pnl_percent 1.92 \
--leverage 5 \
--reason RSI超卖 + 支撑位反弹 \
--indicators {rsi: 28, macd: bullishcross, maposition: above_50} \
--marketcontext {btctrend: up, dxy: 104.5, russell: up, day: tuesday, hour: 14} \
--result WIN \
--notes 清晰的设置,按计划执行
必填字段:
| 字段 | 描述 | 示例 |
|---|
| --symbol | 交易对 | BTCUSDT |
| --direction |
做多或做空 | LONG |
| --entry | 入场价格 | 78000 |
| --exit | 出场价格 | 79500 |
| --pnl_percent | 盈亏百分比 | 1.92 或 -2.5 |
| --result | 盈利或亏损 | WIN |
推荐但非必填字段:
| 字段 | 描述 |
|---|
| --leverage | 使用的杠杆倍数 |
| --reason |
入场原因 |
| --indicators | 入场时的指标JSON数据 |
| --market_context | 宏观市场条件JSON数据 |
| --notes | 交易后观察记录 |
📊 分析表现
运行分析以发现模式:
bash
python3 {baseDir}/scripts/analyze.py
输出结果:
- - 按方向统计的胜率(做多 vs 做空)
- 按星期统计的胜率
- 按RSI区间统计的胜率
- 按杠杆倍数统计的胜率
- 最佳/最差交易策略识别
- 建议规则
按特定条件分析:
bash
python3 {baseDir}/scripts/analyze.py --symbol BTCUSDT
python3 {baseDir}/scripts/analyze.py --direction LONG
python3 {baseDir}/scripts/analyze.py --min-trades 10
🧠 生成规则
从你的交易历史中提取可执行的规则:
bash
python3 {baseDir}/scripts/generate_rules.py
此功能分析模式并输出类似规则:
🚫 避免:RSI > 70时做多(胜率:23%,样本数:13)
✅ 偏好:周一做空(胜率:78%,样本数:9)
⚠️ 谨慎:杠杆倍数 > 10x的交易(胜率:35%,样本数:20)
📈 自动更新记忆库
将学到的规则应用到代理记忆库:
bash
python3 {baseDir}/scripts/update_memory.py --memory-path /path/to/MEMORY.md
此操作会添加一个## 🧠 学到的规则部分,包含数据驱动的洞察。
预览模式(预览更改):
bash
python3 {baseDir}/scripts/update_memory.py --memory-path /path/to/MEMORY.md --dry-run
📋 查看交易历史
bash
python3 {baseDir}/scripts/log_trade.py --list
python3 {baseDir}/scripts/log_trade.py --list --last 10
python3 {baseDir}/scripts/log_trade.py --stats
🔄 每周回顾
每周运行以查看进展:
bash
python3 {baseDir}/scripts/weekly_review.py
生成内容:
- - 本周表现 vs 上周表现
- 新发现的模式
- 有效/失效的规则
- 下周建议
📁 数据存储
交易数据存储在 {baseDir}/data/trades.json:
json
{
trades: [
{
id: uuid,
timestamp: 2026-02-02T13:00:00Z,
symbol: BTCUSDT,
direction: LONG,
entry: 78000,
exit: 79500,
pnl_percent: 1.92,
result: WIN,
indicators: {...},
market_context: {...}
}
]
}
🎯 最佳实践
- 1. 记录每笔交易 - 盈利和亏损都要记录
- 保持诚实 - 不要跳过亏损交易
- 添加上下文 - 数据越多,模式越清晰
- 每周回顾 - 模式会随时间显现
- 相信数据 - 如果数据显示要避免某事,那就避免
🔗 与tess-cripto集成
添加到tess-cripto的工作流程:
- 1. 交易前:检查MEMORY.md中的规则
- 交易后:记录完整上下文
- 每周:运行分析并更新记忆库
技能由Total Easy Software提供 - 从每笔交易中学习 🧠📈