Code Library / Indicators
Stochastic RSI
Stochastic RSI oscillator.
Language: Pine Script · Category: Indicators · Tags: StochRSI, oscillator, Pine Script
Source code
//@version=5
indicator("StochRSI")
rsi = ta.rsi(close,14)
k = ta.sma(ta.stoch(rsi,rsi,rsi,14),3)
d = ta.sma(k,3)
plot(k,"K",color.blue)
plot(d,"D",color.orange)
hline(80)
hline(20)How to use this snippet
This is a building block, not a finished trading system. Paste it into your own Pine Script project, compile it, and test it on a demo account with your broker's real spreads before relying on it. You can convert it to MQL4 or MQL5 with the Pine Script converter.