L2早上订阅的下限降低/F撤修改/09:31:00之前不下单
| | |
| | | |
| | | TEST = True |
| | | L1_MIN_RATE = 3.0 |
| | | L1_MIN_RATE_PRE = 1.0 # 早上订阅要多低点 |
| | | L2_CODES_INFO_PATH = "/home/userzjj/logs/l2_codes.txt" |
| | | # 影子订单的量 |
| | | SHADOW_ORDER_VOLUME = 100 |
| | | |
| | |
| | | list_ = [level1_data_dict[k] for k in level1_data_dict] |
| | | flist = [] |
| | | plist = [] |
| | | threshold_rate = constant.L1_MIN_RATE_PRE if int(tool.get_now_time_str().replace(":", "")) < int( |
| | | "094000") else constant.L1_MIN_RATE |
| | | for d in list_: |
| | | if d[2] >= constant.L1_MIN_RATE: |
| | | |
| | | if d[2] >= threshold_rate: |
| | | # 涨幅小于5%的需要删除 |
| | | flist.append(d) |
| | | |
| | | if d[0] in __position_codes: |
| | | plist.append(d) |
| | | flist.sort(key=lambda x: x[2], reverse=True) |
| | |
| | | # -*- coding: utf-8 -*- |
| | | import datetime |
| | | import time |
| | | |
| | | |
| | |
| | | if start1 < relative_timestamp < end1: |
| | | return True |
| | | return False |
| | | |
| | | |
| | | def get_now_time_str(): |
| | | time_str = datetime.datetime.now().strftime("%H:%M:%S") |
| | | return time_str |
| | |
| | | # 设置真实的下单位置 |
| | | def set_real_order_index(self, code, index, is_default): |
| | | self.__set_real_order_index(code, index, is_default) |
| | | if not is_default and code.find("60") == 0: |
| | | # if not is_default and code.find("60") == 0: |
| | | try: |
| | | # 统计未成交的最大单 |
| | | trade_index = 0 |
| | |
| | | now_time_int = int(tool.get_now_time_str().replace(":", "")) |
| | | if now_time_int >= 145700: |
| | | return False, True, f"14:57后不能交易" |
| | | if 130100 >= now_time_int >= 112900: |
| | | return False, True, f"11:29:00-13:01:00不能交易" |
| | | if 130100 >= now_time_int >= 112900 or now_time_int<93100: |
| | | return False, True, f"09:31:00之前,11:29:00-13:01:00不能交易" |
| | | |
| | | # place_order_count = cls.__PlaceOrderCountManager.get_place_order_count(code) |
| | | # if place_order_count > 0 and now_time_int >= 140000: |