Unique631
Unique631

Reputation: 101

How to use stochRsi in Pine script v5

I used stochRsi same as Rsi function. Rsi works fine but I'm getting error on stochRsi part. why? and what is the correct way to use stochRsi?

I want to plotshape on chart when cross of stochRsi occurs.

enter image description here

//@version=5
indicator("My script", overlay = true)
import TradingView/ta/5
plotshape(ta.crossover(ta.rsi(close,14),70))
plotshape(ta.crossover(ta.stochRsi(14,5,14,5,close),70))

Upvotes: 0

Views: 673

Answers (1)

Johan
Johan

Reputation: 33

ta.stochRsi returns: ([float, float]) A tuple of the slow %K and the %D moving average values.

For example: [k, d] = ta.stochRsi(14,5,14,5,close)

Upvotes: 0

Related Questions