| | |
| | | if HumanForbiddenManager().is_in_cache(code): |
| | | continue |
| | | |
| | | if not tool.is_can_buy_code(code): |
| | | continue |
| | | # (代码,名称,涨停时间,涨幅,现手,自由市值,现价) |
| | | data = [code, gpcode_manager.get_code_name(code)] |
| | | limit_up_time = LimitUpDataConstant.get_first_limit_up_time(code) |
| | |
| | | from trade.huaxin import huaxin_trade_data_update, huaxin_trade_record_manager |
| | | from trade.huaxin.huaxin_trade_record_manager import TradeOrderIdManager |
| | | from trade.huaxin.huaxin_trade_order_processor import CancelOrderManager, HuaxinOrderEntity, TradeResultProcessor |
| | | from trade.trade_manager import CodesContinueBuyMoneyManager |
| | | from utils import socket_util, huaxin_util, tool |
| | | |
| | | __response_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=15) |
| | |
| | | if huaxin_util.is_deal(order.orderStatus): |
| | | # 如果成交了需要刷新委托列表 |
| | | huaxin_trade_data_update.add_delegate_list("买成交") |
| | | # 订单成交回调,移除续买金额+拉黑 |
| | | CodesContinueBuyMoneyManager().remove_continue_buy_money(order.code) |
| | | |
| | | need_cancel = TradeResultProcessor.process_buy_order(order) |
| | | # if need_cancel: |
| | | # # 需要撤买单 |
| | |
| | | |
| | | import concurrent.futures |
| | | |
| | | from cancel_strategy.s_l_h_cancel_strategy import CancelRateHumanSettingManager |
| | | from code_attribute import gpcode_manager |
| | | from db import mysql_data_delegate as mysql_data, redis_manager_delegate as redis_manager |
| | | from db.mysql_data_delegate import Mysqldb |
| | |
| | | # 买入成功 |
| | | def buy_success(code): |
| | | # 加入黑名单 |
| | | # 移除L后比例 |
| | | CancelRateHumanSettingManager().remove_l_down(code) |
| | | if not l2_trade_util.is_in_forbidden_trade_codes(code): |
| | | if not CodesContinueBuyMoneyManager().get_continue_buy_money(code): |
| | | l2_trade_util.forbidden_trade(code, "buy success", force=True) |