fix: 修正突破加仓当前价与突破价的几何校验
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -266,13 +266,13 @@ def validate_roll_geometry(
|
||||
if direction == "long":
|
||||
if sl >= bp:
|
||||
return "做多:止损须低于突破价"
|
||||
if mark_price is not None and float(mark_price) <= bp:
|
||||
return "做多:当前价须高于突破价(等待向上突破)"
|
||||
if mark_price is not None and float(mark_price) >= bp:
|
||||
return "做多:当前价须低于突破价(等待向上突破)"
|
||||
else:
|
||||
if sl <= bp:
|
||||
return "做空:止损须高于突破价"
|
||||
if mark_price is not None and float(mark_price) >= bp:
|
||||
return "做空:当前价须低于突破价(等待向下突破)"
|
||||
if mark_price is not None and float(mark_price) <= bp:
|
||||
return "做空:当前价须高于突破价(等待向下跌破)"
|
||||
else:
|
||||
return "加仓方式无效"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user