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 priceLow: Low priceClose: Closing price
- Parameter Settings:
fastk_period: Fast K period, default 5slowk_period: Slow K period, default 3slowk_matype: Slow K moving average type, default 0slowd_period: Signal line period, default 3slowd_matype: Signal line moving average type, default 0
- Output:
slowk: Slow K lineslowd: 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
- Overbought/Oversold Analysis
- Trend Confirmation
- Trading Signal Generation
- Divergence Analysis
Usage Recommendations
- %K > 80 indicates overbought conditions
- %K < 20 indicates oversold conditions
- Watch for %K and %D crossovers
- Pay attention to divergence patterns