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

对已开的仓位的关注度是否应该提高优先级 #13

Open
xiegangqingnian opened this issue Nov 27, 2024 · 4 comments
Open

对已开的仓位的关注度是否应该提高优先级 #13

xiegangqingnian opened this issue Nov 27, 2024 · 4 comments

Comments

@xiegangqingnian
Copy link

在使用过程中,可以很明显感受到已到止盈/止损位,但是 结束订单存在滞后性。

@sorry510
Copy link
Owner

我写的 line x 中的策略,不是严格的按照设定的 止盈的止损的 x%进行平仓,会在达到这个临界点时,再判断当前的 3min(或者 5min) k线的走势,对于多仓来说,只有当前 k 线价格 < 上一个 k线的收盘价时,才会平仓(空仓反之),结论就是多仓平仓的条件为:

nowProfit >= xx% and now_kline_close_price < last_kine_close_price

@xiegangqingnian
Copy link
Author

en. 我有看到这个逻辑,但是可能我这个问题的根本在于,延迟滞后结算 是否会被插针 造成更大的损失,尽管当前的预期结算是往好的方向争取结算到很多的收益。

@sorry510
Copy link
Owner

想要及时结算,可以使用自定义逻辑,创建2个平仓策略,平仓(空),平仓(多) (当然也要创建对应的开仓策略),这里的逻辑会在达到止盈止损位后马上执行,及时结算的逻辑只需写 true 即可

image

@xiegangqingnian
Copy link
Author

好的,感谢分享!

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