| | |
| | | # 9点半之前的数据不处理 |
| | | if int(time_str.replace(":", "")) < int("093000"): |
| | | return |
| | | # now_str = datetime.datetime.now().strftime("%H:%M:%S") |
| | | # now_str = tool.get_now_time_str() |
| | | if rate >= 0: |
| | | down_start_time = self.__get_last_down_price_time(code) |
| | | if down_start_time is None: |
| | |
| | | return self.__get_current_price_codes_count() |
| | | |
| | | # 是否为水下捞 |
| | | def is_under_water(self, code): |
| | | def is_under_water(self, code, now_time=None): |
| | | time_seconds = self.__get_down_price_time_as_seconds(code) |
| | | if time_seconds is None: |
| | | return False |
| | | else: |
| | | return time_seconds >= constant.UNDER_WATER_PRICE_TIME_AS_SECONDS |
| | | if time_seconds >= constant.UNDER_WATER_PRICE_TIME_AS_SECONDS: |
| | | if now_time is None: |
| | | now_time = tool.get_now_time_str() |
| | | space = tool.trade_time_sub(now_time, "09:30:00") |
| | | if space > 0 and time_seconds / space >= 0.2: |
| | | return True |
| | | return False |
| | | |
| | | # 当前代码是否涨停 |
| | | def current_is_limit_up(self, code): |