Administrator
2024-07-11 18679202c88e959691a6f32a81a35707e75a0a47
取消首次涨停才买
2个文件已修改
8 ■■■■■ 已修改文件
test/test_trade_settings.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/buy_strategy.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
test/test_trade_settings.py
@@ -24,5 +24,6 @@
if __name__ == "__main__":
    test_want_buy()
    WantBuyCodesManager().is_in_cache("123230",1)
    # test_want_buy()
    RedisUtils.run_loop()
trade/buy_strategy.py
@@ -128,9 +128,10 @@
                            return False, STRATEGY_TYPE_LIMIT_UP, "开1"
                    else:
                        if self.__latest_trade_price_dict.get(
                                code) != limit_up_price and code not in self.__limit_up_record_codes:
                            # 初次涨停之前那一次不是涨停价
                                code) != limit_up_price:
                            # 不是首次涨停也返回
                            return True, STRATEGY_TYPE_LIMIT_UP, "涨停"
            finally:
                if is_limit_up:
                    # 加入涨停代码列表