RealTest User Guide
RealTest User Guide

 

 

 

 

 

Category

Multi-Bar Functions

Description

Triple Exponential Moving Average

Syntax

TEMA(expr, count)

Parameters

expr - data series formula

count - lookback period

Notes

Count is usually thought of as an integer representing a number of bars, but can actually be any decimal value. An EMA is constructed by multiplying each difference between the result so far and the next value by a factor equal to 2 / (count + 1).

Triple EMA is calculated as 3 * EMA(expr, count) - 3 * EMA(EMA(expr, count)) + EMA(EMA(EMA(expr, count)))

Unlike the EMA function, TEMA applies the exponential weight factor from the start of available data rather than beginning with MA(expr, count). This is consistent with how other backtesting software calculates this indicator.

This function supports one-pass calculation when used in the Data Section with a non-variable count.

 

 

 

 

Copyright © 2020-2025 Systematic Solutions, LLC