> For the complete documentation index, see [llms.txt](https://docs.itradingbot.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itradingbot.net/en/signals-and-strategy-conditions/indicators/stochastic-oscillator-stoch.md).

# Stochastic Oscillator STOCH

<mark style="color:$tint;">Stochastic compares the closing price with the price range for the selected period and calculates the %K and %D lines. The ISignal STOCH card uses these lines to enter and exit.</mark>

### Fill in the settings

<mark style="color:$tint;">Add the indicator Stochastic to the desired block. The instrument is out of the question. Select</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**The TF**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">and Candle Type, then enter three integer values:</mark>

* <mark style="color:$tint;">Period %K number of bars for the original stochastic calculation.</mark>
* <mark style="color:$tint;">**Smoothing factor**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">smoothing period of line %K.</mark>
* <mark style="color:$tint;">% D period smoothing period for line % D.</mark>

<mark style="color:$tint;">Each of the three fields has values from 2 to 50. The new card is defaulted to 14, 3 and 3, respectively. These values are not a trade recommendation.</mark>

<mark style="color:$tint;">Select</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**Calculation**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">in the Bar Closing or Intersection (secondly). The second mode checks the bar that is forming, so the signal may be different from the closed bar checking.</mark>

### Check the direction of the intersection

<mark style="color:$tint;">When the Reverse is turned off, two conditions apply:</mark>

* <mark style="color:$tint;">Long signal: %K was below %D, and now it's either equal to or higher.</mark>
* <mark style="color:$tint;">Shortcut: %K was above %D, and now it's either equal to or below.</mark>

<mark style="color:$tint;">Just finding lines at the top or bottom of the scale isn't enough. This card has no separate channel boundaries: this stochastic filter is added with another card. The reverse switch changes the direction of the signals in places.</mark>

### Use the signal in the correct block

<mark style="color:$tint;">For the entry, the long signal is suitable for the long task, the short is short. In the reverse-free exit block, the short signal serves as a condition for closing the long, and the long is a condition for closing the short.</mark>

<mark style="color:$tint;">The exit action is set in the field</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**When the signal is received**</mark><mark style="color:$tint;">. The deviation mode depends on the robot's configuration and type; the final profit is not guaranteed.</mark>

<mark style="color:$tint;">Keep the card and check its role and parameters in the task. The storage and reaction procedures are described in</mark> [<mark style="color:$tint;">The ISignal instructions</mark>](/en/signals-and-strategy-conditions/isignal-entry-filters-and-exit.md)<mark style="color:$tint;">. The appropriate signal must pass the rest of the task check, and the order sent must be executed on the exchange.</mark>
