PROTECTED SOURCE SCRIPT
已更新 Jitendra MTF RSI VWAP ADX with Diversion

This is a highly customizable, multi-timeframe table indicator useful for traders who want a quick-glance view of market conditions across timeframes using RSI, VWAP, ADX, DI, and divergence analysis. Everything is pulled via request.security() to keep values accurate for each timeframe.
How This Script works
Image for Setting option with details or description
https://drive.google.com/file/d/1870AyvIUokSa-vkbkX4d2qt17_emdHU2/view?usp=drive_link
Settings Details for Customization
🧮 How It Works (Calculation Method)
This script calculates and displays key technical indicators across multiple timeframes in a simple table format. Here's how each component works:
📌 === VWAP (Volume Weighted Average Price)
VWAP gives the average price of an asset weighted by volume over a time period.
It helps identify whether the current price is trading ABOVE or BELOW fair value.
In this script, we compare the closing price to VWAP per timeframe and show:
- "Above" (Green) if price > VWAP
- "Below" (Red) if price < VWAP
- "-" if equal or unclear
This is useful for confirming trend direction, especially alongside RSI & ADX signals.
📌 1. RSI (Relative Strength Index)
What it measures: Momentum — whether price is overbought or oversold.
How it's calculated:
RSI = 100 - (100 / (1 + RS))
where RS = Average Gain / Average Loss over a period
(default period: 14 bars)
Usage in script:
Calculated for each selected timeframe.
Color-coded:
🔴 < 40 = Weak, 🟢 40–60 = Neutral, 🔵 > 60 = Strong
A direction arrow (▲/▼) shows if RSI is rising or falling.
📌 2. ADX (Average Directional Index)
What it measures: Trend strength (but not direction).
How it's calculated:
Based on the smoothed differences between +DI and -DI over a period (default: 14).
Higher ADX = Stronger trend
Color-coded:
🔴 < 18 = Weak trend 🟢 18–25 = Moderate 🔵 > 25 = Strong
📌 3. DI+ and DI- (Directional Indicators)
What they measure:
DI+ shows bullish strength
DI- shows bearish strength
How they’re calculated:
Based on the highs and lows over a period, showing upward/downward movement separately
Color-coded similarly to ADX based on strength.
📌 4. RSI Divergence Detection
What it finds: Reversal signals using price vs RSI mismatch.
Two types:
✅ Regular Divergence
Bullish: Price makes lower low, RSI makes higher low
Bearish: Price makes higher high, RSI makes lower high
✅ Hidden Divergence
Hidden Bullish: Price makes higher low, RSI makes lower low
Hidden Bearish: Price makes lower high, RSI makes higher high
Method:
Uses ta.pivotlow() and ta.pivothigh() functions to find swing points on RSI
Compares them with price movement to determine divergence
Output:
Shows ✔ Bullish, ✔ Bearish, ✔ Hidden Bullish, or ✔ Hidden Bearish in the table.
📌 5. Multi-Timeframe Request
Uses request.security() to fetch RSI, ADX, DI+, DI-, and divergence signals for each selected timeframe.
This allows traders to see how signals align across short, medium, and long-term charts.
📁 Functions Used:
1. get_vals(tf)
Retrieves RSI, previous RSI, ADX, +DI, -DI, VWAP position, and divergence for a given timeframe.
Uses request.security() to fetch indicator values from different timeframes.
2. detect_divergence(tf)
Uses pivot points and RSI comparisons to find:
✔ Bullish
✔ Bearish
✔ Hidden Bullish
✔ Hidden Bearish
3. fill_row(...)
Populates a table row with indicator values and conditions using table.cell().
4. getAndFill(tf, label, row)
Calls get_vals() and then fills the table for the specified timeframe.
🧱 Structure:
Table Header: "TF", "VWAP", "RSI", "▲▼", "ADX", "DI+", "DI-", "Div"
Timeframes Supported: Current, 15m, 1h, 1D, 1W, 1M (customizable via inputs)
Dynamic Column/Row Count: Depends on which features are enabled
5 Relative Strength Index ta.rsi(close, 14)
6 RSI Arrow Shows ▲ if RSI rising, ▼ if falling Comparison: rsi > rsiPrev ? "▲" : "▼"
7. Average Directional Index for trend strength ta.dmi(len, lensig) returns +DI, -DI, and ADX
8. VWAP Checks if price is above or below VWAP ta.vwap, compared with close
9. RSI Divergence Detects bullish/bearish or hidden divergence using RSI & pivots ta.pivotlow, ta.pivothigh, and logical conditions on RSI/price
10. MTF Data Fetch Data fetched for different timeframes request.security(syminfo.tickerid, tf, expression)
Thanks Coded By : Jitendra
How This Script works
Image for Setting option with details or description
https://drive.google.com/file/d/1870AyvIUokSa-vkbkX4d2qt17_emdHU2/view?usp=drive_link
Settings Details for Customization
🧮 How It Works (Calculation Method)
This script calculates and displays key technical indicators across multiple timeframes in a simple table format. Here's how each component works:
📌 === VWAP (Volume Weighted Average Price)
VWAP gives the average price of an asset weighted by volume over a time period.
It helps identify whether the current price is trading ABOVE or BELOW fair value.
In this script, we compare the closing price to VWAP per timeframe and show:
- "Above" (Green) if price > VWAP
- "Below" (Red) if price < VWAP
- "-" if equal or unclear
This is useful for confirming trend direction, especially alongside RSI & ADX signals.
📌 1. RSI (Relative Strength Index)
What it measures: Momentum — whether price is overbought or oversold.
How it's calculated:
RSI = 100 - (100 / (1 + RS))
where RS = Average Gain / Average Loss over a period
(default period: 14 bars)
Usage in script:
Calculated for each selected timeframe.
Color-coded:
🔴 < 40 = Weak, 🟢 40–60 = Neutral, 🔵 > 60 = Strong
A direction arrow (▲/▼) shows if RSI is rising or falling.
📌 2. ADX (Average Directional Index)
What it measures: Trend strength (but not direction).
How it's calculated:
Based on the smoothed differences between +DI and -DI over a period (default: 14).
Higher ADX = Stronger trend
Color-coded:
🔴 < 18 = Weak trend 🟢 18–25 = Moderate 🔵 > 25 = Strong
📌 3. DI+ and DI- (Directional Indicators)
What they measure:
DI+ shows bullish strength
DI- shows bearish strength
How they’re calculated:
Based on the highs and lows over a period, showing upward/downward movement separately
Color-coded similarly to ADX based on strength.
📌 4. RSI Divergence Detection
What it finds: Reversal signals using price vs RSI mismatch.
Two types:
✅ Regular Divergence
Bullish: Price makes lower low, RSI makes higher low
Bearish: Price makes higher high, RSI makes lower high
✅ Hidden Divergence
Hidden Bullish: Price makes higher low, RSI makes lower low
Hidden Bearish: Price makes lower high, RSI makes higher high
Method:
Uses ta.pivotlow() and ta.pivothigh() functions to find swing points on RSI
Compares them with price movement to determine divergence
Output:
Shows ✔ Bullish, ✔ Bearish, ✔ Hidden Bullish, or ✔ Hidden Bearish in the table.
📌 5. Multi-Timeframe Request
Uses request.security() to fetch RSI, ADX, DI+, DI-, and divergence signals for each selected timeframe.
This allows traders to see how signals align across short, medium, and long-term charts.
📁 Functions Used:
1. get_vals(tf)
Retrieves RSI, previous RSI, ADX, +DI, -DI, VWAP position, and divergence for a given timeframe.
Uses request.security() to fetch indicator values from different timeframes.
2. detect_divergence(tf)
Uses pivot points and RSI comparisons to find:
✔ Bullish
✔ Bearish
✔ Hidden Bullish
✔ Hidden Bearish
3. fill_row(...)
Populates a table row with indicator values and conditions using table.cell().
4. getAndFill(tf, label, row)
Calls get_vals() and then fills the table for the specified timeframe.
🧱 Structure:
Table Header: "TF", "VWAP", "RSI", "▲▼", "ADX", "DI+", "DI-", "Div"
Timeframes Supported: Current, 15m, 1h, 1D, 1W, 1M (customizable via inputs)
Dynamic Column/Row Count: Depends on which features are enabled
5 Relative Strength Index ta.rsi(close, 14)
6 RSI Arrow Shows ▲ if RSI rising, ▼ if falling Comparison: rsi > rsiPrev ? "▲" : "▼"
7. Average Directional Index for trend strength ta.dmi(len, lensig) returns +DI, -DI, and ADX
8. VWAP Checks if price is above or below VWAP ta.vwap, compared with close
9. RSI Divergence Detects bullish/bearish or hidden divergence using RSI & pivots ta.pivotlow, ta.pivothigh, and logical conditions on RSI/price
10. MTF Data Fetch Data fetched for different timeframes request.security(syminfo.tickerid, tf, expression)
Thanks Coded By : Jitendra
發行說明
Update in This Version 1. Replaced :- Above or Below Comment With Data/ Value
2. Show EMA Universal Toggle to 1 Click EMA Enable All EMA Value
3. Added: 5, 21, 50 EMA Value
4. LTP Above EMA will show Green Background & Below will show Red Background
5. Complete Dynamic Table
Image of Setting or Instruction in Details
https://drive.google.com/file/d/1hAdlsVxLzsJOLr296FvDvBvOxvihl7Z_/view?usp=drive_link
Jitendra
發行說明
Update in this Version✅ Replaces hardcoded 5, 21, 50 with user-configurable input lengths.
1. Fixed EMA to User Choice EMA
2. User Can Fill EMA Length As per There Choice
Full flexibility for users to define the EMA lengths.
Clear visual alignment between inputs and table display.
Easy future edits (only need to change inputs — no need to touch logic again).
Updated EMA Calculation Logic
ema1 = request.security(syminfo.tickerid, tf, ta.ema(close, ema1Len))
ema2 = request.security(syminfo.tickerid, tf, ta.ema(close, ema2Len))
ema3 = request.security(syminfo.tickerid, tf, ta.ema(close, ema3Len))
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。