【问题标题】:Pine tradingview get plot value with offsetPine tradingview 获取带有偏移量的绘图值
【发布时间】:2021-12-03 08:11:18
【问题描述】:

如何获取应用了偏移量的 ema 的值(例如,id 想要偏移量)在过去,也就是 -5 条

plot(ema(close, 15), offset=-5)

【问题讨论】:

    标签: pine-script


    【解决方案1】:

    可以使用 [] 历史引用运算符来引用时间序列的过去值

    //@version=5
    indicator("My Script")
    
    
    ema = ta.ema(close, 15)
    plot(ema15[5], color = color.red)
    

    https://www.tradingview.com/pine-script-docs/en/v5/language/Operators.html#history-referencing-operator

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-01
      • 2019-04-07
      • 1970-01-01
      • 2021-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多