| | |
| | | datas = datas[-10:] |
| | | limit_ups = [] |
| | | limit_up_count = 0 |
| | | max_price = datas[0]["high"] |
| | | for data in datas: |
| | | limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(data["pre_close"])) |
| | | date = data['bob'].strftime("%Y-%m-%d") |
| | | if data["high"] > max_price: |
| | | max_price = data["high"] |
| | | if abs(limit_up_price - data["high"]) < 0.01: |
| | | limit_ups.append((date, True)) |
| | | limit_up_count += 1 |
| | | else: |
| | | limit_ups.append((date, False)) |
| | | # 下降幅度 |
| | | limit_down_rate = round((max_price - datas[-1]["close"]) / max_price, 3) |
| | | |
| | | if limit_up_count < 3: |
| | | return False |
| | |
| | | for t in temp_datas: |
| | | if t[1]: |
| | | t_count += 1 |
| | | if t_count >= 3: |
| | | if t_count >= 3 and limit_down_rate < 0.2: |
| | | # 降幅小于20% |
| | | return True |
| | | |
| | | return False |
| | | |
| | | |