Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

撤单检查限制有bug(TraderAdapter::checkCancelLimits()) #157

Open
yutaoli opened this issue Mar 31, 2023 · 2 comments
Open

撤单检查限制有bug(TraderAdapter::checkCancelLimits()) #157

yutaoli opened this issue Mar 31, 2023 · 2 comments

Comments

@yutaoli
Copy link

yutaoli commented Mar 31, 2023

如:配置了100s内最多只能20个撤单,实际运行时1秒一个撤单,可以撤30个单;

@yutaoli yutaoli changed the title 撤单检查限制有bug(checkCancelLimits) 撤单检查限制有bug(WtSimpRiskMon.cpp的checkCancelLimits) Mar 31, 2023
@yutaoli yutaoli changed the title 撤单检查限制有bug(WtSimpRiskMon.cpp的checkCancelLimits) 撤单检查限制有bug(TraderAdapter::checkCancelLimits()) Mar 31, 2023
@wondertrader
Copy link
Owner

把你撤单限制的配置贴一下吧

@yutaoli
Copy link
Author

yutaoli commented Apr 7, 2023

我没有跑起来试过具体的撤单,当时是读代码发现的;
下面配置我运行起来过,但没有实际撤过单。
tdtraders.yaml
traders:

  • active: true
    id: simnow # id
    module: TraderCTP # 模块文件名,win下会自动转成xxx.dll,linux会自动转成libxxx.so
    savedata: true # 是否保存数据,如果为true,会将接口拉取到的成交、订单、资金和持仓都写到本地文件中
    riskmon: # 通道风控配置
    active: true # 是否开启
    policy: # 风控策略
    default: # 默认策略,也可以针对不同的品种进行风控,格式如CFFEX.IF
    cancel_stat_timespan: 100 # 撤单流控统计时间窗口,单位s
    cancel_times_boundary: 20 # 时间窗口内最大撤单次数,如果超过该次数,撤单指令不会再发送
    cancel_total_limits: 470 # 单日最大撤单笔数(只统计普通撤单,FAK和FOK会忽略掉)
    order_stat_timespan: 10 # 下单流控统计时间窗口,单位s
    order_times_boundary: 20 # 时间窗口内最大下单次数,如果超过该次数,下单指令不会发送

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants