Files
nofx/prompts
ZhouYongyou 041d6d4048 fix(prompts): add explicit stop-loss direction logic for long/short positions
Address DaDaManMan's error where AI set stop-loss incorrectly for short position.

## Problem
AI attempted to set stop-loss at $107,500 for SHORT position at $108,230,
causing validation error: "空单止损必须高于当前价格"

Root cause: Prompts lacked explicit guidance on stop-loss direction logic.

## Solution

### adaptive.txt (Chinese):
- Add "止损方向逻辑" section with clear rules
- Long position: stop_loss < entry_price (protect downside)
- Short position: stop_loss > entry_price (protect upside)
- Include examples and common mistakes to avoid

### nof1.txt (English):
- Add "Stop-Loss Direction Logic" section
- Same directional rules with detailed explanations
- Include real error example from production logs
- Emphasize validation failures when rules are violated

## Impact
-  Prevents AI from setting illogical stop-loss prices
-  Reduces validation errors and failed trades
-  Provides clear examples with entry/stop-loss pairs
-  Addresses DaDaManMan's reported issue directly

## Files Changed
- prompts/adaptive.txt (+19 lines)
- prompts/nof1.txt (+25 lines)

Fixes: #272 (DaDaManMan's comment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 20:21:47 +08:00
..
2025-11-03 00:16:28 +08:00