Functions
talib.stoch()
Stochastic reading that places `source` inside the span set by `high` and `low` over `length` bars. The high and low series are arguments rather than assumptions, so you can drive the calculation from series of your own.
Syntax
talib.stoch(series float source, series float high, series float low, series int length) → series float
Arguments
source required series float Source series. high required series float Series of high. low required series float Series of low. length required series int Length (number of bars back). Return Type
series float Example
//@lipi=2
indicator("Stochastic Oscillator", overlay=false)
length = input(14, "Stochastic Length")
stochValue = talib.stoch(close, high, low, length)
plot(stochValue, color=color.blue, title="%K Line")
hline(80, "Overbought", color=color.red)
hline(20, "Oversold", color=color.green)