【问题标题】:New Pine editor v5 function "request.security_lower_tf()" not working on active candle新的 Pine 编辑器 v5 函数“request.security_lower_tf()”不适用于活动蜡烛
【发布时间】:2022-06-22 02:07:07
【问题描述】:

这是我的目标: enter image description here

这是我指的功能:

//@version=5
indicator("`request.security_lower_tf()` Example", overlay = true)

// If the current chart timeframe is set to 120 minutes, then the `arrayClose` array will contain two 'close' values from the 60 minute timeframe for each bar.
arrClose  = request.security_lower_tf(syminfo.tickerid, "60", close)

if bar_index == last_bar_index - 1
    label.new(bar_index, high, str.tostring(arrClose))

问题出在哪里:

  • 此函数显示已经关闭的蜡烛(过去的蜡烛)的较低时间框架蜡烛

  • 我想要的是...显示过去的蜡烛图(已经关闭)...以及当前活跃的蜡烛图

如果我去改变这部分:

if bar_index == last_bar_index - 1

...这部分:

if bar_index == last_bar_index

...它显示(在屏幕上)正确的数据(过去的蜡烛+活动蜡烛)...然后它从屏幕上消失...好像它闪烁了几秒钟然后数据就消失了。

为什么要这样做?超出范围?有什么想法吗?

【问题讨论】:

    标签: pine-script pinescript-v5 pine-script-v4 pine-editor


    【解决方案1】:

    它似乎已修复。 请再次检查,现在一切正常。

    【讨论】:

      猜你喜欢
      • 2022-10-23
      • 1970-01-01
      • 2022-10-01
      • 2022-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-04
      • 2022-07-20
      相关资源
      最近更新 更多