| | |
| | | total_num = 0 |
| | | # 获取m值数据 |
| | | thresh_hold_money = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code) |
| | | thresh_hold_money = thresh_hold_money * 2 |
| | | thresh_hold_num = thresh_hold_money // (float(gpcode_manager.get_limit_up_price(code)) * 100) |
| | | end_index = real_place_order_index + 1 |
| | | for i in range(real_place_order_index + 1, total_datas[-1]["index"]): |
| | |
| | | # 判断成交进度是否距离我们的位置很近 |
| | | total_data = local_today_datas.get(code) |
| | | trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code) |
| | | if not is_default and trade_index: |
| | | if False and not is_default and trade_index: |
| | | not_cancel_num = 0 |
| | | num_operate_map = local_today_num_operate_map.get(code) |
| | | for i in range(trade_index + 1, total_data[-1]["index"] + 1): |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | test1 = [] |
| | | test1.append() |
| | | test1 = test1[0:13] |
| | | print(test1) |
| | | _queue = queue.Queue() |
| | | _queue.put("123123") |
| | | print(_queue.get(False)) |
| | | print(_queue.get(False)) |
| | | |
| | |
| | | # 报单状态 |
| | | import random |
| | | import threading |
| | | |
| | | from utils import tool |
| | |
| | | __order_ref_lock.acquire() |
| | | try: |
| | | global __public_order_ref |
| | | __public_order_ref += 1 |
| | | __public_order_ref += random.randint(1, 20) |
| | | return __public_order_ref |
| | | finally: |
| | | __order_ref_lock.release() |