TEMA combines three successive EMA stages as 3×EMA1−3×EMA2+EMA3. The subtraction changes its response and can produce overshoot. This guide follows that calculation on real Forex quotes, compares starting conventions and separates an indicator reading from a tested trading strategy.
1. Follow the three stages
EMA1 smooths the completed close. EMA2 smooths EMA1, and EMA3 smooths EMA2. TEMA then combines all three; it is neither EMA3 nor an EMA with a period divided by three. These lines share the same price history, so they are not independent confirmations.
The signed coefficients compensate for part of the smoothing delay but do not predict the next candle. The ordering of price, EMA, DEMA and TEMA can change. TEMA need not be the closest line to price on every candle.
2. Calculate TEMA and distinguish it from DEMA
C[t] is the completed H1 close and N counts recorded bars. Each stage uses α=2/(N+1), the same N and no horizontal shift. Calculate the stages in order, using the newly calculated value of the preceding stage at that same timestamp.
DEMA uses only the first two stages: 2×EMA1−EMA2. Therefore TEMA−DEMA=EMA1−2×EMA2+EMA3. This difference can be positive, negative or zero; TEMA is not obtained by smoothing DEMA once more.
α = 2 / (N + 1) EMA1[t] = α × C[t] + (1−α) × EMA1[t−1] EMA2[t] = α × EMA1[t] + (1−α) × EMA2[t−1] EMA3[t] = α × EMA2[t] + (1−α) × EMA3[t−1] DEMA[t] = 2 × EMA1[t] − EMA2[t] TEMA[t] = 3 × EMA1[t] − 3 × EMA2[t] + EMA3[t] TEMA[t] − DEMA[t] = EMA1[t] − 2 × EMA2[t] + EMA3[t]
3. Compare the lines on real candles
The first example shows price, EMA1, DEMA and TEMA on one scale. The table also gives EMA2 and EMA3 so you can reconstruct both formulas. The explorer can switch to the individual EMA stages. One pip here is 0.01 JPY per USD.
At the selected close, Close>TEMA20>DEMA20>EMA1(20). This describes that candle, not a permanent ordering or a profitable entry. A separate trading test would need execution, risk and exit rules, together with costs.
EMA1, DEMA and TEMA on the same candles

Interval end · UTC: 2024-02-02T14:00:00Z · Close: 147.950
| Initialization method | EMA1(20) | EMA2(20) | EMA3(20) | DEMA(20) | TEMA(20) |
|---|---|---|---|---|---|
| First retained close | 146.664690 | 146.577852 | 146.694621 | 146.751528 | 146.955135 |
| Staged SMA | 146.664690 | 146.577852 | 146.694621 | 146.751528 | 146.955135 |
4. Recognize overshoot and define a fresh cross
The second example shows TEMA20 above the highest closing price recorded from the start of this retained dataset through the selected candle. The horizontal reference is that running maximum of closes. It is not the highest intrahour price, and it makes no claim about prices before the dataset begins. The subtraction in TEMA allows this overshoot.
A fresh upward cross requires C[t−1]≤TEMA[t−1] and C[t]>TEMA[t]; a downward cross requires C[t−1]≥TEMA[t−1] and C[t]<TEMA[t]. Remaining above the line is not another cross. Labels use unrounded values and require two complete, adjacent hours with available TEMA values. Repeated crosses can occur; the chart assigns no trade or profit to them.
TEMA above the highest retained close

Interval end · UTC: 2024-02-08T18:00:00Z · Close: 149.360
| Initialization method | EMA1(20) | EMA2(20) | EMA3(20) | DEMA(20) | TEMA(20) |
|---|---|---|---|---|---|
| First retained close | 148.874618 | 148.467546 | 148.248169 | 149.281689 | 149.469383 |
| Staged SMA | 148.874618 | 148.467546 | 148.248169 | 149.281689 | 149.469383 |
5. Check initialization at the third stage
The main method starts all three EMA stages at the first retained close. The alternative starts EMA1 with the mean of N closes, EMA2 with the mean of its first N available EMA1 values, then EMA3 with the mean of its first N available EMA2 values. Their first recorded bars are N, 2N−1 and 3N−2.
For N=20, the third stage and TEMA first become available on bar 58. The third example compares both methods there. With N=50 at the same candle, EMA1 is available while EMA2, EMA3 and TEMA are still unavailable. Startup effects fade with more observations, but no universal warm-up count guarantees identical terminal values.
Same history, three stages and two seeds

