OPEN-SOURCE SCRIPT

DI+ Trend Tracker & Prediction (v6)

164
DI+ Trend Tracker & Prediction – Pine Script v6
🔍 Overview
This custom TradingView indicator focuses exclusively on the +DI (Positive Directional Indicator) component of the ADX (Average Directional Index) system. It tracks recent DI+ values, analyzes trend strength and direction, and applies a simple predictive model to estimate DI+ for the next trading day.

🧠 Key Features
✅ 1. DI+ History Table (Last 4 Days)
Displays DI+ values for the past 4 completed bars.

Helps traders observe momentum and directional strength in a structured view.

📈 2. Percentage Change Calculations
Daily % Change: Shows change between the current DI+ and the previous day.

Average % Change (3 Days): Measures average change over the last 3 sessions to identify the directional consistency.

🔮 3. Predictive DI+ Estimation
Uses a linear regression (ta.linreg) over the last 4 DI+ values to estimate the next day’s DI+ reading.

This is a simple "AI-style" statistical model, providing a forecast for tomorrow’s directional strength.

📉 4. Buy/Sell Signal Generation
Buy Signal: Triggered when DI+ rises steadily over 3 days.

Sell Signal: Triggered when DI+ drops steadily over 3 days.

These signals are shown both in the table and directly on the chart with triangle markers.

📋 5. Clean Table Display
The indicator uses a top-right table to clearly present:

4-day DI+ history

Daily and average percentage changes

Predicted DI+ value

Current signal

DI+ for today

🔧 Inputs
ADX Length: Period for the DI+ calculation (default: 14)

ADX Smoothing: Smoothing period for the ADX and DMI components (default: 14)

🎯 Use Case
This indicator is ideal for:

Traders who focus on trend strength and directional movement.

Those seeking a quantitative edge by forecasting DI+.

Anyone wanting a visual cue system without overly complex strategy rules.

📌 Notes
This indicator does not include full ADX or DI− components.

It is meant for signal analysis, trend confirmation, and forecasting, not full strategy backtesting.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。