refactor(prompts): unify action schema & optimize trading discipline

## Core Changes

### 1. adaptive.txt - Adopt v5.5.6.1 strict strategy
- Migrate from dual-strategy system to unified adaptive approach
- Maintain strict confidence threshold ≥85 (anti-overtrading)
- Remove complex market state detection, focus on signal quality
- Explicitly disable partial_close (full exit only)
- -160 lines (removed redundant strategy logic)

### 2. nof1.txt - Fix contradictions & align standards
-  Fix: Remove "NO partial exits" contradiction (now explicitly supported)
-  Unify: Change confidence threshold from 60 → 75
-  Unify: Change risk-reward ratio from 2:1 → 3:1
- Add confidence level guidance (75-85: good, 85-100: high)
- +85 lines (enhanced risk management framework)

### 3. default.txt - Add standardized output format
- Add structured thinking summary format
- Add comprehensive JSON schema documentation
- Add required fields rules for all action types
- +36 lines (improved contract clarity)

## Action Schema Migration

All prompts now use unified action naming:
-  open_long / open_short (was: buy_to_enter / sell_to_enter)
-  close_long / close_short (was: close)
-  update_stop_loss / update_take_profit (new)
-  partial_close (new, nof1 only)
-  hold / wait (unchanged)

## Confidence Scale Migration

-  Changed from 0-1 float to 0-100 integer across all prompts
-  Opening threshold: adaptive=85, nof1=75, default=75
-  Prevents overtrading through strict quality control

## Risk-Reward Standardization

-  Minimum RR ratio: 1:3 across all prompts
-  Replaces previous 1:2 requirement in nof1.txt

## Breaking Changes

- Backend must support new action names
- Confidence field now expects integer 0-100 (not float 0-1)
- partial_close action available in nof1.txt only

## Prompt Positioning

- **adaptive.txt**: Strict strategy (conf≥85, RR≥1:3, no partial exits)
- **nof1.txt**: English framework (conf≥75, RR≥1:3, supports partial_close)
- **default.txt**: Balanced CN strategy (conf≥75, RR≥1:3)

Related: feature/partial-close-dynamic-tpsl
This commit is contained in:
ZhouYongyou
2025-11-03 14:52:31 +08:00
parent c5516fc5fe
commit b3b68b2b62
3 changed files with 346 additions and 429 deletions

View File

@@ -106,6 +106,42 @@
3. 寻找新机会: 有强信号吗?多空机会?
4. 输出决策: 思维链分析 + JSON
# 输出要求(格式约定)
## 思维链首段
在给出 JSON 之前,请先输出简洁的状态摘要,便于审计:
```
market_state=trend|range
strategy=A|B|none
confidence=0-100
关键判断:[一句话总结这次决策]
```
## JSON 决策格式
```
{
"symbol": "BTCUSDT",
"action": "open_long|open_short|close_long|close_short|update_stop_loss|update_take_profit|partial_close|hold|wait",
"confidence": 0-100,
"position_size_usd": 0,
"leverage": 0,
"stop_loss": 0,
"take_profit": 0,
"new_stop_loss": 0,
"new_take_profit": 0,
"close_percentage": 0,
"risk_usd": 0,
"reasoning": "简洁说明:信号、技术位、风险控制"
}
```
### 必填规则
- **开仓** (`open_long/open_short`):必须填写 `position_size_usd`、`leverage`、`stop_loss`、`take_profit`、`risk_usd``reasoning` 写出信号与风险回报。
- **平仓** (`close_long/close_short`)`reasoning` 说明平仓原因(达到目标、触发失效条件等)。
- **动态调整** (`update_stop_loss` / `update_take_profit`):相应填写 `new_stop_loss` 或 `new_take_profit`。
- **部分平仓** (`partial_close`):需填写 `close_percentage`1-100说明目的如锁定利润
- **观望或持有** (`wait/hold`)`reasoning` 必须说明观望或继续持有的原因(例如信号不足、冷却中、趋势未变)。
---
记住: