> For the complete documentation index, see [llms.txt](https://indicators.agenatrader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://indicators.agenatrader.com/standard-indicators/keyreversalupatsma.md).

# KeyReversalUpAtSMA

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

KeyReversalUpAtSMA searches within a predefined number of periods to find turning points with the following characteristics:

1 The current close is higher than the previous close 2 The current low is smaller than or equal to the lowest low within n bars 3 The current low has touched or breached an SMA

See [*KeyReversalUp*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#keyreversalup), [*KeyReversalDown*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#keyreversaldown), [*KeyReversalDownAtSMA*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#keyreversaldownatsma), [*KeyReversalUpAtEMA*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#keyreversalupatema), [*KeyReversalDownAtEMA*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#keyreversaldownatema).

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

inSeries Input data series for the indicator period Number of bars included in the calculations SMAperiod Number of periods included in the calculation of the SMA

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

**double**

0 – No reversal information 1 – Reversal information found

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

```csharp
KeyReversalUpAtSMA(int period, int SMAperiod)
KeyReversalUpAtSMA(IDataSeries inSeries, int period, int SMAperiod)
KeyReversalUpAtSMA(int period, int SMAperiod)[int barsAgo]
KeyReversalUpAtSMA(IDataSeries inSeries, int period, int SMAperiod)[int barsAgo]
```

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

```csharp
// Look for a long entry
if (KeyReversalUpAtSMA(10)[0] == 1)
Print("A long reversal formation has occurred.");
```
