繁体   English   中英

Pine tradingview 得到 plot 值与偏移量

[英]Pine tradingview get plot value with offset

例如,如何获得应用偏移量(id 想要偏移量)的 ema 的值是过去的 -5 柱

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

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

//@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

你可以试试这个

LIFE32 = ta.ema(close, 3)
    
    plotshape(LIFE32[2] < close, "LIFE UP", shape.triangleup, location.belowbar, color=color.green)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM