NIFTY AI Dashboard Pro
20 NIFTY Sectoral Indices + AI Summary, EMA, VWAP, RSI & PDH/PDL
Updated – 08 Nov 2025
यह स्क्रिप्ट क्या करती है?
ये एक एडवांस्ड AI डैशबोर्ड है जो 20 NIFTY सेक्टोरल इंडेक्स की रियल-टाइम एनालिसिस देता है। इसमें EMA 9/15, VWAP, RSI, PDH/PDL ब्रेकआउट और AI स्कोर के साथ समरी रो भी शामिल है।
मुख्य फीचर्स (Key Features)
20 सेक्टोरल इंडेक्स
NIFTY50, BANKNIFTY, IT, AUTO, FMCG, PHARMA, METAL, REALTY + 12 और
AI समरी रो
औसत % चेंज, RSI और BUY/SELL/NEUTRAL काउंट
PDH/PDL ब्रेकआउट
पिछले दिन की रेंज ब्रेक पर तुरंत सिग्नल
AI स्कोर (85/15)
ब्रेकआउट + EMA कन्फर्मेशन = Strong Signal
चार्ट बैकग्राउंड
Green = BUY | Red = SELL | Orange = Neutral
EMA200 ट्रेंड लाइन
लॉन्ग-टर्म ट्रेंड के लिए कलर-कोडेड
कोड देखने के लिए लॉगिन करें (Login to View Code)
This code is password protected. Enter credentials to unlock.
//@version=5
indicator("AI Market Pulse Pro — 20 NSE Indices Live Dashboard", overlay=true, max_labels_count=500, max_lines_count=500)
// ===== SYMBOL INPUTS =====
sym1 = input.symbol("NSE:NIFTY", "1. NIFTY 50")
sym2 = input.symbol("NSE:BANKNIFTY", "2. BANKNIFTY")
sym3 = input.symbol("NSE:FINNIFTY1!", "3. FINNIFTY")
sym4 = input.symbol("NSE:CNXAUTO", "4. NIFTY AUTO")
sym5 = input.symbol("NSE:CNXFINANCE", "5. NIFTY FINANCE")
sym6 = input.symbol("NSE:CNXFMCG", "6. NIFTY FMCG")
sym7 = input.symbol("NSE:CNXIT", "7. NIFTY IT")
sym8 = input.symbol("NSE:CNXMEDIA", "8. NIFTY MEDIA")
sym9 = input.symbol("NSE:CNXMETAL", "9. NIFTY METAL")
sym10 = input.symbol("NSE:CNXPHARMA", "10. NIFTY PHARMA")
sym11 = input.symbol("NSE:CNXPSUBANK", "11. NIFTY PSU BANK")
sym12 = input.symbol("NSE:CNXREALTY", "12. NIFTY REALTY")
sym13 = input.symbol("NSE:NIFTYPVTBANK", "13. NIFTY PRIVATE BANK")
sym14 = input.symbol("NSE:NIFTY_HEALTHCARE","14. NIFTY HEALTHCARE")
sym15 = input.symbol("NSE:NIFTY_CONSR_DURBL","15. NIFTY CONSUMER DURABLES")
sym16 = input.symbol("NSE:NIFTY_OIL_AND_GAS","16. NIFTY OIL & GAS")
sym17 = input.symbol("NSE:NIFTY_MIDSML_HLTH","17. NIFTY MIDSMALL HEALTHCARE")
sym18 = input.symbol("NSE:NIFTY_FINSEREXBNK","18. NIFTY FIN SERVICES EX-BANK")
sym19 = input.symbol("NSE:CNXINFRA", "19. NIFTY INFRA")
sym20 = input.symbol("NSE:CNXENERGY", "20. NIFTY ENERGY")
// ===== Chart Symbol Data (no extra security calls) =====
ema9 = ta.ema(close, 9)
ema15 = ta.ema(close, 15)
vwap = ta.vwap
c = close
// ===== Plot EMA + VWAP =====
plot(ema9, title="EMA 9", color=color.green, linewidth=2)
plot(ema15, title="EMA 15", color=color.red, linewidth=2)
plot(vwap, title="VWAP", color=color.blue, linewidth=2, style=plot.style_line)
// ===== Buy / Sell Arrows =====
buyCond = ta.crossover(ema9, ema15)
sellCond = ta.crossunder(ema9, ema15)
var string lastSignal = "NONE"
if buyCond and lastSignal != "BUY"
lastSignal := "BUY"
label.new(bar_index, low, "BUY", color=color.green, style=label.style_label_up, textcolor=color.white, size=size.large)
if sellCond and lastSignal != "SELL"
lastSignal := "SELL"
label.new(bar_index, high, "SELL", color=color.red, style=label.style_label_down, textcolor=color.white, size=size.large)
// ===== Dashboard Table =====
var table dash = table.new(position.top_right, 9, 22, border_width=1)
if barstate.isfirst
table.cell(dash, 0, 0, "SYMBOL", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 1, 0, "LTP", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 2, 0, "% CHANGE", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 3, 0, "RSI", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 4, 0, "LEVEL", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 5, 0, "PDH/PDL", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 6, 0, "EMA 9/15", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 7, 0, "VWAP", text_color=color.white, bgcolor=color.gray)
table.cell(dash, 8, 0, "FINAL", text_color=color.white, bgcolor=color.gray)
// ===== Arrays for summary (declare once) =====
var float[] changeArr = array.new_float()
var float[] rsiArr = array.new_float()
var string[] sigArr = array.new_string()
// Clear arrays each bar before filling
array.clear(changeArr)
array.clear(rsiArr)
array.clear(sigArr)
// ===== Function to Fill Each Row =====
f_fill_row(row, sym) =>
[cur, e9, e15, vwp] = request.security(sym, timeframe.period, [close, ta.ema(close,9), ta.ema(close,15), ta.vwap])
[prevClose, prevHigh, prevLow] = request.security(sym, "D", [close[1], high[1], low[1]])
chg = (na(prevClose) or prevClose == 0) ? na : ((cur - prevClose) / prevClose) * 100
chgColor = (not na(chg) and chg >= 0) ? color.green : color.red
rsi = na(cur) ? na : ta.rsi(cur, 14)
lvl = ""
sig = "NO TRADE"
sigColor = color.orange
if not na(prevHigh) and cur > prevHigh
lvl := "Above PDH"
sig := "Break Up"
sigColor := color.green
else if not na(prevLow) and cur < prevLow
lvl := "Below PDL"
sig := "Break Down"
sigColor := color.red
else if not na(prevHigh) and not na(prevLow) and cur <= prevHigh and cur >= prevLow
lvl := "Inside Range"
sig := "Range"
sigColor := color.orange
emaSig = e9 > e15 ? "BUY" : e9 < e15 ? "SELL" : "NEUTRAL"
emaColor = e9 > e15 ? color.green : e9 < e15 ? color.red : color.orange
vwapColor = cur > vwp ? color.green : cur < vwp ? color.red : color.gray
aiScore = 50
if sig == "Break Up" and emaSig == "BUY"
aiScore := 85
else if sig == "Break Down" and emaSig == "SELL"
aiScore := 15
finalSig = (sig == "Break Up" and emaSig == "BUY") ? "BUY" :
(sig == "Break Down" and emaSig == "SELL") ? "SELL" : "NEUTRAL"
finalText = finalSig + " | Score: " + str.tostring(aiScore)
finalColor = finalSig == "BUY" ? color.green : finalSig == "SELL" ? color.red : color.orange
// Fill Table
table.cell(dash, 0, row, str.replace_all(sym, "NSE:", ""), text_color=color.white, bgcolor=color.black)
table.cell(dash, 1, row, na(cur) ? "-" : str.tostring(cur, format.mintick), text_color=color.white, bgcolor=color.black)
table.cell(dash, 2, row, na(chg) ? "-" : str.tostring(chg, "#.##") + "%", text_color=color.white, bgcolor=chgColor)
// RSI with color
rsiBg = na(rsi) ? color.black : rsi > 70 ? color.red : rsi < 30 ? color.green : color.rgb(60, 60, 60)
table.cell(dash, 3, row, na(rsi) ? "-" : str.tostring(rsi, "#.##"), text_color=color.white, bgcolor=rsiBg)
table.cell(dash, 4, row, lvl, text_color=color.white, bgcolor=sigColor)
table.cell(dash, 5, row, sig, text_color=color.white, bgcolor=sigColor)
table.cell(dash, 6, row, emaSig, text_color=color.white, bgcolor=emaColor)
table.cell(dash, 7, row, na(vwp) ? "-" : str.tostring(vwp, format.mintick), text_color=color.white, bgcolor=vwapColor)
table.cell(dash, 8, row, finalText, text_color=color.white, bgcolor=finalColor)
if not na(chg)
array.push(changeArr, chg)
if not na(rsi)
array.push(rsiArr, rsi)
array.push(sigArr, finalSig)
// ===== Fill Rows =====
f_fill_row(1, sym1)
f_fill_row(2, sym2)
f_fill_row(3, sym3)
f_fill_row(4, sym4)
f_fill_row(5, sym5)
f_fill_row(6, sym6)
f_fill_row(7, sym7)
f_fill_row(8, sym8)
f_fill_row(9, sym9)
f_fill_row(10, sym10)
f_fill_row(11, sym11)
f_fill_row(12, sym12)
f_fill_row(13, sym13)
f_fill_row(14, sym14)
f_fill_row(15, sym15)
f_fill_row(16, sym16)
f_fill_row(17, sym17)
f_fill_row(18, sym18)
f_fill_row(19, sym19)
f_fill_row(20, sym20)
// ===== Summary Row Calculation =====
float avgChange = na
float avgRSI = na
int buyCount = 0
int sellCount = 0
int neutralCount = 0
if array.size(changeArr) > 0
float sumChange = 0.0
for i = 0 to array.size(changeArr) - 1
sumChange += array.get(changeArr, i)
avgChange := sumChange / array.size(changeArr)
if array.size(rsiArr) > 0
float sumRsi = 0.0
for i = 0 to array.size(rsiArr) - 1
sumRsi += array.get(rsiArr, i)
avgRSI := sumRsi / array.size(rsiArr)
if array.size(sigArr) > 0
for i = 0 to array.size(sigArr) - 1
s = array.get(sigArr, i)
if s == "BUY"
buyCount += 1
else if s == "SELL"
sellCount += 1
else
neutralCount += 1
summaryText = "BUY:" + str.tostring(buyCount) + " | SELL:" + str.tostring(sellCount) + " | NEUTRAL:" + str.tostring(neutralCount)
// ===== Write Summary Row =====
table.cell(dash, 0, 21, "SUMMARY", text_color=color.white, bgcolor=color.rgb(12, 59, 229))
table.cell(dash, 2, 21, na(avgChange) ? "-" : str.tostring(avgChange, "#.##") + "%", text_color=color.white, bgcolor=color.blue)
// Avg RSI with color
rsiSummaryBg = na(avgRSI) ? color.blue : avgRSI > 70 ? color.red : avgRSI < 30 ? color.green : color.rgb(28, 84, 238)
table.cell(dash, 3, 21, na(avgRSI) ? "-" : str.tostring(avgRSI, "#.##"), text_color=color.white, bgcolor=rsiSummaryBg)
table.cell(dash, 8, 21, summaryText, text_color=color.white, bgcolor=color.rgb(38, 82, 239))
// === Chart Background Final Signal ===
prevHighChart = high[1]
prevLowChart = low[1]
finalSigChart = "NEUTRAL"
if (c >= prevHighChart) and (ema9 > ema15)
finalSigChart := "BUY"
else if (c <= prevLowChart) and (ema9 < ema15)
finalSigChart := "SELL"
bgCol = finalSigChart == "BUY" ? color.new(color.green, 85) :
finalSigChart == "SELL" ? color.new(color.red, 85) :
color.new(color.orange, 88)
bgcolor(bgCol)
// ---- TREND ----
ema200 = ta.ema(close, 200)
// ---- EMA200 Color ----
ema200_color = close > ema200 ? color.green : color.red
// ---- Plot EMA200 ----
plot(ema200, title=" TREND ", color=ema200_color, linewidth=2)
Code unlocked! अब आप इसे कॉपी कर सकते हैं।

0 Comments