IIndicatorsAccessor.TripleExponentialMovingAverage
method · IIndicatorsAccessor · cAlgo.API.Internals
DesktopCLICloud
The Triple Exponential Moving Average (TEMA) is a technical indicator that provides a smoothed representation of price data by applying three levels of exponential smoothing
Definition
TripleExponentialMovingAverage TripleExponentialMovingAverage(DataSeries source, int periods)
api.Indicators.TripleExponentialMovingAverage(source: DataSeries, periods: int) -> TripleExponentialMovingAverage
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
source | DataSeries | DataSeries | The source data used for calculation. |
periods | int | int | The periods used for the calculation. |
Returns TripleExponentialMovingAverage — The TEMA indicator instance.
Examples
var tema = Indicators.TripleExponentialMovingAverage(Bars.ClosePrices, 20);
Print("TEMA(20): {0}", tema.Result.LastValue);
tema = api.Indicators.TripleExponentialMovingAverage(api.Bars.ClosePrices, 20)
api.Print(f"TEMA(20): {tema.Result.LastValue}")