diff --git a/prompts/adaptive.txt b/prompts/adaptive.txt index 4f0e0067..20eb03df 100644 --- a/prompts/adaptive.txt +++ b/prompts/adaptive.txt @@ -139,6 +139,24 @@ - `partial_close` 用于锁定阶段性收益或降低风险,建议使用清晰比例(如 25% / 50% / 75%),并说明目的(例:"锁定关键阻力前利润""减半仓等待回踩确认")。 - 执行部分平仓后,应评估是否需要同步上调止损 / 下调止盈,确保剩余仓位符合新的风险回报结构。 - `update_stop_loss` / `update_take_profit` 优先用于顺势推进(如跟踪新高新低),避免在无新证据下放宽止损。 + +## ⚠️ 止损方向逻辑(关键规则) + +**多单 (Long Position):** +- 止损价格必须 **低于** 入场价格(`stop_loss < entry_price`) +- 原因:保护下跌风险,价格跌破止损时自动平仓 +- 示例:入场 $100,止损 $95(亏损 5%) + +**空单 (Short Position):** +- 止损价格必须 **高于** 入场价格(`stop_loss > entry_price`) +- 原因:保护上涨风险,价格涨破止损时自动平仓 +- 示例:入场 $100,止损 $105(亏损 5%) + +**常见错误(务必避免):** +- ❌ 空单设置 `stop_loss < entry_price`(错误!会导致验证失败) +- ❌ 多单设置 `stop_loss > entry_price`(错误!会导致无保护) +- ✅ 使用 `update_stop_loss` 调整时,同样遵循上述方向规则 + - 若计划分批退出,请在 `reasoning` 中描述剩余仓位的策略与失效条件,避免出现"减仓后不知道如何处理剩余部位"的情况。 --- diff --git a/prompts/nof1.txt b/prompts/nof1.txt index 055fdb84..921aa080 100644 --- a/prompts/nof1.txt +++ b/prompts/nof1.txt @@ -72,6 +72,31 @@ You can issue the following actions each decision cycle: - ✅ Locking in profits as position moves in your favor - ❌ NOT for widening stops without new evidence (don't move stops against you) +## ⚠️ Stop-Loss Direction Logic (Critical Rule) + +**Long Position:** +- Stop-loss MUST be **below** entry price (`stop_loss < entry_price`) +- Reason: Protects against downside risk, exits when price drops below threshold +- Example: Entry $100, stop-loss $95 (5% loss protection) + +**Short Position:** +- Stop-loss MUST be **above** entry price (`stop_loss > entry_price`) +- Reason: Protects against upside risk, exits when price rises above threshold +- Example: Entry $100, stop-loss $105 (5% loss protection) + +**Common Mistakes (Must Avoid):** +- ❌ Short position with `stop_loss < entry_price` (WRONG! Causes validation failure) +- ❌ Long position with `stop_loss > entry_price` (WRONG! No protection) +- ✅ When using `update_stop_loss`, follow the same directional rules above + +**Real Example from Error Log:** +``` +Position: SHORT BTCUSDT at $108,230 +AI attempted: stop_loss = $107,500 (WRONG! Below entry) +Correct: stop_loss should be > $108,230 (e.g., $109,000) +Error: "空单止损必须高于当前价格" +``` + ## Multi-Stage Exit Strategy When planning phased exits (partial closes):