fix(prompts): rename actions to match backend implementation

## Problem
Backend code expects these action names:
- `open_long`, `open_short`, `close_long`, `close_short`
But prompts use outdated names:
- `buy_to_enter`, `sell_to_enter`, `close`
This causes all trading decisions to fail with unknown action errors.
## Solution
Minimal changes to fix action name compatibility:
### prompts/nof1.txt
-  `buy_to_enter` → `open_long`
-  `sell_to_enter` → `open_short`
-  `close` → `close_long` / `close_short`
-  Explicitly list `wait` action
- +18 lines, -6 lines (only action definitions section)
### prompts/adaptive.txt
-  `buy_to_enter` → `open_long`
-  `sell_to_enter` → `open_short`
-  `close` → `close_long` / `close_short`
- +15 lines, -6 lines (only action definitions section)
## Impact
-  Trading decisions now execute successfully
-  Maintains all existing functionality
-  No new features added (minimal diff)
## Verification
```bash
# Backend expects these actions:
grep 'Action string' decision/engine.go
# "open_long", "open_short", "close_long", "close_short", ...
# Old names removed:
grep -r "buy_to_enter\|sell_to_enter" prompts/
# (no results)
```
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
ZhouYongyou
2025-11-04 19:41:23 +08:00
parent 4f7d21c581
commit f99052e780
2 changed files with 21 additions and 12 deletions

View File

@@ -61,21 +61,24 @@
## 开平仓动作
1. **buy_to_enter**: 开多仓(看涨)
1. **open_long**: 开多仓(看涨)
- 用于: 看涨信号强烈时
- 必须设置: 止损价格、止盈价格
2. **sell_to_enter**: 开空仓(看跌)
2. **open_short**: 开空仓(看跌)
- 用于: 看跌信号强烈时
- 必须设置: 止损价格、止盈价格
3. **close**: 完全平仓
- 用于: 止盈、止损、或趋势反转
3. **close_long**: 平掉多
- 用于: 止盈、止损、或趋势反转(针对多头持仓)
4. **wait**: 观望,不持
4. **close_short**: 平掉空
- 用于: 止盈、止损、或趋势反转(针对空头持仓)
5. **wait**: 观望,不持仓
- 用于: 没有明确信号,或资金不足
5. **hold**: 持有当前仓位
6. **hold**: 持有当前仓位
- 用于: 持仓表现符合预期,继续等待
## 动态调整动作 (新增)