Skip to content

IIndicatorsAccessor.Trix

method · IIndicatorsAccessor · cAlgo.API.Internals

DesktopCLICloud

The Trix indicator shows the slope of a triple-smoothed exponential moving average.

Definition

Trix Trix(DataSeries source, int periods)
api.Indicators.Trix(source: DataSeries, periods: int) -> Trix

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 Trix — The Trix indicator instance.

Examples

var trix = Indicators.Trix(Bars.ClosePrices, 15);
Print("Trix(15) of the last closed bar: {0}", trix.Result.Last(1));
trix = api.Indicators.Trix(api.Bars.ClosePrices, 15)
api.Print(f"Trix(15) of the last closed bar: {trix.Result.Last(1)}")