Administrator
2024-02-29 4349e51c0ef43a77e8a1e59723f481a9cfa97c8d
trade/l2_trade_factor.py
@@ -6,7 +6,7 @@
from code_attribute import big_money_num_manager, limit_up_time_manager, global_data_loader, gpcode_manager
import constant
from trade import trade_manager
from trade import trade_manager, deal_big_money_manager
from utils import global_util, tool
@@ -159,21 +159,17 @@
    # 获取需要的大单个数
    def get_big_num_count(self):
        # if self.is_first_code:
        #     if self.buy_rank < 2:
        #         return 0
        #     elif self.buy_rank == 2:
        #         return 1
        #     elif self.buy_rank == 3:
        #         return 2
        counts = [1, 1, 1, 1, 0, 0, 0, 0]
        volume_rate_index = self.volume_rate_index
        if self.volume_rate_index >= len(counts):
            volume_rate_index = -1
        # 第一次下单必须为2个
        # if self.is_first_place_order(self.code):
        #     return 2
        return counts[volume_rate_index]
        # counts = [1, 1, 1, 1, 0, 0, 0, 0]
        # volume_rate_index = self.volume_rate_index
        # if self.volume_rate_index >= len(counts):
        #     volume_rate_index = -1
        # return counts[volume_rate_index]
        # 有大单成交就不需要大单了,没有大单成交就需要大单
        deal_big_money_count = deal_big_money_manager.get_deal_big_money_count(self.code)
        if deal_big_money_count > 0:
            return 0
        else:
            return 1
    # 获取安全笔数影响比例
    def get_safe_count_rate(self):