IIndicatorsAccessor.Envelopes
method · IIndicatorsAccessor · cAlgo.API.Internals
DesktopCLICloud
The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.
Overloads
| Signature |
|---|
Envelopes(int periods, MovingAverageType maType, double deviation) |
Envelopes(DataSeries source, int periods, MovingAverageType maType, double deviation) |
Envelopes(int periods, MovingAverageType maType, double deviation)
The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.
Envelopes Envelopes(int periods, MovingAverageType maType, double deviation)
api.Indicators.Envelopes(periods: int, maType: MovingAverageType, deviation: float) -> Envelopes
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
periods | int | int | The periods used in the calculation. |
maType | MovingAverageType | MovingAverageType | Moving Average Type |
deviation | double | float | The distance from the moving average in percents |
Returns Envelopes — Envelopes indicator instance
Examples
var envelopes = Indicators.Envelopes(20, MovingAverageType.Simple, 0.1);
Print("Envelopes upper: {0}, main: {1}, lower: {2}", envelopes.Upper.LastValue, envelopes.Main.LastValue, envelopes.Lower.LastValue);
envelopes = api.Indicators.Envelopes(20, MovingAverageType.Simple, 0.1)
api.Print(f"Envelopes upper: {envelopes.Upper.LastValue}, main: {envelopes.Main.LastValue}, lower: {envelopes.Lower.LastValue}")
Envelopes(DataSeries source, int periods, MovingAverageType maType, double deviation)
The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.
Envelopes Envelopes(DataSeries source, int periods, MovingAverageType maType, double deviation)
api.Indicators.Envelopes(source: DataSeries, periods: int, maType: MovingAverageType, deviation: float) -> Envelopes
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
source | DataSeries | DataSeries | The source data used for calculation. |
periods | int | int | The periods used in the calculation. |
maType | MovingAverageType | MovingAverageType | Moving Average Type |
deviation | double | float | The distance from the moving average in percents |
Returns Envelopes — Envelopes indicator instance
Examples
var envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);
if (Symbol.Bid > envelopes.Upper.LastValue)
Print("Bid is above the upper envelope {0}", envelopes.Upper.LastValue);
envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)
if api.Symbol.Bid > envelopes.Upper.LastValue:
api.Print(f"Bid is above the upper envelope {envelopes.Upper.LastValue}")