优化完美代码,优化计算盈亏
This commit is contained in:
@@ -417,7 +417,11 @@ class BitmartFuturesTransaction:
|
||||
return None
|
||||
|
||||
def check_reversal(self, current_price, prev_kline, atr, third):
|
||||
"""反手信号(优先级 3),仅趋势模式。返回 (reverse_long/reverse_short, trigger_price) 或 None。"""
|
||||
"""
|
||||
反手信号(优先级 3),仅趋势模式。
|
||||
当前 K 线内任意时刻均可执行反手:用当前价与上一根 K 线价位比较,无需等 K 线收盘。
|
||||
返回 (reverse_long/reverse_short, trigger_price) 或 None。
|
||||
"""
|
||||
if self.mode != "TREND" or atr is None or atr <= 0:
|
||||
return None
|
||||
s = third['prev_struct']
|
||||
|
||||
Reference in New Issue
Block a user