Stochastic
forge.taclassSince Forge API 1
Signaturepython
forge.ta.Stochastic(**inputs: Any) -> NoneWhere the close sits in the recent high to low range, with a signal line.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| k_period | int | 5 | 1 to 5000 |
| d_period | int | 3 | 1 to 5000 |
| slowing | int | 3 | 1 to 5000 |
| basis | choice | high_low |
Indicator: Stochastic oscillator
The highest high and lowest low over K period (the highest and lowest close with close_close)
%K = 100 * sum(close - lowest, slowing) / sum(highest - lowest, slowing)
%D = the simple average of %K over D period
A window with no range reads 50.