From 4d9e7454be7fccd9f84b357068d937752625a13d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 08 十一月 2023 18:22:08 +0800 Subject: [PATCH] 参数调优 --- l2/l2_data_manager_new.py | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py index 0954343..7cda351 100644 --- a/l2/l2_data_manager_new.py +++ b/l2/l2_data_manager_new.py @@ -1085,8 +1085,8 @@ trade_index, is_default = TradeBuyQueue().get_traded_index(code) if trade_index and not is_default: m_base_val = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code) - thresh_hold_num = m_base_val // (float(gpcode_manager.get_limit_up_price(code)) * 100) - # 鐪熷疄涓嬪崟浣嶅埌鎴愪氦浣嶇疆鐨勭函涔伴 + thresh_hold_num = m_base_val * 3 // (float(gpcode_manager.get_limit_up_price(code)) * 100) + # 鐪熷疄涓嬪崟浣嶅埌鎴愪氦浣嶇疆鐨勭函涔伴 * 3 total_num = 0 for i in range(trade_index + 1, buy_single_index): data = total_datas[i] @@ -1117,8 +1117,11 @@ # 鏆傛椂鎵�8鎶� order_begin_pos.threshold_money = int(sell_info[1] * 0.8) # 娣辫瘉鎬诲崠澶т簬1000涓囩殑绁紝m鍊兼墦5鎶� - if code.find('00') == 0 and sell_info[1] > 1000 * 10000: - order_begin_pos.threshold_money = int(sell_info[1] * 0.5) + if sell_info[1] > 1000 * 10000: + if code.find('00') == 0: + order_begin_pos.threshold_money = int(sell_info[1] * 0.5) + else: + order_begin_pos.threshold_money = int(sell_info[1] * 0.6) l2_log.debug(code, "鑾峰彇鍒颁拱鍏ヤ俊鍙疯捣濮嬬偣锛歿} ,璁$畻鑼冨洿锛歿}-{} 锛岄噺姣旓細{}锛屾槸鍚︽澘涓婁拱锛歿}锛屾暟鎹細{} 妯″紡锛歿}锛坽}锛�", buy_single_index, compute_start_index, compute_end_index, cls.volume_rate_info[code], order_begin_pos.at_limit_up, -- Gitblit v1.8.0