| | |
| | | if last_price != 0: |
| | | growth = (price - last_price) / last_price * 100 # 计算涨幅百分比 |
| | | return growth |
| | | |
| | | finally: |
| | | history_price[symbol] = price |
| | | # print(f"price======={price}") |
| | |
| | | frying_plate_day_min_index = next((i for i, d in enumerate(k_line_data[0:7]) if 'attribute' in d and d['attribute'] in data_cache.frying_plate_type), None) # 如果没有找到,返回None |
| | | # 找到最近7日内的有跌停的序号 |
| | | limit_down_day_min_index = next((i for i, d in enumerate(k_line_data[0:7]) if 'attribute' in d and d['attribute'] in data_cache.limit_down_type), None) # 如果没有找到,返回None |
| | | |
| | | # 最近的涨停序号存在 且 非昨日 |
| | | if limit_up_day_min_index is not None and limit_up_day_min_index > 0: |
| | | # 开盘价 < 涨停当日最高价 <= 今日涨停价 |