How to Use the TRIX Indicator: Lag, Formula, Settings
How to use the TRIX indicator: the formula, the lag measured in bars, the periods published as standard, and why your chart may draw no signal line.
Read TRIX for the direction of a triple-smoothed average, and expect the reading to arrive late. On a straight-line series that rises 0.1 a bar for 400 bars and then falls 0.1 a bar for 400 bars, TRIX crossed zero 16 to 24 bars after the turn depending on the period, which is more bars than the period you chose.
MetaTrader's help page describes TRIX as having an "absence of lag that is so typical of most moving averages". Our own arithmetic says otherwise.
How do you use the TRIX indicator?
As a slow confirmation of direction, read on a closed bar, with the delay written into your rule rather than discovered later.
TRIX is positive while the triple-smoothed average is rising and negative while it is falling, so the zero line marks a direction change rather than a level. The triple smoothing means a single strong bar will not flip it, which is the point of the indicator. The cost is the delay.
On that straight-line series, where the turn sits at a known bar and no noise is left to argue about, the bar where TRIX first goes negative lands here:
| TRIX period | Bars after the price turn before TRIX crosses zero |
|---|---|
| 12 | 16 |
| 14 | 18 |
| 15 | 20 |
| 18 | 24 |
At every period published as a standard setting, the lag is larger than the period, and it grows as the period grows. A MACD(12,26) line on the same series crossed zero 15 bars after the turn.
The textbook check agrees. One exponential moving average has a mean lag of (n - 1) / 2 bars, so three stacked gives 3(n - 1) / 2, which is 21 bars at a period of 15. The measured 20 sits right next to it.
That is arithmetic on a straight line rather than a measurement of any market, so a noisy series will not give the same figures. It establishes the direction and the rough size of the delay, and that your setting decides both. Use TRIX to tell you what has already turned. On an instrument that turns sharply, a signal 20 bars late can arrive after the move it was describing.
What is the TRIX indicator?
The one-bar percentage change of an exponential moving average of an exponential moving average of an exponential moving average. Three stacked EMAs, then the rate of change of the result.
StockCharts gives the attribution: "It was developed in the early 1980's by Jack Hutson, an editor for Technical Analysis of Stocks and Commodities magazine." TRIX stands for Triple Exponential Average, which is the name it carries in most indicator menus. ChartLabs is one of them: the Indicators menu prints Triple Exponential Average, in the Standard list under Momentum & Oscillators, and the four letters TRIX appear nowhere in the menu itself. It opens in its own pane below price, and its settings panel labels the two periods Length and MA Length.
The Triple Exponential Average is not the Triple Exponential Moving Average. They are two different indicators.
What is the TRIX formula?
Four steps. StockCharts' version, written here for a 15-period TRIX:
1. EMA1 = 15-period EMA of the closing price
2. EMA2 = 15-period EMA of EMA1
3. EMA3 = 15-period EMA of EMA2
4. TRIX = 1-period percentage change in EMA3, x 100
EduCBA's version of step 4 keeps the multiplier, and in our notation it reads TRIX = [(EMA3 - EMA3_previous) / EMA3_previous] x 100.
The warning that matters more than the formula is the x 100. It is missing from several widely published versions, and leaving it out changes every number on your screen by a factor of a hundred. HowToTrade's is the bare ratio, which in our notation is TRIX = ( EMA3 [today] - EMA3 [yesterday] ) / EMA3 [yesterday], and MetaTrader's own help page prints the same thing: TRIX(i) = (EMA3(i) - EMA3(i - 1))/ EMA3(i-1).
So the same indicator name covers values that are a hundred times apart. Copy a threshold from an article into a chart drawn by the other version and you are off by two decimal places. No threshold on TRIX travels: before you use a number someone else published, check which scale their line was drawn on. Ours carries the x 100, so the values on a ChartLabs pane read as percentages.
A worked example with round numbers
Period 3, so each smoothing's delay shows up within a few rows. Price rises by 1 a bar to a single peak at bar 6, then falls by 1.
| Bar | Price | EMA1 | EMA2 | EMA3 | TRIX % |
|---|---|---|---|---|---|
| 1 | 100 | 100.0000 | 100.0000 | 100.0000 | - |
| 2 | 101 | 100.5000 | 100.2500 | 100.1250 | +0.1250 |
| 3 | 102 | 101.2500 | 100.7500 | 100.4375 | +0.3121 |
| 4 | 103 | 102.1250 | 101.4375 | 100.9375 | +0.4978 |
| 5 | 104 | 103.0625 | 102.2500 | 101.5938 | +0.6502 |
| 6 | 105 | 104.0312 | 103.1406 | 102.3672 | +0.7613 |
| 7 | 104 | 104.0156 | 103.5781 | 102.9727 | +0.5915 |
| 8 | 103 | 103.5078 | 103.5430 | 103.2578 | +0.2769 |
| 9 | 102 | 102.7539 | 103.1484 | 103.2031 | -0.0530 |
| 10 | 101 | 101.8770 | 102.5127 | 102.8579 | -0.3345 |
| 11 | 100 | 100.9385 | 101.7256 | 102.2917 | -0.5504 |
| 12 | 99 | 99.9692 | 100.8474 | 101.5696 | -0.7060 |
Follow the three EMA columns down and the delay accumulates one layer at a time. Price peaks at bar 6. EMA1 turns down at bar 7, EMA2 at bar 8, EMA3 at bar 9, so TRIX goes negative at bar 9: three bars after the price peak, at a period of only 3.
That is StockCharts' sentence made visible: "Even though exponential moving averages put more weight on recent data, they still contain past data that produces a lag. This lag increases with each smoothing."
On a series moving a full point a bar, the readings stay inside plus or minus one. The scale of the line is tiny next to price, which is another reason a borrowed threshold is worth nothing.
Does TRIX lag?
Yes, by more bars than the period you set, and the references split on it.
StockCharts says so of its own worked example: "In the absence of a strong move, the lag from the triple-smoothed EMA results in late signals that produce losses." HowToTrade lists it as the main drawback: "it is a lagging indicator."
MetaTrader's help page says the opposite: "The distinctive feature of the indicator is the perfect filtration of price noises and absence of lag that is so typical of most moving averages." The filtration half is fair. The absence of lag is not.
EduCBA argues both sides. It writes "Each level of smoothing reduces noise but also introduces more lag", then lists as a benefit "Built-in lag reduction: While smoothing introduces lag, the percentage rate-of-change component helps mitigate it." Taking the one-bar difference of a delayed series tells you which way that delayed series is moving. It does not move the series forward in time. The worked table was computed on exactly that quantity, and the lag is still in it.
What are the best TRIX settings?
There is no single standard. 12, 14, 15 and 18 are all published as the period to use, and the vendor help page documents no default at all.
- 15 for the TRIX line with 9 for the signal line. StockCharts: "The standard setting for TRIX is 15 for the triple smoothed EMA and 9 for the signal line." WallStreetMojo agrees and says which number is which: "The standard TRIX setting is 15 and 9 for triple-smoothed EMAs and the signal line, respectively." GoCharting says the period is "commonly set to 15 periods".
-
- IncredibleCharts: "The default TRIX window is 12 days", under its own setup heading.
-
- TrendSpider: "Typically, n is set to 14, but traders can adjust the value based on their preferences." HowToTrade: "a common practice is to use a 14-period TRIX indicator." WallStreetMojo's own calculation steps use a 14-period EMA three times over, one screen after its settings section says 15 and 9.
-
- HowToTrade, reporting another platform's default: "The TRIX indicator that comes with the TradingView charting software has a default setting of an 18-period."
- 7, 12 or 21, offered as tuning advice. EduCBA: "Experiment with 7, 12, or 21 periods based on volatility." Its own worked calculation uses 15.
Where a signal line is published at all, it is a 9-period EMA of TRIX. The nearest thing to a first-party number in MetaTrader's documentation is a sample in its developer reference that sets input int ma_period=14; // period, which is one value chosen for one example.
On a ChartLabs chart the default is a 12-period TRIX with a signal line, and the signal line is a 9-period simple moving average of TRIX rather than an exponential one. At a period of 12, the zero-line cross on the straight-line series arrives 16 bars after the turn. Every one of those numbers is changeable in the indicator's settings.
The setting decides the lag. Changing the period changes how late every signal arrives, by roughly the amounts in the lag table. Pick one, write it down, and test that one. Changing it later gives you a new test on the same dates, not a continuation of the old one.
On short timeframes there is a disagreement. GoCharting says "Do not use TRIX for short-term day trading", while EduCBA's FAQ answers "Can TRIX be used for intraday trading?" with "Yes. Use shorter periods (e.g., 9) and confirm with volume or price action." Neither has a test behind it. The table does say that a shorter period means a shorter lag, and that part you can check yourself.
Why is there no signal line on my TRIX?
Because some built-in versions draw a single line and take no signal period, while the most commonly taught TRIX signal is a signal line crossover. Which you get depends on the platform.
MetaTrader's developer documentation is explicit about its own: the function "returns the handle of the Triple Exponential Moving Averages Oscillator indicator. It has only one buffer", and its arguments are symbol, period, ma_period, applied_price. One averaging period, no second period, no signal line. The signals its help page describes are the zero-line cross and divergence.
StockCharts calls signal line crossovers "the most common TRIX signals" and defines the signal line as a 9-day EMA of TRIX. GoCharting builds its entry on the same event. Where a platform draws one line, that rule needs a 9-period exponential moving average of TRIX added by hand, as a second indicator.
Other platforms ship the second line. ChartLabs draws TRIX with its signal line already on, so the crossover is there without building anything, but the signal line is a simple moving average rather than the exponential one StockCharts defines. Same period, different average, so the two lines are not identical and a crossover can land a bar apart. Worth noting in your rule if you are following something written for the EMA version.
Either way, check it before you trust a rule you read somewhere. If an article's entries are signal line crossovers and your chart draws one line, you are not running that rule.
Is the Triple Exponential Average the same as the Triple Exponential Moving Average?
No. TRIX is an oscillator: a triple-nested EMA, then the rate of change of it. The TEMA is a trend line that sits on the price, built as 3 x EMA1 - 3 x EMA2 + EMA3. One oscillates around zero, the other follows price.
The naming trap sits in the vendor documentation itself. MetaTrader's oscillator list carries "Triple Exponential Average" (TRIX, credited to Jack Hutson), and the calculation section of that same page calls the thrice-nested EMA inside it "the Triple Exponential Moving Average". Its trend indicator list carries a separate indicator actually called "Triple Exponential Moving Average", credited to Patrick Mulloy. The developer reference keeps them apart as iTriX and iTEMA.
On ChartLabs both are in the Standard list under those same names, the oscillator under Momentum & Oscillators and the TEMA under Moving Averages, where it draws on price at a default Length of 9.
The distinction has arithmetic behind it. TrendSpider states that "The Triple Exponential Moving Average (TEMA) is a critical component of the TRIX indicator" and builds TRIX on a TEMA rather than on a nested EMA. On the straight-line series at a period of 15, on a falling stretch where the price is exactly 120.0000, a standard TEMA reads 120.0000 and sits on the price; a plain triple-nested EMA reads 122.1000, which is the 2.1 of lag; and the TEMA-based construction reads 124.2000, which is 4.2. Double the lag, in the same direction, and the signs reverse on a rising stretch.
How is TRIX different from the MACD?
Same shape of signal, different input. The MACD is the difference between two EMAs of price. TRIX is the rate of change of one thrice-smoothed EMA.
StockCharts names the family resemblance: "TRIX (15,9) is similar to MACD (12,26,9)", and of the two, "TRIX is the smoother of the two". On the straight-line series, TRIX(15) crossed zero 20 bars after the turn and the MACD(12,26) line crossed 15 bars after it.
Does TRIX have overbought and oversold levels?
No. It is an unbounded percentage change, and whether its values read as percentages or hundredths depends on which formula drew your line.
MetaTrader's help page reduces the idea to the sign: "The zone is used as the indicator of overbought or oversold state (positive and negative respectively)." On an unbounded line that makes overbought mean nothing more than above zero, and the same page calls a cross of zero from below the buy signal, so one event is both.
Zero is meaningful, because it marks the turn of the smoothed average. Distance from zero is not, unless you have measured the distribution of values on your own instrument, your own timeframe and your own formula.
How do you write a TRIX rule you can test?
Name the event, the direction, the bar you read it on, and the confirmation, and fix the confirmation before the first test rather than after a bad run.
Testable: "TRIX(15) closes above zero on a completed daily candle, and I enter at the next day's open." Not testable: "TRIX is strong", or any rule using a number copied from an article without knowing which formula drew it.
The confirmation bar decides a lot on this indicator, because the lag is known. With a signal arriving 16 to 24 bars after the turn, waiting one more bar is a meaningful slice of the move you were trying to catch. Measure that tradeoff rather than reasoning about it.
How do you backtest TRIX, step by step?
- One symbol, one timeframe, one date range.
- One written rule, fixed before the first bar, including the period and the confirmation bar.
- The same settings throughout.
- Every trade recorded, winners and losers, including the ones you nearly took.
- Costs applied, since a lagging entry gives away part of the move before any cost is counted.
The constraint specific to this indicator: a run on one period tells you nothing about another period, because the lag changes with it. A test of TRIX(12) is not weak evidence about TRIX(18), it is no evidence at all. Comparing two settings means two full runs over the same dates.
That suits stepping through bars by hand, because you have to decide on the bar whether the condition is met rather than letting a script decide with hindsight. On ChartLabs you step through real historical candles one at a time and place the trades yourself. Both periods are editable in the indicator's settings, so a second run at a second period takes one change. You can add custom indicators of your own, and write indicators in Pine Script in a built-in editor. Commission and slippage are applied per symbol, so the P&L reflects what the trading cost. Drawings and sub-panel indicators save as you work, with each instance styled separately, so you can put two periods of the same indicator on at once and watch where each one turns.
What should you record for each trade?
- Date and time, symbol, timeframe
- Direction, entry, stop, exit
- Result in R
- Whether the signal was a zero-line cross, a signal line cross, or a divergence
- The TRIX value at entry
- The period used, every time, because the published standards disagree
- The signal line's period and average type, if your rule uses one
- Whether your line carries the x 100, so the value you logged can be read later
Next step
Pick one period, write the rule down with its confirmation bar, and step through one symbol over one date range counting what the delay cost you. ChartLabs has a 7-day free trial with no credit card required, then one plan at $20 a month or $200 a year: start your free trial.
Related reading: how to backtest a strategy step by step, forex backtesting, and why backtest results and live results drift apart.
Related Topics
Related
Backtesting a Trading Strategy: A Beginner's Guide
What backtesting is, why it matters, and how to run one step by step: defining your rules, choosing clean historical data, stepping through the chart trade by trade, logging results, and reading the metrics that tell you whether your strategy has a real edge.
Forex Backtesting: Test Your Strategy on Real Data
A practical guide to backtesting forex strategies: why session dynamics, spread variation, and pair-specific behavior change your results, what clean historical data actually means, and a five-step process for testing a strategy before you risk real capital.
Backtesting Accuracy: How Slippage and Data Quality Matter
Why backtest results and live results drift apart, and what actually closes the gap: clean tick data, honest spread assumptions, and commission and slippage modelled directly on every trade you log.