Administrator
2023-12-22 f382c518b7605f220a018452239f207cc8595bdb
bug修复
2个文件已修改
6 ■■■■■ 已修改文件
code_attribute/code_nature_analyse.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/sell_util.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
code_attribute/code_nature_analyse.py
@@ -481,7 +481,7 @@
def __is_latest_open_limit_up_or_limit_down(datas, day_count):
    datas = copy.deepcopy(datas)
    datas.sort(key=lambda x: x["bob"])
    items = datas[0-day_count]
    items = datas[0-day_count:]
    for item in items:
        limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(item["pre_close"]))
        if abs(limit_up_price - item["high"]) < 0.001 and abs(limit_up_price - item["close"]) > 0.001:
utils/sell_util.py
@@ -5,12 +5,14 @@
from utils import tool
def get_sell_price(price_type,limit_up_price,limit_down_price, current_price):
def get_sell_price(price_type, limit_up_price, limit_down_price, current_price):
    price = None
    if price_type == 0:
        if not current_price:
            raise Exception("没有获取到L1现价")
        price = tool.get_buy_min_price(current_price)
        if limit_down_price and price > round(float(limit_down_price), 2):
            price = round(float(limit_down_price), 2)
    elif price_type == 1:
        if not limit_down_price:
            raise Exception("没有获取到跌停价")