Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find function or function reference financial

Tags:

pine-script

I am just trying out Pine Script for the first time, and can't make this work – which should be trivial according to other examples.

study("Price to Operating Income", overlay=true, scale=scale.left)
op_income = financial(syminfo.tickerid, "OPER_INCOME", "FQ")
price_op_income = close/op_income
plot(price_op_income)

Could not find function or function reference financial

Is this simply because Operating Income is not available for Pine Script in the free version of TradingView, or am I missing something?

like image 816
P A N Avatar asked Oct 11 '25 15:10

P A N


1 Answers

You forgot the //@version=4 tag in the beginning of your script.
financial() is a function that's available as of Pine script version 4.

//@version=4
study("Price to Operating Income", overlay=true, scale=scale.left)

op_income = financial(syminfo.tickerid, "OPER_INCOME", "FQ")
price_op_income = close/op_income

plot(price_op_income)
like image 191
Bjorn Mistiaen Avatar answered Oct 15 '25 01:10

Bjorn Mistiaen



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!