Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting error: could not find function or function reference 'study'?

Tags:

pine-script

//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="✅",color=red,location=location.belowbar)

On line 2, I receive a could not find function or function reference 'study' I don't know why. This is for TradingView, and its Pine Script.

like image 287
Narely Avatar asked Jul 13 '26 02:07

Narely


1 Answers

study() is now called indicator() in pine script v5.

I had the same problem, found the answer buried deep in the release notes.

like image 117
Norman Navarro Avatar answered Jul 18 '26 13:07

Norman Navarro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!