diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..e709523 Binary files /dev/null and b/.DS_Store differ diff --git a/1111 b/1111 index 27753f9..d61f410 100644 --- a/1111 +++ b/1111 @@ -45,3 +45,8 @@ bitmart\框架.py 读取这个代码文件夹 2574 + +2137 +167 + + diff --git a/bitmart/交易.py b/bitmart/交易.py index 12dc973..29eb1d0 100644 --- a/bitmart/交易.py +++ b/bitmart/交易.py @@ -30,7 +30,6 @@ class BitmartFuturesTransaction: # 反手频率控制 self.reverse_cooldown_seconds = 1.5 * 60 # 反手冷却时间(秒) - self.reverse_min_move_pct = 0.05 # 反手最小价差过滤(百分比) self.last_reverse_time = None # 上次反手时间 # 开仓频率控制 @@ -381,19 +380,13 @@ class BitmartFuturesTransaction: return True def can_reverse(self, current_price, trigger_price): - """反手前过滤:冷却时间 + 最小价差""" + """反手前过滤:冷却时间""" now = time.time() if self.last_reverse_time and now - self.last_reverse_time < self.reverse_cooldown_seconds: remain = self.reverse_cooldown_seconds - (now - self.last_reverse_time) logger.info(f"反手冷却中,剩余 {remain:.0f} 秒") return False - if trigger_price and trigger_price > 0: - move_pct = abs(current_price - trigger_price) / trigger_price * 100 - if move_pct < self.reverse_min_move_pct: - logger.info(f"反手价差不足: {move_pct:.4f}% < {self.reverse_min_move_pct}%") - return False - return True def verify_no_position(self, max_retries=5, retry_interval=3): @@ -604,7 +597,7 @@ class BitmartFuturesTransaction: # 4. 检查信号 signal = self.check_signal(current_price, prev_kline, current_kline) - # 5. 反手过滤:冷却时间 + 最小价差 + # 5. 反手过滤:冷却时间 if signal and signal[0].startswith('reverse_'): if not self.can_reverse(current_price, signal[1]): signal = None