Back to Guides
Guide

Trend Intensity Index Formula, Settings and the 50 Line

The trend intensity index formula and settings, what 80, 20 and 50 really measure, and why one platform ships a different formula under the same name.

The trend intensity index measures how consistently the closes of a short window sat on one side of a longer moving average, weighted by how far away they sat, scored 0 to 100. The formula is TII = SD+ / (SD+ plus SD-) x 100, where SD+ is the sum of the up deviations over the last 30 closes and SD- is the sum of the down deviations, both measured against a 60-period simple moving average.

It weighs distance, not votes, so one close far on the wrong side can outvote twenty-nine closes on the other. And the name does not pin down one calculation: at least one charting platform documents something completely different under it.

M.H. Pee is credited with the indicator, and theforexgeek.com dates the source article to the June 2002 issue of Stocks and Commodities.

What is the trend intensity index?

A persistence measure, not a strength measure.

It asks one question about a window of recent closes: how much of the total distance from a longer average sat above the line rather than below it. Thirty closes a whisker above a 60-period average and thirty closes far above it both count as "above", but the second case scores much higher, because the index adds up distance.

That makes it a different kind of reading from most oscillators. It asks where price has been sitting relative to a slower reference, and how committed it has been about it, rather than how fast price moved or how large the swings were.

What is the trend intensity index formula?

Three steps, and the published descriptions agree on them.

  1. Compute a 60-period simple moving average of the close.
  2. For each of the last 30 closes, take its deviation from that average. An up deviation is close minus the average. A down deviation is the average minus the close, recorded as a positive number.
  3. Sum the up deviations into SD+, sum the down deviations into SD-, and compute TII = SD+ / (SD+ + SD-) x 100.

tradingpedia.com gives the wording step by step: "calculate the deviation of each of the last 30 closing prices from the 60-day SMA. A deviation is classed as 'up' when the closing price is above the SMA, and 'down' when the closing price is below it. Up deviations are obtained by subtracting the moving average from the closing price, while down deviations are obtained by subtracting the closing price from the moving average".

The bound comes for free. The index is one part of a total divided by that total, so it cannot leave 0 to 100, and marketvolume.com makes exactly that argument: it is "bounded 0 to 100 because it is a share of a total".

Is the trend intensity index built into ChartLabs?

Yes. It sits in the chart's Indicators menu, in the Standard list under Trend, named Trend Intensity Index, and it draws in its own pane below price. The defaults are Pee's own: SMA Length 60, Deviation Period 30, and a Source input set to the close. The pane draws dashed guide lines at 20, 50 and 80, so the three conventional levels are on screen without adding anything.

What are the settings, and what do they do?

Two windows, 30 and 60 by convention, and they do different jobs.

  • The longer average, conventionally 60, defines what "the trend" is being measured against. Lengthen it and the reference becomes slower to move, so deviations persist longer in one direction.
  • The shorter window, conventionally 30, defines how recent the evidence has to be. Lengthen it and the index steadies without changing the reference at all.

If the index is reacting to things you consider noise, the window is the lever. If it is calling a trend against an average you think is the wrong reference, the average is the lever.

marketvolume warns that searching both windows against past data overfits considerably faster than tuning a single period.

The settings also carry an artefact from underneath them. A simple moving average can jump on a quiet session, because a large value has just dropped off the back of its window, and the deviations move with it. So the index can change on a day when price did almost nothing. If you see a reading shift without a corresponding move, check the average before interpreting the index.

What do 80, 20 and 50 mean, and what can they not tell you?

The convention is that above 80 is a strong uptrend, below 20 a strong downtrend, and 50 is the dividing line between bullish and bearish.

Our own arithmetic shows what the 50 line cannot tell you. Take a 30-close window. Let twenty-nine of those closes sit one unit below the 60-period average, and let the last one sit well above it.

WindowSD+SD-TII
29 closes 1 below, one close 28 above282949.12
29 closes 1 below, one close 29 above292950.00
29 closes 1 below, one close 30 above302950.85
29 closes 1 below, one close 31 above312951.67

In every row, twenty-nine of the thirty closes sat below the average. In the third row the index reads 50.85, which the convention calls bullish. The balance point is exactly 29 units: one close that far above the average cancels twenty-nine closes one unit below it.

So the midline is a statement about distance, not about where the closes were. Read "above 50" as "more of the total deviation was on the upside", and it is accurate. Read it as "most closes were above the average", and one outlier can make it false.

The thresholds are conventions, not properties. marketvolume says plainly that 80 and 20 "depend on the two window lengths", and that a shorter window reaches both extremes far more often. A threshold copied from a 30/60 chart onto a 10/20 chart is a different threshold.

And the index does not measure the size of a move. A slow grind far above the average scores highly; a violent swing that keeps crossing the average scores near the middle. Calling it a strength measure is what makes people misread it.

What happens on a dead flat market?

The index is undefined, and no published description settles it.

