| | |
| | | @classmethod |
| | | def get_history_tick_n(cls, code, count, fields=None): |
| | | # return JueJinApi.get_history_tick_n(code, count, fields) |
| | | if constant.is_windows(): |
| | | return JueJinApi.get_history_tick_n(code, count, fields) |
| | | else: |
| | | try: |
| | | return hx_qc_value_util.get_history_k_bars(code, count) |
| | | except Exception as e: |
| | |
| | | # 返回指定日期的上个交易日 |
| | | @classmethod |
| | | def get_previous_trading_date(cls, date): |
| | | if constant.is_windows(): |
| | | return JueJinApi.get_previous_trading_date(date) |
| | | else: |
| | | return hx_qc_value_util.get_previous_trading_date(date) |
| | | |
| | | @classmethod |
| | |
| | | if cls.__days: |
| | | volumes_data = HistoryKDataManager().get_history_bars(code, cls.__days[1]) |
| | | if volumes_data: |
| | | volumes_data = volumes_data[:cls.__LATEST_DAY_COUNT - 1] |
| | | volumes_data = volumes_data[:cls.__LATEST_DAY_COUNT] |
| | | cls.__k_datas[code] = volumes_data |
| | | if not volumes_data: |
| | | volumes_data = init_data_util.get_volumns_by_code(code, cls.__LATEST_DAY_COUNT - 1) |
| | | volumes_data = init_data_util.get_volumns_by_code(code, cls.__LATEST_DAY_COUNT) |
| | | if volumes_data: |
| | | cls.__k_datas[code] = volumes_data |
| | | # 获取最大涨幅 |