Pine脚本在一天结束时关闭所有位置

发布于 2025-02-09 18:07:08 字数 221 浏览 0 评论 0原文

我的问题是,我无法在一天结束时关闭我的开放位置,因为我正在使用Ranko图表模式。如您所知,在Ranko蜡烛时间没有修复,因此我如何在特定时间使用Pine脚本中的IST时间退出。

在没有renko图表的情况下,我正在使用此代码退出毒药

if (hour==15 and minute==29)
    strategy.close_all("Day Close")

my problem is that I cannot close my open position at the end of a day because I am using the ranko chart pattern. as you know in ranko candle time is not fixed so how can I use IST time in pine script to exit every day at a particular time.

in without Renko chart, i was using this code to exit poison

if (hour==15 and minute==29)
    strategy.close_all("Day Close")

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葵雨 2025-02-16 18:07:08

在标准烛台图表上运行您的策略,并从那里请求Renko信息。然后,您可以像平常一样关闭位置。

Renko示例:

//@version=5
indicator('Example 7', overlay=true)
renko_t = ticker.renko(syminfo.tickerid, 'ATR', 10)
renko_low = request.security(renko_t, timeframe.period, low)
plot(renko_low)

Run your strategy on standard candlestick chart and request renko information from there. Then you can close positions as you normally would do.

Renko example:

//@version=5
indicator('Example 7', overlay=true)
renko_t = ticker.renko(syminfo.tickerid, 'ATR', 10)
renko_low = request.security(renko_t, timeframe.period, low)
plot(renko_low)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文