| | |
| | | if human_rate and human_rate >= 0.7: |
| | | return False, "人为设置撤单比例大于0.7" |
| | | |
| | | volume_rate = code_volumn_manager.CodeVolumeManager().get_volume_rate(code) |
| | | if volume_rate <= 0.4 and tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']) <= 6: |
| | | return True, f"量比({volume_rate})<=40%且在挂单6s内,封单额≤4000万" |
| | | # volume_rate = code_volumn_manager.CodeVolumeManager().get_volume_rate(code) |
| | | # if volume_rate <= 0.4 and tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']) <= 6: |
| | | # return True, f"量比({volume_rate})<=40%且在挂单6s内,封单额≤4000万" |
| | | |
| | | if 6 < tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']): |
| | | return True, f"下单后6s,封单额≤4000万" |
| | | # if 6 < tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']): |
| | | return True, f"下单后,封单额≤4000万" |
| | | |
| | | return False, '无撤单条件' |
| | | # return False, '无撤单条件' |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | |
| | | total_left_money = total_left_num * float(limit_up_price) * 100 |
| | | if total_left_money < 1e8: |
| | | if total_left_count <= THRESHOLD_COUNT or total_left_money < THRESHOLD_MONEY: |
| | | return True, f"剩余笔数({total_left_count})/金额({round(total_left_num * float(limit_up_price) * 100)})不足,成交进度:{trade_index},真实下单位置:{real_order_index} 阈值:({THRESHOLD_MONEY_W},{THRESHOLD_COUNT}) " |
| | | return True, f"剩余笔数({total_left_count})/金额({round(total_left_num * float(limit_up_price) * 100)})不足,成交进度:{trade_index},真实下单位置:{real_order_index} 阈值:({THRESHOLD_MONEY},{THRESHOLD_COUNT}) " |
| | | return False, f"不满足撤单条件: 成交进度-{trade_index} 真实下单位置-{real_order_index} total_left_count-{total_left_count} total_left_num-{total_left_num}" |
| | | |
| | | # 距离太近,封单不足 |