BACK TO CLAUDE SKILLS
◈
calculate_stochastic
IndicatorsStochIndicator
INSTALLATION
$python -c "exec(open('calculate_stochastic.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]
Computes the Stochastic %K line by comparing each closing price to the high-low range of the preceding `k` bars, then derives the %D smoothing line by applying a simple moving average of period `d` to the %K series. Returns both series as lists for further filtering or chart plotting.
The Stochastic oscillator is particularly effective at identifying overbought and oversold conditions in ranging markets. Readings above 80 indicate overbought; below 20 indicate oversold. Unlike RSI, Stochastic uses the price range rather than price momentum, making it more sensitive to short-term reversals at structural highs and lows.
[ USAGE EXAMPLE ]
[ FULL CODE ]
[ METADATA ]
CategoryIndicators
ComplexityBeginner
LanguagePython 3.10+
TagsStoch, Indicator
[ ASK CLAUDE ]
Ask AI about this skill before installing it.