Indicators
Indicators
Stochastic Oscillator (stoch)

Stochastic Oscillator (stoch)

def stoch(high: NDArray[Shape["*", Float]], low: NDArray[Shape["*", Float]], close: NDArray[Shape["*", Float]], k_period: float | int, k_slowing_period: float | int, d_period: float | int) -> NDArray[Shape["2 *"], Float]:
    """
    Stochastic Oscillator
    Inputs: high, low, close
    Options: k_period[14], k_slowing_period[1], d_period[3]
    Outputs: stoch_k, stoch_d
    """
    pass

The Stochastic Oscillator indicator requires 3 input and 3 option parameters.

This indicator returns 2 outputs

Inputs

  • high - a numpy.array of numpy.float64
  • low - a numpy.array of numpy.float64
  • close - a numpy.array of numpy.float64

Options

  • k_period - float | int
  • k_slowing_period - float | int
  • d_period - float | int

Outputs

  • stoch_k
  • stoch_d