> For the complete documentation index, see [llms.txt](https://docs.origami.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.tech/reference/grid-language/indicators/stochastic-oscillator-k.md).

# Stochastic Oscillator %K

stoch() calculates the Stochastic Oscillator %K, which compares the close with the recent high-low range.

The Stochastic Oscillator %K in Origami Tech measures momentum by comparing closing prices to recent ranges for trading signal generation.

## Stochastic Oscillator %K

`stoch(candles: List[[Candle]], period: int = 14) -> List[Decimal]`
