rajputatwork
Pine Script Rookie
Pine Script Rookie
Posts: 1
Joined: November 29th, 2021

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

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?

dusktrader
Pine Script Scholar
Pine Script Scholar
Posts: 32
Joined: February 24th, 2021
Contact: TradingView Profile

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

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

Return to “Share Your Scripts”