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?
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With