Stochastic
- Price
- High
- Low
14 candles · 1 · 3
- %K
- %D
- oversold
- overbought
Where the price sits in its range, 0–100. Shows where the close sits within the range of the last candles: 0 means at the lowest low, 100 at the highest high. Above 80 the price closes near the high (overbought), below 20 near the low (oversold). %K is this position, %D its average over a few candles and so the calmer signal line. The “oversold” and “overbought” outputs check %K against the thresholds you drag in the chart below the price. Example: “%K below 20” together with “%K crosses above %D” fires when the price turns up again in the oversold zone.
What it looks like
Section titled “What it looks like”- Price (close of each candle)
- %K
- %D, the signal line
- below 20 and above 80
- %K crosses above 20
Setting it in the chart
Section titled “Setting it in the chart”
The properties show the price of the last 150 candles at the top and Stochastic below it, with the zone between the thresholds. Drag a threshold or type it; the number in the field follows in whole steps. Dots on the price show where “oversold” or “overbought” would be true, the top line shows how often.
More under Chart below the price.
Settings
Section titled “Settings”The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.
Candles
Section titled “Candles”How many candles the highest high and the lowest low are taken from. 14 is the usual value. Fewer candles, such as 5, make the stochastic faster and jumpier, more candles calmer.
%K smoothing
Section titled “%K smoothing”How many candles %K is smoothed over. With 1 %K stays unsmoothed, the fast stochastic. With 3 you get the common slow stochastic, which gives fewer false signals.
%D signal line
Section titled “%D signal line”How many candles %K is averaged over to form the %D signal line, usually 3. When %K crosses %D, the momentum turns.
Oversold below
Section titled “Oversold below”When %K is below this line, the price closes near the low of its range, and the “oversold” output is true. 20 is usual.
Overbought above
Section titled “Overbought above”When %K is above this line, the price closes near the high of its range, and the “overbought” output is true. 80 is usual.
Example
Section titled “Example”Notifies you when %K rises from below 20 back above 20, so the price turns up out of the oversold zone.
How to connect the nodes:
- Candle (Price) → Stochastic (Price)
- Candle (High) → Stochastic (High)
- Candle (Low) → Stochastic (Low)
- Stochastic (%K) → Compare (Value)
- Compare (true/false) → Telegram (Trigger)
On the board it reads: 14 candles · 1 · 3
Chain as JSON
To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.
{ "name": "Example: Stochastic", "version": 1, "nodes": [ { "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } }, { "id": "s1", "type": "core.stoch", "position": { "x": 260, "y": 40 }, "settings": {} }, { "id": "k1", "type": "core.compare", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove", "value": 20 } }, { "id": "t1", "type": "core.telegram", "position": { "x": 700, "y": 40 }, "settings": {} } ], "edges": [ { "from": "c1.close", "to": "s1.close" }, { "from": "c1.high", "to": "s1.high" }, { "from": "c1.low", "to": "s1.low" }, { "from": "s1.k", "to": "k1.in" }, { "from": "k1.out", "to": "t1.in" } ]}Inputs and outputs
Section titled “Inputs and outputs”Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).
| Direction | Pin | Type | Note |
|---|---|---|---|
| Input | Price | Number series | required |
| Input | High | Number series | required |
| Input | Low | Number series | required |
| Output | %K | Number series | – |
| Output | %D | Number series | – |
| Output | oversold | Signal (true/false) | – |
| Output | overbought | Signal (true/false) | – |
Good to know
Section titled “Good to know”- In messages the values are called “Stoch %K 14”, “Stoch %D 14”.
- Warm-up with the default settings: 18 candles (this many extra candles are loaded by the replay before the value is reliable).
- Search also finds it under: stochastic, oscillator, overbought, oversold, momentum, %k, %d.
Technical details
Section titled “Technical details”%K as the SMA of 100 · (close − lowest low) / (highest high − lowest low) over the candles, %D as the SMA of %K, empty when high and low are equal; the same formula as TradingView’s built-in Stochastic with ta.stoch.
- Type in the chain:
core.stoch· Version 1.0.0 · Category keyind - Settings in the chain:
length(Candles),smooth(%K smoothing),signal(%D signal line),oversold(Oversold below),overbought(Overbought above) - Pins in the chain: Input
close,high,low· Outputk,d,oversold,overbought - Reference tests in the manifest: 3 (with fixed price data: 500 candles of 1h)
- How a node is built
Version 2026.10.21.23 · Changelog