| | |
| | | |
| | | # 计算剩余数量 |
| | | total_datas = local_today_datas.get(code) |
| | | if int(total_datas[end_index]['val']['time'].replace(":","")) > 145000: |
| | | return False, None, "超过生效时间" |
| | | |
| | | buyno_map = local_today_buyno_map.get(code) |
| | | limit_up_price = round(float(gpcode_manager.get_limit_up_price(code)), 2) |
| | | min_volume = 50 * 10000 // int(limit_up_price * 100) |
| | |
| | | # J撤 |
| | | def j_cancel(_buy_single_index, _buy_exec_index): |
| | | try: |
| | | b_need_cancel, b_cancel_data, extra_msg = JCancelBigNumComputer().need_cancel(code, start_index, end_index) |
| | | b_need_cancel, b_cancel_data, extra_msg = JCancelBigNumComputer().need_cancel(code, start_index, |
| | | end_index) |
| | | if b_need_cancel and b_cancel_data: |
| | | return b_cancel_data, f"J撤({extra_msg})" |
| | | except Exception as e: |
| | | async_log_util.error(logger_l2_error, |
| | | f"J撤出错 参数:buy_single_index-{_buy_single_index} buy_exec_index-{_buy_exec_index} 错误原因:{str(e)}") |
| | | return None, "" |
| | | |
| | | |
| | | if start_index < 0: |
| | | start_index = 0 |
| | |
| | | @param code: |
| | | @return: |
| | | """ |
| | | if global_util.zyltgb_map.get(code) > 50 * 100000000: |
| | | # 50亿以上的无法激进下单 |
| | | return None |
| | | can_buy_result = CodePlateKeyBuyManager.can_buy(code) |
| | | if can_buy_result: |
| | | if can_buy_result[5]: |
| | |
| | | |
| | | # 是否是强势30分钟 |
| | | is_in_strong_time_30 = now_timestamp <= int("100000") |
| | | |
| | | |
| | | # 获取市场行情 |
| | | situation = cls.__MarketSituationManager.get_situation_cache() |
| | |
| | | from trade.sell.sell_rule_manager import TradeRuleManager, SellRule |
| | | from trade.trade_manager import TradeTargetCodeModeManager, MarketSituationManager, AutoCancelSellModeManager, \ |
| | | CodesTradeStateManager |
| | | from utils import socket_util, data_export_util, middle_api_protocol, tool, huaxin_util, output_util, sell_util |
| | | from utils import socket_util, data_export_util, middle_api_protocol, tool, huaxin_util, output_util, sell_util, \ |
| | | global_util |
| | | |
| | | trade_data_request_queue = queue.Queue() |
| | | |
| | |
| | | if _type == L2TradeSingleDataManager.TYPE_PASSIVE and mode_descs: |
| | | # 可以激进下单且必须是首次下单才能激进 |
| | | place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) |
| | | if place_order_count == 0: |
| | | |
| | | if place_order_count == 0 and current_total_sell_data[1] > 500*10000 and global_util.zyltgb_map.get(code) < 50 * 100000000: |
| | | # 首次下单,自由流通50亿以下,总卖额500w才能激进下单 |
| | | mode_descs.insert(0, "成交触发") |
| | | last_index = total_datas[-1]["index"] |
| | | volume_rate = code_volumn_manager.get_volume_rate(code) |
| | |
| | | l2_data_manager_new.L2TradeDataProcessor.start_buy(code, total_datas[-1], total_datas[-1]["index"], |
| | | True) |
| | | else: |
| | | l2_log.debug(code, "激进下单,但不是首次下单,无法激进") |
| | | l2_log.debug(code, "激进下单,不满足激进下单条件,无法激进") |
| | | else: |
| | | if code.find("00") != 0: |
| | | return |