| | |
| | | l2_trade_util.forbidden_trade(code, |
| | | f"无辨识度,自由流通市值({global_util.zyltgb_map.get(code) // 100000000})>{zylt_threshold_as_yi[1]}亿") |
| | | continue |
| | | elif limit_up_price and float(limit_up_price) >= 50: |
| | | elif limit_up_price and float(limit_up_price) >= constant.MAX_CODE_PRICE: |
| | | l2_trade_util.forbidden_trade(code, |
| | | f"无辨识度,涨停价({limit_up_price})>50") |
| | | f"无辨识度,涨停价({limit_up_price})>{constant.MAX_CODE_PRICE}") |
| | | continue |
| | | if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[ |
| | | 0] and code.find("30") != 0: |
| | |
| | | G_CANCEL_RATE_FOR_GOOD_MARKET = 0.59 |
| | | |
| | | # 华鑫L2的卡位数量 |
| | | HUAXIN_L2_MAX_CODES_COUNT = 70 |
| | | HUAXIN_L2_MAX_CODES_COUNT = 75 |
| | | |
| | | TRADE_WAY_HUAXIN = "huaxin" |
| | | TRADE_WAY_JUEJIN = "juejin" |
| | |
| | | if cancel_type != trade_constant.CANCEL_TYPE_HUMAN: |
| | | # 是否是交易队列触发 |
| | | # 扫入下单只有L撤能撤单 |
| | | if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in { |
| | | trade_constant.CANCEL_TYPE_L, trade_constant.CANCEL_TYPE_L_UP, trade_constant.CANCEL_TYPE_L_DOWN}: |
| | | if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in {trade_constant.CANCEL_TYPE_L_DOWN}: |
| | | l2_log.cancel_debug(code, "撤单中断,原因:{}", "扫入下单不是L撤") |
| | | return False |
| | | # 加绿只有L撤/人撤生效 |
| | |
| | | @return: |
| | | """ |
| | | if volume_rate <= 0.05: |
| | | return 1 |
| | | return 0.73 |
| | | elif volume_rate > 1: |
| | | return 0.373 |
| | | return round(0 - 0.66 * volume_rate + 1.033, 3) |
| | | return 0.312 |
| | | return round(0 - 0.44 * volume_rate + 0.752, 3) |
| | |
| | | # if price - 0.1 < fprice: |
| | | # fprice = price - 0.1 |
| | | # return round(fprice, 2) |
| | | return round(get_buy_min_price(price) - 0.03, 2) |
| | | if price < 20: |
| | | return round(get_buy_min_price(price) - 0.03, 2) |
| | | else: |
| | | # 大股价直接向下取2% |
| | | return round(price*(1-0.02), 2) |
| | | |
| | | |
| | | if __name__ == "__main__": |