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.

talib.stoch(series float source, series float high, series float low, series int length) → series float
ParameterTypeRequiredDescription
sourceseries floatyesThe series being placed within the span.
highseries floatyesThe series supplying the top of the span.
lowseries floatyesThe series supplying the bottom of the span.
lengthseries intyesHow many bars the span covers.

Returns series float — A single series float. This call returns one value, not a tuple of lines.

indicator("Stochastic")
plot(talib.stoch(close, high, low, 14))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade