[blackcat] L1 M.H. Pee Trend Intensity Index (TII)Level: 1
Background
M.H. Pee developed the Trend intensity index (TII) indicator to measure the strength of a trend in the market.
Function
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.
Inputs
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
Remarks
This is a Level 1 free and open source indicator.
Feedbacks are appreciated.
Trendintensityindex
Trend Intensity Index With SignalLineHi guys,
This is my first public script on TV. I was just messing about with some simple ideas and I noticed that the difference between a signalLine and the TrendIntensity line was (potentially and theoretically) a good way of spotting a ranging market.
I was initially just going to release Evergets version of this with a histogram and a signal-line, but I decided I'd much rather put in the work and code it from scratch so I could practice my coding.
I am still relatively new to Pinescript, but I have compared this to Evergets version, and on the same settings it is 1 to 1.
How to use:
When TrendIntensity(aqua) is above SignalMa (maroon), it implies a bullish sentiment.
When SignalMa is above TrendIntensity, it implies a bearish sentiment.
The histogram is simply the absolute difference between the two. Green = bullish, Red = bearish, flat = potentially ranging.
Enjoy guys.
I would like to thank Everget for his Jurik moving average.
Feedback welcome, but be kind... this is free and open for you all to use as you please.