A little explanation:
In TradingView / PineScript, the Stochastic is a built-in formula that is calculated with:
Stoch = 100 * (Close – Lowest (Low, Length)) / (Highest(High, Length) – Lowest(Low, Length)
De syntax is: Stoch (source, high, low, length)
As you can see, the original script uses Stoch (rsi14, rsi14, rsi14, 14)
So the source = rsi14, the high of rsi14, the low of rsi14, length = 14
xStoch = 100 * (rsi14 – Lowest[14](rsi14)) / (Highest[14](rsi14) – Lowest[14](rsi14))
1 user thanked author for this post.