【发布时间】:2022-09-23 15:53:06
【问题描述】:
在我的 pinescript(版本:5)中,我正在尝试添加一个标签,该标签将显示当前柱的最高价、RSI 和柱关闭时间。
UTC 时间即将到来。如何将其转换为 GMT:5:30 或“亚洲/加尔各答”时区?
我的代码 sn-p 是这样的:
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)
标签: pine-script algorithmic-trading