OPEN-SOURCE SCRIPT
ที่อัปเดต:

Total Info Indicator (Public)

65
# Total Info Indicator (TII)

A one-stop TradingView dashboard that overlays key market info on your chart and (optionally) prints **breakout warnings/confirmations** and **Smart SELL** signals. It shows MAs, ATR & stop-loss, RSI/CCI, earnings countdown, and a volume block that compares **today’s volume (so far)** vs a **20-day daily average (excluding today)**.

---

## Features

- **Overlay Dashboard (watermark table)**
- **Name & Market Cap**, **Ticker & Timeframe**, **Sector/Industry**
- **ATR (14)** and **ATR%** with traffic-light emoji
- **MA status** (Above/Below for 20/50/150/200)
- **Stop-loss** value + risk emoji
- **Earnings**: days remaining (if data available)
- **RSI (14)** + trend arrow; **CCI (14)** with interpretation
- **Volume** block:
- `Volume Avg (N)` = **daily** SMA(N) **excluding today**
- `Current Volume` = **today-so-far** (intraday cumulative)
- `Volume change %` vs avg + emoji
- `Volume speed` = today’s **pace** vs the average daily pace

- **On-Chart Visuals**
- **MAs**: 20 / 50 / 150 / 200 (toggle individually)
- **Stop-loss label** at `close − ATR × multiplier` (or Auto from last 3 bars)
- **Pivot price labels** at confirmed swing highs/lows

- **Signals (optional)**
- **Predictive Breakout Warnings** (yellow ⚡) — early hints near S/R
- **Confirmed Breakouts** — green “BUY”/red “SELL”; 🔥 marks very high volume
- **Smart SELL** set — small triangles for:
- RSI **overbought** fade
- **Bearish RSI divergence**
- **EMA-cross** with volume filter
- Thin **EMA** line when Smart SELL is enabled (reference for the cross)

---

## Installation

1. Open **TradingView** → **Pine Editor**.
2. Paste your TII script.
3. Click **Save** → **Add to chart**.
4. If the table doesn’t show, ensure `overlay = true` (already set) and you’re on a symbol with data.

---

## Quick Start (2 minutes)

1. Open **Inputs**.
2. **Volume session alignment**:
- If your chart shows **Extended Hours**, turn **Include Extended Hours** **ON**.
- If not, leave it **OFF** (uses the symbol’s regular session).
3. Pick the **MAs** you want and set **ATR thresholds** & **Stop-loss** style (**Auto** or anchored day).
4. (Optional) Enable **Breakout Detection** and/or **Smart SELLs**.
5. Use the table to read:
- Volatility (ATR row), Position (MA row), Risk (Stop row), Momentum (RSI/CCI),
- Volume vs average & pace,
- **Trend summary** at the bottom.

---

## Volume Logic (important)

- **Today’s volume (intraday)** = **sum of intraday bars since session start**.
Reset uses:
- `syminfo.session` when **Include Extended Hours = OFF** (regular trading hours), or
- **00:00–23:59** when **ON** (includes pre/post).
- **Average volume** = **daily SMA(N)** with **today excluded** (prevents intraday skew).
- **Volume speed** assumes **US RTH 09:30–16:00 (America/New_York)**.
Adjust in code if you trade other sessions.

> **Tip:** To match the built-in Volume pane, mirror your chart’s **Extended Hours** setting with the indicator’s **Include Extended Hours** toggle.

---

## Inputs Overview

### Table Visualization
- **Location** (Top/Middle/Bottom × Left/Center/Right)
- **Text color & size**

### General Information
- **Symbol & TF**, **Company Name**, **Industry & Sector**, **Market Cap**
- **Show Days Until Earnings**, **Show Earnings Info**

### Moving Average Position
- Toggle **MA 20 / 50 / 150 / 200** (on-chart lines + table status)

### ATR Indication
- Show **ATR (14)** & percent
- **Red/Yellow thresholds** → 🟢/🟡/🔴 ATR emoji

### Stop-Loss
- **Source**: Today / Yesterday / 2 Days Ago / **Auto** (tightest of last 3 ATR anchors)
- **ATR Multiplier**: widen/tighten stops

### Volume
- **Include Extended Hours**: defines day reset & matching with chart
- **Lookback (days)**: N for daily average (today excluded)

### Trend Calculation
- Weights for **MA**, **RSI**, **Volume** (default 0.6 / 0.3 / 0.1)
- Total ≥ **0.6** ⇒ **📈 Uptrend 🟢**; otherwise **Downtrend 🔴**

### Pivot High/Low Labels
- **pivotStrength**: larger = stronger swings; confirms later

### Breakout Detection (optional)
- **S/R Length** (window), **Volume Multiplier** vs vol SMA20
- Filters: **Use Volume**, **Use RSI**, **Use Trend**, **Use Retest**
- **Min Breakout %**, **Min Candle Body %**

### Smart SELL Signals (optional)
- **RSI Overbought** level
- **RSI Divergence** lookback
- **EMA Cross** length (with volume > avg filter)

---

## Reading Emojis at a Glance

- **ATR**: 🟢 calm • 🟡 medium • 🔴 high volatility
- **MA status**: “Above … 🟢 / Below … 🔴”
- **Stop-loss** row: 🟢 safer distance • 🟡 moderate • 🔴 tight/at risk
- **Volume**: 🔴 below avg • 🟡 ≈ avg • 🟢 above avg
- **Trend**: “📈 Uptrend 🟢” or “Downtrend 🔴”

เอกสารเผยแพร่
fixed MA visuality and added percentage from current price

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน