# Relative Strength Index (RSI)

#### Description <a href="#description_96" id="description_96"></a>

J. Welles Wilder, the creator of several indicators, also developed the RSI, which is one of the most popular, useful momentum oscillators. It compares the size of the most recent profits with the size of the most recent losses, which means that it assesses the relationships between the up and down closing prices. The values are shown between 0 and 100.

#### Interpretation <a href="#interpretation_46" id="interpretation_46"></a>

Traditionally, and according to Wilder, RSI is considered overbought when above 70 and oversold when below 30. Signals can also be generated by searching for divergences, failure swings and centerline crossovers. RSI can also be used to identify the general trend. These traditional levels can also be adjusted to better fit the security or analytical requirements. Raising overbought to 80 or lowering oversold to 20 will reduce the number of overbought/oversold readings. Short-term traders sometimes use 2-period RSI to look for overbought readings above 80 and oversold readings below 20.

#### Further information <a href="#further-information_35" id="further-information_35"></a>

<http://technische-analyse.eu/index.php?title=RSI>

#### Usage <a href="#usage_92" id="usage_92"></a>

```csharp
RSI(int period, int smooth)
RSI(IDataSeries inSeries, int period, int smooth)
RSI(int period, int smooth)[int barsAgo]
RSI(IDataSeries inSeries, int period, int smooth)[int barsAgo]

//For the average value
RSI(int period, int smooth).Avg[int barsAgo]
RSI(IDataSeries inSeries, int period, int smooth).Avg[int barsAgo]
```

#### Return value <a href="#return-value_90" id="return-value_90"></a>

**double**

When using this method with an index (e.g. **RSI**(14,3)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_83" id="parameters_83"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

smooth Number of periods for the smoothing

#### Visualization <a href="#visualization_87" id="visualization_87"></a>

![Relative Strength Index (RSI)](https://agenatrader.github.io/AgenaIndicator-documentation/media/RSI.jpg)

#### Example <a href="#example_87" id="example_87"></a>

```csharp
//Output for the RSI
Print("The current value for the RSI is: " + RSI(14, 3)[0]);

//Output for the average line
Print("The current value for the AVG line is: " + RSI(14, 3).Avg[0]);
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/relative-strength-index-rsi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
