Stochastic Overbought/Oversold Reversal (Python)
The strategy reacts to extreme levels of the Stochastic Oscillator. When the %K line dives into oversold territory the system expects a bounce, whereas overbought readings can foreshadow a drop. The m...
Install-Package StockSharp.Strategies.0062_Stochastic_Overbought_Oversold.py -Version 5.0.0
The strategy reacts to extreme levels of the Stochastic Oscillator. When the %K line dives into oversold territory the system expects a bounce, whereas overbought readings can foreshadow a drop. The method runs on short intraday candles so signals arrive quickly. After subscribing to the selected timeframe it monitors the %K and %D lines. A bullish setup forms when %K falls below 20 and then begins to recover. Conversely, a bearish setup appears if %K rallies above 80 and starts to turn down. A fixed percent stop controls risk for either side. Positions are exited when the %K line crosses back through the 50 level, signaling momentum has shifted toward the opposite direction. Because stops scale with the latest ATR, the trade size adapts to volatility.
Entry Criteria:
Long: %K < 20 with a bullish turn.
Short: %K > 80 with a bearish turn. []Long/Short: Both. []Exit Criteria: %K crossing 50 or stop-loss. []Stops: Yes, at 2% distance. []Default Values:
StochPeriod = 14
KPeriod = 3
DPeriod = 3
CandleType = 5 minute [*]Filters:
Category: Oscillator
Direction: Both
Indicators: Stochastic
Stops: Yes
Complexity: Basic
Timeframe: Intraday
Seasonality: No
Neural networks: No
Divergence: No
Risk level: Medium