Skip to content

TripleExponentialMovingAverage

interface cAlgo.API.Indicators

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

public interface TripleExponentialMovingAverage

Namespace: cAlgo.API.Indicators · Group: Indicators · Implements: MovingAverage, StandardIndicator

Examples

private TripleExponentialMovingAverage _tema;

protected override void OnStart()
{
    _tema = Indicators.TripleExponentialMovingAverage(Bars.ClosePrices, 21);
}

protected override void OnBar()
{
    if (Bars.ClosePrices.Last(1) > _tema.Result.Last(1))
        Print("Close is above TEMA: {0}", _tema.Result.Last(1));
}
def on_start(self):
    self.tema = api.Indicators.TripleExponentialMovingAverage(api.Bars.ClosePrices, 21)

def on_bar(self):
    if api.Bars.ClosePrices.Last(1) > self.tema.Result.Last(1):
        api.Print(f"Close is above TEMA: {self.tema.Result.Last(1)}")

Inherited members

From MovingAverage: Result

From StandardIndicator: AddToChart, Symbol, TimeFrame, Bars