Skip to main content

Stochastic Oscillator

What is Stochastic Oscillator?​

Stochastic Oscillator is a momentum indicator that compares a security's closing price to its price range over a specific period of time. It measures the level of the close relative to the high-low range over a set number of periods.

The indicator ranges between 0 and 100 and helps traders identify overbought or oversold conditions as well as potential reversal points in the market.

Key Points:​

  • Measures momentum by comparing closing prices to their high-low range
  • Typically includes %K (fast line) and %D (slow line) to generate crossover signals
  • Helps identify potential turning points in price action

How to Add a Stochastic Oscillator Indicator?​

  1. Go to Indicators → "+" button
  2. Select Stochastic Oscillator
  3. Configure your settings as shown in the interface
  4. Click "Add" to add the indicator to your strategy

Configurable Parameters in Stochastic Oscillator​

1. On Data​

  • Select which price data you want to apply the Stochastic Oscillator to

2. Time Frame​

  • Defines the candle interval (5 = 5-minute candles as shown in the image)

3. K Period​

  • The number of periods (14 in the image) used to calculate the %K line
  • Determines how many periods are considered for the high-low range

4. D Period​

  • The number of periods (3 in the image) used to calculate the %D line
  • Acts as a signal line (moving average of %K)

5. Smooth K​

  • The smoothing factor (3 in the image) applied to the %K line
  • Higher values create a smoother line with fewer false signals

6. Mode​

  • Specifies which moving average type (SMA shown in the image) to use when calculating the %D line

7. Offset​

  • Shifts the indicator forward or backward (0 in the image) in time

Element Name​

  • The default label is _stoch_oscillator as shown in the image
  • You can rename this indicator for clarity, especially if using multiple Stochastic Oscillators

Use Cases for Stochastic Oscillator​

  • Overbought/Oversold Detection
    → Values above 80 generally indicate overbought conditions
    → Values below 20 generally indicate oversold conditions

  • Divergence Signals
    → When price makes new highs/lows but the oscillator doesn't confirm

  • Crossover Signals
    → When %K crosses above %D (potential buy signal)
    → When %K crosses below %D (potential sell signal)

  • Trend Confirmation
    → Using oscillator movements to confirm price trends


Next Steps​

✅ Experiment with different K & D Periods to match your trading timeframe
✅ Combine Stochastic signals with trend indicators (e.g., Moving Averages)
✅ Practice identifying divergence between price and the oscillator
✅ Test different settings for Smooth K to find your optimal signal sensitivity