首页 > 解决方案 > 为什么我收到错误:找不到函数或函数参考“研究”?

问题描述

//DeMark_9_Indicator_Wealth_Insider
study("DeMark9 Indicator",overlay=true)
TD = close > close[4] ?nz(TD[1])+1:0
TS = close < close[4] ?nz(TS[1])+1:0
TDUp = TD - valuewhen(TD < TD[1], TD , 1 )
TDDn = TS - valuewhen(TS < TS[1], TS , 1 )
plotshape(TDUp==7?true:na,style=shape.triangledown,text="7",color=green,location=location.abovebar)
plotshape(TDUp==8?true:na,style=shape.triangledown,text="8",color=green,location=location.abovebar)
plotshape(TDUp==9?true:na,style=shape.triangledown,text="⚠️",color=green,location=location.abovebar)
plotshape(TDDn==7?true:na,style=shape.triangleup,text="7",color=red,location=location.belowbar)
plotshape(TDDn==8?true:na,style=shape.triangleup,text="8",color=red,location=location.belowbar)
plotshape(TDDn==9?true:na,style=shape.triangleup,text="✅&quot;,color=red,location=location.belowbar)

在第 2 行,我收到一个找不到函数或函数引用“研究”,我不知道为什么。这是针对 TradingView 及其 Pine 脚本的。

标签: pine-script

解决方案


study() 现在在 pine 脚本 v5 中称为 indicator()。

我遇到了同样的问题,在发行说明中找到了答案。


推荐阅读