OPEN-SOURCE SCRIPT
Telah dikemas kini

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

5 004
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.
Nota Keluaran
OVERVIEW

This Pine Script, titled "[blackcat] L1 M.H. Pee Trend Intensity Index (TII)", designed by blackcat1402, serves as a custom indicator on TradingView. It calculates and visualizes the Trend Intensity Index (TII) based on price data, employing moving averages and deviations to measure market trends. The script includes plotting functionalities, conditionals for buy/sell signals, and alert mechanisms to notify traders of potential trading opportunities ⭐️.

The primary objective of this script is to provide traders with insights into trend strength and direction, helping them make informed decisions about their trades 📈.

FEATURES
✅ Uses Simple Moving Average (SMA) and ALMA smoothing techniques.
✅ Plots the TII line along with a comparison line from three bars ago for visualization.
✅ Highlights areas between the two lines using colored fills.
✅ Identifies and marks buy and sell conditions with respective labels.
✅ Generates real-time alerts for buy and sell signals.
✅ Customizable parameters for price source, averaging length, and deviation calculation period.
❌ No built-in risk management features.

INPUT PARAMETERS
price_source: Defines the price basis for calculations (high, low, close, etc.).
average_length: Sets the length for the simple moving average used in calculating the TII.
deviation_calculation_length: Specifies the number of periods considered in deviation calculations.
HOW TO USE
Add the Indicator: Paste the script into your TradingView chart editor and add it to your chart.
Customize Settings:
Adjust the inputs like price_source, average_length, and deviation_calculation_length according to your strategy preferences.
Interpret the Chart: Observe the yellow and fuchsia plots along with filled regions to gauge trend intensity and direction.
Utilize Labels: Use generated "B" and "S" labels to identify potential buying and selling points.
Enable Alerts: Set up notifications to receive immediate alerts when new trade signals are identified.
LIMITATIONS
The script assumes that all necessary indicators (such as SMA and ALMA) are available and correctly implemented within the TradingView environment.
Users must understand basic technical analysis concepts to effectively interpret the results.
Risk management should be handled externally as the script does not incorporate stop-loss or take-profit levels.
NOTES
Always backtest any script with historical data before applying it to live markets.
Fine-tune parameters regularly to adapt to changing market conditions.
You can modify the code further to better suit individual trading styles and requirements.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.