| | |
| | | if sv.六个交易日涨幅过高: |
| | | return False, f"6个交易日涨幅过高" |
| | | |
| | | if sv.日三板个数_10 >= 1: |
| | | return False, f"10个交易日有>=3连板" |
| | | |
| | | if sv.涨得高未放量: |
| | | return False, f"涨得高未放量" |
| | | |
| | | # if sv.当前价 > sv.昨日最低价 * 1.1: |
| | | # return False, f"买入时的价格必须≤昨日最低价*110%" |
| | | |
| | |
| | | # 目标票板块涨停个数>=2 |
| | | |
| | | # 板块只能买入一个代码 |
| | | # if sv.板块成交代码: |
| | | # can_buy_plates -= set(sv.板块成交代码.keys()) |
| | | if sv.板块成交代码: |
| | | can_buy_plates -= set(sv.板块成交代码.keys()) |
| | | |
| | | if not can_buy_plates: |
| | | return False, f"没有涨停的板块: {[(plate, sv.开盘啦最正板块涨停.get(plate)) for plate in sv.代码板块 if sv.开盘啦最正板块涨停]} 连续老题材:{sv.连续老题材}" |
| | |
| | | if sv.今日大单数据: |
| | | # print(sv.今日大单数据[-1][3], format_time(sv.今日大单数据[-1][3])) |
| | | # filter_orders = [(o[0], o[2]) for o in sv.今日大单数据 if format_time(o[3]) >= sv.今日量够信息[0]] |
| | | filter_orders = [(o[0], o[2]) for o in sv.今日大单数据 if o[2] >= 200e4] |
| | | filter_orders = [(o[0], o[2]) for o in sv.今日大单数据] |
| | | filter_orders.reverse() |
| | | orderids = set() |
| | | for o in filter_orders: |
| | |
| | | continue |
| | | orderids.add(o[0]) |
| | | big_order_money += o[1] |
| | | big_sell_order_money = 0 |
| | | if sv.今日卖大单数据: |
| | | filter_orders = [(o[0], o[2]) for o in sv.今日卖大单数据 if o[2] >= 200e4] |
| | | filter_orders.reverse() |
| | | orderids = set() |
| | | for o in filter_orders: |
| | | if o[0] in orderids: |
| | | continue |
| | | orderids.add(o[0]) |
| | | big_sell_order_money += o[1] |
| | | |
| | | threshold_money = max(sv.自由流通市值 // 1000, 200e4) |
| | | threshold_money = max(1.5 * sv.自由流通市值 // 1000, 200e4) |
| | | |
| | | limit_up_codes_count = max([(p, len(sv.开盘啦最正板块涨停.get(p, []))) for p in can_buy_plates], key=lambda x: x[1])[1] |
| | | |
| | | # threshold_money *= max(min(10 - limit_up_codes_count + 1, 10), 5) / 10 |
| | | threshold_money *= 0.5 |
| | | # threshold_money *= max(10 - limit_up_codes_count + 3, 5) / 10 |
| | | if big_order_money < threshold_money: |
| | | return False, f"({big_order_money}/{threshold_money})大单金额不足" |
| | | |
| | | # print(target_code, sv.自由流通市值, threshold_money, limit_up_codes_count) |
| | | big_sell_order_money = 0 |
| | | |
| | | # threshold_money = 200e4 # int(sv.昨日成交量 * 0.2 * sv.今日涨停价 * 0.05) |
| | | if big_order_money < threshold_money: |
| | | return False, f"({round(big_order_money / 1e4, 2)}万/{round(threshold_money / 1e4, 2)}万)大单金额不足" |
| | | |
| | | final_big_order_money = big_order_money - big_sell_order_money |
| | | |
| | | if final_big_order_money < threshold_money: |
| | | return False, f"({round(final_big_order_money / 1e4, 2)}万/{round(threshold_money / 1e4, 2)}万)大单金额不足" |
| | | |
| | | return True, f" \n\t大单信息:{round(final_big_order_money / 1e4, 2)}万(买:{round(big_order_money / 1e4, 2)}万 卖:{round(big_sell_order_money / 1e4, 2)}万)/{round(threshold_money / 1e4, 2)}万 \n\t量够信息:{sv.今日量够信息}\n\t今日最高价:{sv.今日最高价信息} \n\t5日最高价:{sv.日最高价_5}", f"\n\t板块信息:{[(p, sv.开盘啦最正板块涨停.get(p)) for p in can_buy_plates]}", can_buy_plates |
| | | return True, f" \n\t大单信息:{round(big_order_money / 1e4, 2)}万(买:{round(big_order_money / 1e4, 2)}万 卖:{round(big_sell_order_money / 1e4, 2)}万)/{round(threshold_money / 1e4, 2)}万 \n\t量够信息:{sv.今日量够信息}\n\t今日最高价:{sv.今日最高价信息} \n\t5日最高价:{sv.日最高价_5}", f"\n\t板块信息:{[(p, sv.开盘啦最正板块涨停.get(p)) for p in can_buy_plates]}", can_buy_plates |
| | | |
| | | |
| | | compute_result = can_buy() |