Skip to main content
Module

x/trading_signals/mod.ts>StochasticOscillator

Technical indicators to run technical analysis for Deno. 📈
Latest
class StochasticOscillator
import { StochasticOscillator } from "https://deno.land/x/trading_signals@3.6.1/mod.ts";

Stochastic Oscillator (STOCH) Type: Momentum

The Stochastic Oscillator was developed by George Lane and is range-bound between 0 and 100. The Stochastic Oscillator attempts to predict price turning points. A value of 80 indicates that the asset is on the verge of being overbought. By default, a Simple Moving Average (SMA) is used. When the momentum starts to slow down, the Stochastic Oscillator values start to turn down. In the case of an uptrend, prices tend to make higher highs, and the settlement price usually tends to be in the upper end of that time period's trading range.

The stochastic k (%k) values represent the relation between current close to the period's price range (high/low). It is sometimes referred as the "fast" stochastic period (fastk). The stochastic d (%d) values represent a Moving Average of the %k values. It is sometimes referred as the "slow" period.

Constructors

new
StochasticOscillator(
n: number,
m: number,
p: number,
)

Constructs a Stochastic Oscillator.

Properties

private
readonly
candles: HighLowClose[]
private
readonly
periodM: SMA
private
readonly
periodP: SMA
private
optional
result: StochasticResult
readonly
isStable: boolean