STOCH (Stochastic Oscillator)

Indicator Description

STOCH (Stochastic Oscillator) is a momentum indicator that measures the strength of price momentum by comparing the current price to the highest and lowest prices over a specified period.

Function Information

  • Function Name: STOCH
  • Input Parameters:
    • High: High price
    • Low: Low price
    • Close: Closing price
  • Parameter Settings:
    • fastk_period: Fast K period, default 5
    • slowk_period: Slow K period, default 3
    • slowk_matype: Slow K moving average type, default 0
    • slowd_period: Signal line period, default 3
    • slowd_matype: Signal line moving average type, default 0
  • Output:
    • slowk: Slow K line
    • slowd: Slow D line

Calculation Principle

STOCH is calculated using the following formula:

%K = 100 * (Close - Lowest Low) / (Highest High - Lowest Low)
%D = SMA(%K, slowk_period)

Where:

  • Close is the current closing price
  • Lowest Low is the lowest price in the period
  • Highest High is the highest price in the period
  • SMA is Simple Moving Average

Usage Scenarios

  1. Overbought/Oversold Analysis
  2. Trend Confirmation
  3. Trading Signal Generation
  4. Divergence Analysis

Usage Recommendations

  1. %K > 80 indicates overbought conditions
  2. %K < 20 indicates oversold conditions
  3. Watch for %K and %D crossovers
  4. Pay attention to divergence patterns
Last Updated: