How is TRIX calculated? Formula, inputs, and practical verification

TRIX calculation parameters inputs limitations verification.

What TRIX means before you calculate it

TRIX (often written as “TRIX”) is a trend indicator built from smoothed prices. The core idea is to reduce noise first, and then measure how fast the heavily smoothed value changes.

In many implementations, TRIX is expressed as a percentage rate of change. A key point is that TRIX is not a single magic number: its output depends on the input price series (for example, close), the smoothing length, and the period used to compute the change.

The TRIX formula (what you compute)

A common TRIX calculation uses the following steps.

Step 1: Build an exponential moving average (EMA)

Let P[t] be your chosen price at time t (for example, the close price). For a smoothing length n, the EMA is computed recursively:

  • EMA[t] = EMA[t−1] + α · (P[t] − EMA[t−1])
  • where α = 2 / (n + 1)

This gives you one EMA-smoothed series.

Step 2: Smooth again—EMA of an EMA

TRIX uses triple smoothing. So you apply EMA three times in a row:

  • EMA1[t] = EMA of P[t] with length n
  • EMA2[t] = EMA of EMA1[t] with length n
  • EMA3[t] = EMA of EMA2[t] with length n

After these three passes, EMA3[t] is the “triple-smoothed” value.

Step 3: Convert the triple-smoothed value into a rate of change

TRIX is commonly defined as a percentage rate of change of EMA3 over a TRIX period m:

  • TRIX[t] = 100 · (EMA3[t] − EMA3[t−m]) / EMA3[t−m]

Some platforms use a slightly different scaling (for example, returning the raw fraction instead of multiplying by 100). The essential mechanics remain: triple smoothing, then a relative change over m.

Inputs and parameter requirements (what data you need)

To calculate TRIX correctly, you need:

  1. A consistent price series P[t]
  • Choose the data field you want to smooth (commonly “close”).
  • Keep it consistent with how you later verify or compare against chart values.
  1. The smoothing length n
  • This controls how strongly the indicator smooths the input through each EMA pass.
  1. The TRIX change period m
  • This controls how far back you compare EMA3 to compute the rate of change.
  1. An initialization method
  • EMA recursion needs a starting EMA value. Many systems seed EMA with an initial average or use the first available value.
  • Different seed choices can cause early values to differ, even if later values converge.

If you want to independently verify any displayed TRIX, you must match these choices: price field, n, m, and (if applicable) how the EMA is initialized.

A simple worked example (with assumptions)

To keep the math concrete, suppose:

  • P[t] is a close-price series.
  • smoothing length n = 3, so α = 2 / (3 + 1) = 0.5.
  • TRIX period m = 1 (so you compare to the previous triple-smoothed value).

Assume you already have EMA1[t−1], EMA2[t−1], and EMA3[t−1] from the prior steps.

  1. Compute EMA1[t]:
  • EMA1[t] = EMA1[t−1] + 0.5 · (P[t] − EMA1[t−1])
  1. Compute EMA2[t]:
  • EMA2[t] = EMA2[t−1] + 0.5 · (EMA1[t] − EMA2[t−1])
  1. Compute EMA3[t]:
  • EMA3[t] = EMA3[t−1] + 0.5 · (EMA2[t] − EMA3[t−1])
  1. Compute TRIX[t] as percentage change of EMA3:
  • TRIX[t] = 100 · (EMA3[t] − EMA3[t−1]) / EMA3[t−1]

Material assumption: this uses m = 1. If m is greater than 1, the final step compares EMA3[t] to EMA3[t−m] instead.

Limitations and failure modes to expect

Several issues can make TRIX values look “wrong” even when your code is correct:

  1. Parameter mismatch
  • If another chart uses different n or m, the numbers will differ.
  1. Different price input
  • Smoothing “close” vs another field (such as a typical price) changes the output.
  1. Initialization differences
  • Early TRIX values can shift depending on how the EMA series is seeded.
  1. Division by small denominators
  • Because TRIX is a relative change, if EMA3[t−m] is very close to zero (possible with some data transformations), the percentage rate of change can become unstable.
  1. Over-smoothing vs responsiveness
  • Larger n tends to smooth more and can delay turning points; smaller n can retain more noise. This is a trade-off intrinsic to the smoothing mechanism.

Importantly, TRIX is an indicator derived from past price behavior. Its historical relationship does not guarantee future behavior; costs, execution, and market regime changes can alter what “trend change” means in practice.

How to verify TRIX independently

A reliable way to verify TRIX is to recompute it from the same data you used to read the indicator:

  • Step A: Collect the exact price series and confirm the field (for example, close).
  • Step B: Implement EMA with the chosen n and confirm α = 2/(n+1).
  • Step C: Apply EMA three times to obtain EMA3.
  • Step D: Compute TRIX as the percentage rate of change of EMA3 over m.
  • Step E: Compare several timestamps, especially after enough warm-up data has passed.

Warm-up matters: early values may differ due to EMA seeding. If your implementation matches the same definitions and you ignore the initial unstable region, the results should align closely.

If your values still diverge, the most common causes are parameter mismatch (n or m), different price inputs, or different EMA initialization.

If you are comparing indicators, ensure you are not mixing definitions. For example, some related momentum or trend measures may use one EMA pass or a different change formula. In that case, the output can look similar in direction but will not match numerically because the underlying smoothing and transformation steps differ.

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.