pinescript:在交换时区打印酒吧时间
在我的pinescript(版本:5)中,我正在尝试添加一个标签,该标签将显示当前条的High,rsi和bar关闭时间。
时间到了UTC。如何将其转换为GMT:5:30或“亚洲/加尔各答”时区?
我的代码片段是:
if (ta.crossunder(rsi, rsiOSLimit))
label.new(bar_index, high, str.tostring(high, "#") + ":" + str.tostring(rsi, "#") + ":" + str.format("{0,time,short}", time), color=color.black, textcolor=color.white, yloc= yloc.price)
我也尝试过,没有工作:
label.new(bar_index, high, str.tostring(high, "#") + ":" + str.tostring(rsi, "#") + ":" + str.format("{0,time,short}", time_close(timeframe.period, syminfo.session, syminfo.timezone)), color=color.black, textcolor=color.white, yloc= yloc.price)
In my pinescript (version:5), I am trying to add a label that will display the current bar's high, RSI and the bar closing time.
The time is coming in UTC. How can I convert it to GMT:5:30 or "Asia/Kolkata" timezone?
My code snippet is this:
if (ta.crossunder(rsi, rsiOSLimit))
label.new(bar_index, high, str.tostring(high, "#") + ":" + str.tostring(rsi, "#") + ":" + str.format("{0,time,short}", time), color=color.black, textcolor=color.white, yloc= yloc.price)
I have tried out with this also, did not worked:
label.new(bar_index, high, str.tostring(high, "#") + ":" + str.tostring(rsi, "#") + ":" + str.format("{0,time,short}", time_close(timeframe.period, syminfo.session, syminfo.timezone)), color=color.black, textcolor=color.white, yloc= yloc.price)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以做到这一点:
结果应该是这样:
在此处输入图像描述
You can do this:
Result should be like this:
enter image description here