If every close in the window sits exactly on the average, SD+ is zero and SD- is zero. The formula becomes 0 divided by 0. That is not 50, and it is not 0 or 100 either. Every implementation has to pick something there, and you have no way of knowing which until you check.

The two clean endpoints behave as you would expect: thirty closes all above the average give exactly 100.00, and thirty closes all below give exactly 0.00.

Feed your platform a run of identical closes and see what it prints. A NaN, a 50 and a zero are three different answers, and whichever one it chooses will show up in any rule you build on the midline. The ChartLabs version leaves that bar without a value rather than printing 50.

Why does my platform's TII look nothing like this?

Because the name is not attached to one calculation. At least one charting platform documents a completely different indicator under it.

TradeOrca's own help page gives: "TII = 100 * (Short-Term Average - Long-Term Average) / (Short-Term Average + Long-Term Average)", computed over average price changes, with defaults of a short period of 5, a long period of 20, a signal period of 9, an EMA signal line and eleven selectable smoothing types. It calls the result a momentum oscillator, and it publishes no bounds, no levels and no 50 line.

It cannot publish them. Working through that formula:

Short-term averageLong-term averageReading
+1.0-0.5300.00
+0.5-0.5division by zero
+1.0+0.533.33
-1.0-0.533.33

The first row leaves 0 to 100 entirely. The second is undefined whenever the two averages are equal and opposite. In the last two, a rising market and a falling market produce the identical reading of 33.33, because negating both inputs leaves the ratio unchanged. A reading from that formula cannot tell an uptrend from a downtrend.

The lesson is not that one platform is wrong. It is that "trend intensity index" names at least two different calculations in public documentation, so check the formula your own platform documents before you reuse anybody's thresholds. An 80 means nothing on a scale that reaches 300.

theforexgeek prints a second formula without flagging it. Alongside the correct deviation formula, it also states "The indicator is defined as: TI = SMA(7)/SMA(65) * 100", attributed to a differently named "Trend Intensity indicator".

Is this the Trend Strength Index, or the True Strength Index?

No to both, and the confusion is live.

The True Strength Index is a different indicator entirely: double-smoothed momentum that oscillates around a zero line. accio.com runs the two together in a single sentence, calling "The Trend Strength Index (TSI), also known as the True Strength Index".

The trend intensity index is bounded 0 to 100 and built from deviations against a moving average. If what you are reading oscillates around zero, you are looking at something else.

How is it different from ADX?

Both ask whether a market is trending. Only one of them keeps the direction.

ADX measures the consistency of directional movement bar to bar, through layers of Wilder smoothing, and then discards the sign, which is why it is normally read next to its own DI lines. The trend intensity index measures position against a longer average and keeps the direction built in, so a single number says both whether there is a trend and which way it runs.

marketvolume adds the caution that both are functions of the same closing prices, so agreement between them "is one observation seen twice".

If you want the ADX side of that comparison on a ChartLabs chart, it is not a separate entry: the Directional Movement Index in the Indicators menu draws +DI, -DI, ADX and ADXR together, which is the pairing the measure was designed to be read in.

Where can I get a trend intensity index?

Under this name, in few places.

PlatformWhat it has
TradeOrcaAn indicator called TII, with the different formula above, 5 and 20 windows, a 9-period signal line and eleven smoothing options
MetaTraderNothing. MQL5's own indicator index has no trend intensity index, on either MT4 or MT5
ChartLabsTrend Intensity Index, built in, with the three steps above and the 60 and 30 windows as defaults

An indicator draws, it does not place trades: there is no automatic backtest in ChartLabs, so the testing stays on the chart and in your trade log.

How would I test it as a regime switch?

Run the same entry rule with the switch on and with it off, over the same bars, and count both.

A procedure that produces something you can read later:

  • Pick the window pair before the first trade and write it down. Both windows, not just the one you intend to vary.
  • Define the switch precisely: above 50, above 80, or something derived from the instrument's own distribution. Decide before you look.
  • Run the identical entry rule twice over the identical bars, once with the switch and once without. Only the switch changes.
  • Record the trade count both ways. A filter that improves the average result by removing most of the sample has told you very little.
  • Check what your platform returns on a flat stretch before you trust the midline.

For the material, ChartLabs gives you 1-minute candles and the timeframes above them, which is the close series this index needs, and bar-by-bar replay so you take each trade by hand with only the bars you would have had at the time. The data is sourced from Dukascopy, tick-level where it is available, and cleaned to remove anomalies. Every trade keeps a snapshot of the chart as it looked when you entered, you can tag trades and filter the analytics by tag, and the CSV export gives you somewhere to write the window pair beside the result.

One next step

Write down your two windows, check what your platform does on a flat stretch, then step through your own history and count the trades with the switch on and off. Start the free trial and run it on cleaned data.

Related reading: how to backtest a strategy step by step, why data quality changes your results, and backtesting a forex strategy.

Related Topics

trend-intensity-indextiitrend-indicatoradxbacktesting