Page 1 of 1

Pine script : how to refer custom indictor in Scanner or strategy

Posted: Mon Nov 29, 2021 2:06 am
by rajputatwork
HI,

( disclaimer: I am a novice in the pine-script, and still getting hold of it )

I am using custom indicator "SSL Hybrid" - which i am trying to use in the strategy, same as any inbuilt indicator
like RSI e.g.` rsi = rsi(close, 14) // Value

when I refer to SSLHybrid ( which is already on the chart ) - I am getting the below error.

x = SSLHybrid(14,1)
Add to Chart operation failed, reason: line 9: Could not find function or function reference 'SSLHybrid'.

Can someone, please give me pointers - stuck on this for a while?

Re: Pine script : how to refer custom indictor in Scanner or strategy

Posted: Fri Dec 03, 2021 8:23 pm
by dusktrader
I think you are mixing up the language here. "Built-in" is a type of indicator that is built by TradingView, and is is available to directly reference in your pinescript. But the indicator you are referring to "SSL Hybrid" is not one of these - it is a custom indicator written by another user.

But you're in luck - the custom indicator "SSL Hybrid" is open-source, so you can click on the { } next to the script name and see the entire source. What I usually do is rebuild this type of indicator directly into my pinescript (lift-and-shift). That way you will be able to then directly reference the outputs from that indicator.

Hope that helps