# PercentEnvelopes

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

The Percent Envelopes indicator draws an upper and a lower band around a predefined value with a distance of a specified percentage value. The trader can specify which data series the entry value should be (highs, lows, closing price, another indicator etc.).

It is possible to use an SMA as the entry value. In this case, the upper and lower bands will be displayed with a distance of 1.5%.

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

Similarly to the Bollinger Bands, the Percent Envelope indicator can be used to make buy or sell decisions and to determine whether the price is under- or overvalued.

The Percent Envelope should never be used to make decisions based solely on the output, but should be used in conjunction with other indicators to confirm signals.

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

```csharp
PercentEnvelopes(double percent)
PercentEnvelopes(IDataSeries inSeries, double percent)

//For the upper band
PercentEnvelopes(double percent).UpperPercentBand[int barsAgo]
PercentEnvelopes(IDataSeries inSeries, double percent).UpperPercentBand[int barsAgo]

//For the lower band
PercentEnvelopes(double percent).LowerPercentBand[int barsAgo]
PercentEnvelopes(IDataSeries inSeries, double percent).LowerPercentBand[int barsAgo]
```

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

**double**

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

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

inSeries Input data series for the indicator

percent Difference in % for the bands (from the input value)

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

![PercentEnvelopes](https://agenatrader.github.io/AgenaIndicator-documentation/media/PercentEnvelopes.jpg)

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

```csharp
//Output for the upper band
Print("Value of the upper percent band is: " + PercentEnvelopes(3).UpperPercentBand[0]);

//Output for the lower band
Print("Value of the lower percent band is: " + PercentEnvelopes(3).LowerPercentBand[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/percentenvelopes.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.
