| | |
| | | l2_log.debug(code, "触发撤单,撤单位置:{} ,撤单原因:{}", index, "F撤不够2笔触发撤单") |
| | | cls.cancel_buy(code, msg="F撤不够2笔触发撤单") |
| | | return |
| | | l2_log.debug(code, "设置真实下单位:{}",index) |
| | | l2_log.debug(code, "设置真实下单位:{}", index) |
| | | cancel_buy_strategy.set_real_place_position(code, index, order_begin_pos.buy_single_index) |
| | | |
| | | # 处理华鑫L2数据 |
| | |
| | | order_begin_pos.count = 0 |
| | | order_begin_pos.buy_single_index = buy_single_index |
| | | if order_begin_pos.sell_info: |
| | | if float(total_datas[buy_single_index]["val"]["price"])>=3: |
| | | if float(total_datas[buy_single_index]["val"]["price"]) >= 3 and cls.volume_rate_info[code][0] > 0.3: |
| | | # 暂时打8折 |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | # 深证总卖大于1000万的票,m值打5折 |
| | |
| | | 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) |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.7) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | l2_log.debug(code, "获取到买入信号起始点:{} ,计算范围:{}-{} ,量比:{},是否板上买:{},数据:{} 模式:{}({})", buy_single_index, |
| | |
| | | l2_log.debug(code, "获取到买入执行位置:{} m值:{} 纯买手数:{} 纯买单数:{} 是否板上买:{} 数据:{} ,量比:{} ,下单模式:{}", new_buy_exec_index, |
| | | threshold_money, |
| | | buy_nums, |
| | | buy_count, order_begin_pos.at_limit_up, total_datas[new_buy_exec_index], cls.volume_rate_info[code], order_begin_pos.mode) |
| | | buy_count, order_begin_pos.at_limit_up, total_datas[new_buy_exec_index], |
| | | cls.volume_rate_info[code], order_begin_pos.mode) |
| | | cls.__save_order_begin_data(code, OrderBeginPosInfo(buy_single_index=buy_single_index, |
| | | buy_exec_index=new_buy_exec_index, |
| | | buy_compute_index=new_buy_exec_index, |
| | |
| | | |
| | | # 保存闪电下单的买入信息 |
| | | if order_begin_pos.mode == OrderBeginPosInfo.MODE_FAST: |
| | | cls.__latest_fast_place_order_info_dict[code] = (order_begin_pos.sell_info[0], order_begin_pos.sell_info[1]) |
| | | cls.__latest_fast_place_order_info_dict[code] = ( |
| | | order_begin_pos.sell_info[0], order_begin_pos.sell_info[1]) |
| | | |
| | | # 数据是否处理完毕 |
| | | if new_buy_exec_index < compute_end_index: |