Administrator
2023-11-27 5f1dc8f96559c239e216f5129faeb1e228ebe7bb
bug修复
2个文件已修改
9 ■■■■■ 已修改文件
trade/huaxin/huaxin_trade_data_update.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/init_data_util.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/huaxin_trade_data_update.py
@@ -111,7 +111,7 @@
                            for d in datas:
                                limit_up_price = gpcode_manager.get_limit_up_price(d["securityID"])
                                if not limit_up_price:
                                    init_data_util.re_set_price_pre(d["securityID"])
                                    init_data_util.re_set_price_pre(d["securityID"], force=True)
                                if d["prePosition"] > 0:
                                    position_codes.add(d["securityID"])
                            queue_l1_r_strategy_w.put_nowait(
utils/init_data_util.py
@@ -1,4 +1,3 @@
# 设置收盘价
import decimal
@@ -7,9 +6,9 @@
from utils import tool
def re_set_price_pre(code):
def re_set_price_pre(code, force=False):
    codes = [code]
    re_set_price_pres(codes)
    re_set_price_pres(codes, force=force)
def re_set_price_pres(codes, force=False):
@@ -19,6 +18,7 @@
        symbol = symbol.split(".")[1]
        pre_close = tool.to_price(decimal.Decimal(str(item['pre_close'])))
        gpcode_manager.CodePrePriceManager.set_price_pre(symbol, pre_close, force)
# 获取近90天的最大量与最近的量
# 获取最近一次涨停/涨停下一个交易日的最大值
@@ -89,4 +89,3 @@
            return max_60_volume_info[0], max_60_volume_info[0], max_60_volume_info[1].strftime("%Y-%m-%d")
        else:
            return target_volume[0], target_volume[0], target_volume[1].strftime("%Y-%m-%d")