> For the complete documentation index, see [llms.txt](https://docs.stockhero.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stockhero.ai/technical-indicators/stoch-rsi.md).

# Stoch RSI

Stochastic RSI, or Stoch RSI, is a derivative of the Relative Strength Index (RSI). It is a momentum oscillator type of technical indicator. It oscillates between 0-100 values. RSI values closer to 0 indicate oversold market conditions, while values closer to 100 indicate overbought conditions.&#x20;

{% hint style="info" %}
StockHero Stoch RSI: a buy signal is generated when Stoch RSI is oversold, a sell signal is generated when Stoch RSI is overbought.
{% endhint %}

![](https://4210655246-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M5LiMstpewrLGU6auaX%2F-M64F4B3n4bQbn0XA8jk%2F-M64NAGVQ-aWiQ3388gs%2FScreenshot%202020-04-29%20at%205.59.30%20PM.png?alt=media\&token=876d077e-6edf-45b3-9c86-66495b60a963)

Stochastic RSI values (red and blue lines) closer to 0 indicate overbought market conditions, while values closer to 100 indicate oversold conditions. Thresholds (yellow band) are usually assigned to Stochastic RSI values; anything below 20 indicates oversold, while values above 80 can indicate overbought. For time periods and trading intervals, lower thresholds may be used as a measure to reduce market noise or to produce a more confident signal.

```
RSI = 100 – 100/ (1 + RS)
RS = Average Gain of n days UP  / Average Loss of n days DOWN

Stoch RSI = (RSI - Lowest Low RSI) / (Highest High RSI - Lowest Low RSI)

Where:
n = Time Period
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stockhero.ai/technical-indicators/stoch-rsi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
