Skip to content
ChartRiderDocs
Docs/Indicators/Stochastic %D

Stochastic %D

The %D line of the stochastic oscillator on its own: a moving average of where the close sits within the recent high-low range, from 0 to 100.

Updated ·Markdown

What you see

One line in its own pane plus two horizontal reference lines at 80 and 20. The pane scales to the lowest and highest %D of the visible candles, so the 80 and 20 lines move with the scale and can lie outside the pane. Green and red lines mark divergences between price and %D.

How it is calculated

  1. %K = 100 × (close − LL) / (HH − LL), where HH and LL are the highest high and lowest low of the last Period %K candles, the current one included. If HH equals LL, %K is 0.
  2. Smoothed %K: simple average of %K over Period Smoothing candles (1 = no smoothing).
  3. %D: simple average of the smoothed %K over Period %D candles.

With the defaults, %D is the 3-candle average of a 9-candle %K. Divergences compare %D with the close, using Period %K as the swing window and the same rules as the RSI.

How to read it

  • Above 80 the close has been near the top of its recent range (overbought), below 20 near the bottom (oversold). In trends it can stay there.
  • %D is smoother than %K, so it turns later but with fewer false turns. To see %K and %D together, use the Stochastic.
  • The classic signals are turns back out of the 80 and 20 zones, and divergences.

Using it in strategies

Output: value (%D, 0 to 100). In the Trade Setup, "Against" with center 50 and x −30 allows longs only at 20 or lower and shorts only at 80 or higher; "Compare" checks a level. In WickScript the built-in stoch(length, smoothK, smoothD) returns .k and .d, so stoch(9, 1, 3).d is this line; or use use indicator "StochD" with period 9, periodD 3 as sd and read sd.value.

Settings

Open the settings with the slider icon next to the indicator (Indicators, F3). Numeric settings can be swept as Step 1 / Step 2 parameters when you run a strategy.

Inputs

SettingTypeDefaultDescription
Period %KNumber9Candles for the high-low range of %K. Also the swing window for divergence detection. (min 1)
Period %DNumber3Candles in the simple average that turns the smoothed %K into %D. (min 1)
Period SmoothingNumber1Candles in the simple average applied to %K before %D is calculated (1 = raw %K). (min 1)
HeightNumber70Height of the pane in pixels. (min 10)
Look Back RangeNumber2Candles after a swing point that are checked before the swing counts for a divergence. Higher values give fewer, later divergences. (min 1)

Styles

SettingTypeDefaultDescription
Line ColorColor#0f6347
Line Color overboughtColor#630F0FColor of the reference line at 80.
Line Color OversoldColor#210F63Color of the reference line at 20.

Outputs

These values can be used in Trade Setup triggers, filters and exits (see Trade Setup) and in WickScript.

OutputIn WickScriptDescription
valuevalue

Use in WickScript

use indicator creates this indicator inside a script, with settings by their ID. Each output is a field of the name after as. See WickScript indicators.

WickScript
wickscript 1
indicator "Stochastic %D from the list" in pane
use indicator "StochD" with period 9 as myStochd
show myStochd.value as line "value"

Generated from the ChartRider source code on every release – settings, outputs and the WickScript reference always match the app.

Imprint·Privacy·Contact·Changelog·llms-full.txt

Paper trading uses play money only. Nothing in these docs is investment advice.