Conversion of the built in indicator with exactly the same input parameters from Pine inTradingview to MQL4 for MT4. This indicator is going to be a part of an EA and as such I will need to be able to use and change the input parameters.
The code from Tradingview is freely available and looks like this:
//@version=3 study(title="Stochastic RSI", shorttitle="Stoch RSI") smoothK = input(3, minval=1) smoothD = input(3, minval=1) lengthRSI = input(14, minval=1) lengthStoch = input(14, minval=1) src = input(close, title="RSI Source") rsi1 = rsi(src, lengthRSI) k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK) d = sma(k, smoothD) plot(k, color=blue) plot(d, color=orange) h0 = hline(80) h1 = hline(20) fill(h0, h1, color=purple, transp=80)
Most important is that the indicator will show the lines as defined above, and the 80-20 levels. The fill is not so important.