stoch_d
Stochastic %D (Slow Stochastic - MA of %K)
stoch_d(k_period, d_period, matype="sma")
Parameters
| Name | Type | Description |
|---|---|---|
k_period |
int | Period for %K calculation (high-low range) |
d_period |
int | Period for smoothing %K to get %D |
matype |
str, optional | Type of moving average for smoothing |
Formula
```
%D = MA(%K, d_period)
Where:
- %K = stoch_k(k_period)
- MA = Moving average of type 'matype'
```
Examples
stoch_d(14, 3); # Standard slow stochastic
stoch_d(5, 3); # Fast stochastic
stoch_d(14, 3, matype="ema"); # EMA-smoothed %D
k = stoch_k(14); d = stoch_d(14, 3); k > d; # Bullish crossover
Returns
Stochastic %D value (smoothed %K) ranging from 0 to 100 ## References - TradingView: `ta.stoch()` returns [k, d] - Developed by George Lane ## Notes - Slower and smoother than %K, reduces false signals - %K crossing above %D = bullish signal - %K crossing below %D = bearish signal - Overbought/oversold levels same as %K (80/20)