Interval end · UTC: 2024-01-04T08:00:00Z · Close: 143.370
| Initialization method | EMA1(20) | EMA2(20) | EMA3(20) | DEMA(20) | TEMA(20) |
|---|---|---|---|---|---|
| First retained close | 143.231584 | 142.835537 | 142.402432 | 143.627631 | 143.590574 |
| Staged SMA | 143.230946 | 142.832098 | 142.365885 | 143.629794 | 143.562429 |
6. Compare periods and retained history
Periods 10, 20 and 50 are fixed illustrations, not settings optimized for profit. Changing N affects all three stages. Keep the candle fixed when comparing periods. The staged-SMA TEMA begins on bars 28, 58 and 148 respectively.
Every retained close updates the stages once, including a partial hour. States carry across gaps without invented candles or resets; 20 recorded H1 bars need not cover 20 consecutive clock hours. MetaTrader 5 documents a built-in TEMA. For an MT4 custom indicator, check the implementation, applied price, three seeds, history and shift before comparing values.
7. Explore the candles and components
Choose a period, initialization method and set of visible lines. Move the slider or use Previous and Next. The chart ends at the selected candle; the table compares all three periods at that timestamp. Example buttons restore period 20, first-close initialization and the comparison view.
The examples follow chronological rules: the first eligible Close>TEMA>DEMA>EMA1 configuration with TEMA−DEMA≥1 pip, then the first eligible TEMA above the running close maximum by more than 1 pip. Each requires at least 500 prior recorded bars and a complete, consecutive 64-hour display window. The initialization example is bar 58. These are disclosed illustration rules, not a convergence guarantee or a search for winning trades.
Loading historical candles…
Early history: starting values can still affect the averages. The main examples use at least 500 prior recorded candles.
- Interval end · UTC
- —
- OHLC · JPY per USD
- —
- Close
- —
- EMA1
- —
- EMA2
- —
- EMA3
- —
- DEMA
- —
- TEMA
- —
- Highest retained close so far
- —
- TEMA − DEMA · pip
- —
- Close minus TEMA · pip
- —
- TEMA change · pip
- —
- First-close TEMA minus SMA-seeded TEMA · pip
- —
- Observed minute bars
- —
- Hour completeness
- —
- Gap before this hour
- —
- Recorded bars from history start
- —
- Gaps in retained history
- —
- Partial hours in retained history
- —
- Fresh price cross
- —
Same candle · periods 10 / 20 / 50
| Period · recorded bars | EMA1 | EMA2 | EMA3 | DEMA | TEMA | Close − TEMA · pip |
|---|
Frequently asked questions
Is TEMA the same as EMA3?
No. EMA3 is the third smoothed component. TEMA combines the stages as 3×EMA1−3×EMA2+EMA3.
Does TEMA always react better than DEMA?
There is no universal advantage. TEMA can respond more strongly, overshoot and cross price repeatedly. Responsiveness alone does not demonstrate profitability.
Why can TEMA exceed the recorded closing prices?
Its coefficients include subtraction. TEMA is not constrained to be a positive-weight average bounded by those closes. This does not predict a future price.
When does staged-SMA TEMA20 first exist?
Under this guide’s convention, EMA1 starts on bar 20, EMA2 on bar 39 and EMA3 on bar 58. TEMA20 first exists on bar 58.
Why can two platforms show different TEMA values?
Compare price input, period, all three initialization rules, history start, missing bars, rounding and horizontal shift. The indicator name alone is insufficient.
Are these real candles and a trading backtest?
The candles come from retained historical Forexite quotes. This is a reproducible indicator guide; no trades, execution results or trading returns are simulated.
Data, calculation choices and scope
The guide reuses 375,702 retained USD/JPY minute observations from Forexite’s 2024 Trade/MetaStock daily archives. Fixed GMT+1 labels are shifted back one hour to UTC. Minute labels are treated as interval ends; hourly buckets are (start,end]. These are stated reconstruction choices, not a guarantee of every broker’s candle convention.
The dataset has 6,265 recorded H1 intervals, ending from 2024-01-01 23:00 UTC to 2024-12-31 23:00 UTC: 6,178 complete hours, 87 partial hours and 52 gaps before recorded hours. The chart breaks lines across gaps. Reference quotes do not supply a complete bid/ask execution path or establish terminal equivalence.
The CSV contains the hourly candles and all five components for both initialization methods and periods 10/20/50. The method ZIP includes retained minute inputs, original archive URLs and checksums, calculation code and verification results. This release checks the retained inputs and independently rebuilds the hours and calculations; it does not claim a new download and reparse of the original daily ZIP archives.
