[blackcat] L1 M.H. Pee Trend Intensity Index (TII)

Level: 1


M.H. Pee developed the Trend intensity index (TII) indicator to measure the strength of a trend in the market.


In this pine script, it uses the current 55-bar moving average for the measurements. TII looks at the proportion of prices of prior 34 bars being above or below today’s 55-bar moving average. The purpose of the TII indicator’s measurements is to gauge the future price trend movement.

The TII indicator takes today’s 55-bar moving average and each bar’s deviation (close – average). Up deviations give a positive amount while the downside deviations give negative amounts.

Up = close – average

Down = average- close

Then, the trend intensity index is the percentage of the total up amount out of the total up and down amounts. The formula is:

Trend intensity index (TII) = {total up / (total up + total down)} × 100

I use alma () plus hma () to filter out noise signal.


Price --> Price source as input.
AvgLength --> Length input for the moving average for the TII measurements.
DevCalcLength --> Length input for bar’s deviation.

Key Signal

TII --> TII output signal


This is a Level 1 free and open source indicator.

Feedbacks are appreciated.

"Win$ & Donate w/ This" Addresses are no longer valid.

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。