feat(trader): 优化验证AI结果有效性的逻辑 #548
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description | 描述
优化validateDecision的逻辑
🎯 Type of Change | 变更类型
🔗 Related Issues | 相关 Issue
无
📋 Changes Made | 具体变更
优化validateDecision的逻辑:
(1) 计算真实的盈亏比;
(2) 根据实时可用余额判断ai决策的仓位是否过大;
(3) 即使ai给的部分decision不满足条件,其余满足条件的decision依然生效;
(4) 优化log打印.
🧪 Testing | 测试
Test details | 测试详情:
无
✅ Checklist | 检查清单
Code Quality | 代码质量
Documentation | 文档
Git
devbranch | 已 rebase 到最新dev分支🔒 Security (if applicable) | 安全(如适用)
📚 Additional Notes | 补充说明
无
By submitting this PR, I confirm | 提交此 PR,我确认: