STOCHASTIC P Trading Guide
Last updated: July 22, 2026
The Stochastic (P) is a quantitative technical analysis tool. STOCHASTIC_P Ported from legacy klinecharts indicator: old/assets/indicators/stochastic_p.js Classic Stochastic oscillator (0..100) with %K and %D lines.
What does the indicator show?
- Market Structure & Momentum: Visualizes prevailing trend directions and key reversal zones.
- BUY / SELL Signals: Highlights confirmed entry and exit opportunities based on quantitative rules.
- Dynamic Boundaries: Provides adaptive levels for managing trade risk and reward expectations.
Key Settings
- %K Length (
kLen): Controls the calculation period and sensitivity for market detection. - %K Smoothing (
kSmooth): Controls the calculation period and sensitivity for market detection. - %D Smoothing (
dSmooth): Controls the calculation period and sensitivity for market detection. - %K (
k): Controls the calculation period and sensitivity for market detection. - %D (
d): Controls the calculation period and sensitivity for market detection. - Upper (80) (
h80): Controls the calculation period and sensitivity for market detection. - Middle (50) (
h50): Controls the calculation period and sensitivity for market detection. - Lower (20) (
h20): Controls the calculation period and sensitivity for market detection. - %K (
k): Controls the calculation period and sensitivity for market detection. - %D (
d): Controls the calculation period and sensitivity for market detection. - %K Prev (
kPrev): Controls the calculation period and sensitivity for market detection. - %K Delta (
kDelta): Controls the calculation period and sensitivity for market detection.
How to use Strategy Parameters (Condition Source)
Within the Strategy Tester module, this indicator can be used both as a direct signal source and as a market-state filter.
1. Signal Events
buySignal- Fires when a bullish market condition is confirmed.sellSignal- Fires when a bearish market condition is confirmed.signalDir- Outputs1for bullish,-1for bearish, and0when neutral.
2. Filters and Trade Levels
kLen- %K Length value used for structural qualification or thresholds.kSmooth- %K Smoothing value used for structural qualification or thresholds.dSmooth- %D Smoothing value used for structural qualification or thresholds.k- %K value used for structural qualification or thresholds.d- %D value used for structural qualification or thresholds.h80- Upper (80) value used for structural qualification or thresholds.h50- Middle (50) value used for structural qualification or thresholds.h20- Lower (20) value used for structural qualification or thresholds.k- %K value used for structural qualification or thresholds.d- %D value used for structural qualification or thresholds.kPrev- %K Prev value used for structural qualification or thresholds.kDelta- %K Delta value used for structural qualification or thresholds.
Strategy Example: Enter Long when buySignal is true and trendFilter == 1, ensuring trades align with dominant momentum.