| | |
| | | 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( |
| | |
| | | |
| | | # 设置收盘价 |
| | | import decimal |
| | | |
| | |
| | | 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): |
| | |
| | | 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天的最大量与最近的量 |
| | | # 获取最近一次涨停/涨停下一个交易日的最大值 |
| | |
| | | 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") |
| | | |