| | |
| | | import juejin_core |
| | | from utils import tool |
| | | |
| | | |
| | |
| | | def clear(cls, code): |
| | | if code in cls.__highest_price_infos: |
| | | cls.__highest_price_infos.pop(code) |
| | | |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | day = tool.get_now_date_str() |
| | | code = "603189" |
| | | time_range = ["09:25:00", "15:00:00"] |
| | | results = juejin_core.GPCodeManager().get_history_tick(code, day + " " + time_range[0], |
| | | day + " " + time_range[1]) |
| | | pre_price = 14.74 |
| | | TickDataProcess.init_origin_price(code, results[0]['price'], |
| | | round((results[0]['price'] - pre_price) * 100 / pre_price, 2)) |
| | | for result in results: |
| | | rate = round((result['price'] - pre_price) * 100 / pre_price, 2) |
| | | r = TickDataProcess.process_tick_data(code, result['created_at'].strftime("%H:%M:%S"), result['price'], |
| | | rate, max_amplitude_rate_percent=0.6) |
| | | if r: |
| | | print("减仓", result['created_at'].strftime("%H:%M:%S"), rate, result['price']) |