| | |
| | | return None |
| | | self.last_buy_queue_data[code] = queues |
| | | |
| | | if abs(float(buy_1_price) - float(limit_up_price)) >= 0.01: |
| | | if abs(float(buy_1_price) - float(limit_up_price)) >= 0.001: |
| | | # 保存最近的涨停起始时间 |
| | | self.__save_latest_not_limit_up_time(code, buy_1_time) |
| | | return None |
| | |
| | | # 设置交易进度 |
| | | def set_traded_index(self, code, index, total_datas = None): |
| | | last_info = self.latest_buy_progress_index_cache.get(code) |
| | | # 交易进度是否改变 |
| | | traded_index_changed = False |
| | | if not last_info or last_info[0] != index: |
| | | if last_info and total_datas: |
| | | val = total_datas[last_info[0]]['val'] |
| | |
| | | # 成交速率 |
| | | self.trade_speed_cache[code] = rate |
| | | self.latest_buy_progress_index_cache[code] = (index, time.time()) |
| | | traded_index_changed = True |
| | | self.__save_buy_progress_index(code, index, False) |
| | | return traded_index_changed |
| | | |
| | | # 获取成交速率 |
| | | def get_trade_speed(self, code): |