Nifty / Banknifty Dashboard by RiTz
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © keanu_ritz

//@version=5

indicator(title="Nifty / Banknifty Dashboard by RiTz", overlay=true)

// ---- Table Settings Start {----//
max    = 160    //Maximum Length
min    = 10     //Minimum Length
var tooltip_Sym = "Shows Symbols for the selected Index"
var tooltip_LTP = "Shows LTP of symbols"
var tooltip_Chng = "Shows change in price of symbols"
var tooltip_PChng = "Shows % change in price of symbols"
var tooltip_VWAP = "Shows the current VWAP value of symbols"
var tooltip_ST1 = "Shows the state of Supertrend 21-1 of symbols for Current TimeFrame"
var tooltip_ST2 = "Shows the state of Supertrend 14-2 of symbols for Current TimeFrame"
var tooltip_ST3 = "Shows the state of Supertrend 10-3 of symbols for Current TimeFrame"
var tooltip_RSI = "Shows the value of RSI 14 period of symbols for Current TimeFrame"
var tooltip_ADX = "Shows the state of ADX of symbols for Current TimeFrame"
var tooltip_MACD = "Shows the state of MACD of symbols for Current TimeFrame"
var tooltip_Alg = "Shows the state of Alligator indicator of symbols for Current TimeFrame"
var tooltip_PDHL = "Shows where the price is trading according to the symbols Previous Day's High-Low"
var tooltip_SmaHL = "Shows where the price is trading according to the 5 Sma High-Low of Multiple TimeFrames"
var tooltip_ATR = "Shows Average True Range of Multiple TimeFrames"

dash_loc = input.session("Top Right","Dashboard Location"  ,options=["Top Right","Bottom Right","Top Left","Bottom Left", "Middle Right","Bottom Center"]  ,group='Style Settings')

text_size = input.session('Normal',"Dashboard Size"  ,options=["Tiny","Small","Normal","Large"]  ,group='Style Settings')

cell_up = input.color(#52fd03,'Bullish Cell Color'  ,group='Style Settings')
cell_dn = input.color(#fd1d03,'Bearish Cell Color'  ,group='Style Settings')
cell_neutral = input.color(color.gray,'Neutral Cell Color'  ,group='Style Settings')
row_col = color.blue
col_col = color.blue
txt_col = color.white
cell_transp = input.int(90,'Cell Transparency'  ,minval=0  ,maxval=100  ,group='Style Settings')
txt_transp = input.int(25,'Cell Transparency'  ,minval=0  ,maxval=60  ,group='Style Settings')
// ---- Table Settings End ----}//

// ---- Indicators Show/Hide Settings Start {----//
showLTP = input.bool(defval=true, title="Show LTP :", inline='indicator1', group="Columns Settings")
showChng = input.bool(defval=true, title="Show Price Change", inline='indicator1', group="Columns Settings")
showPChng = input.bool(defval=true, title="Show % Price Change :", inline='indicator2', group="Columns Settings")
showVwap = input.bool(defval=true, title="Show VWAP", inline='indicator2', group="Columns Settings")
showST1 = input.bool(defval=true, title="Show SuperTrend 21-1 :", inline='indicator3', group="Columns Settings")
showST2 = input.bool(defval=true, title="Show SuperTrend 14-2 :", inline='indicator3', group="Columns Settings")
showST3 = input.bool(defval=true, title="Show SuperTrend 10-3", inline='indicator3', group="Columns Settings")
showRSI = input.bool(defval=true, title="Show RSI :", inline='indicator4', group="Columns Settings")
showADX = input.bool(defval=true, title="Show ADX", inline='indicator4', group="Columns Settings")
showMACD = input.bool(defval=true, title="Show MACD :", inline='indicator5', group="Columns Settings")
showAlg = input.bool(defval=true, title="Show Alligator", inline='indicator5', group="Columns Settings")
showPHL = input.bool(defval=true, title="Show Previous Day High/Low", inline='indicator6', group="Columns Settings")
showSmaHL = input.bool(defval=true, title="Show 5 Sma High/Low", inline="indicator6", group="Columns Settings")
showATR = input.bool(defval=true, title="Show ATR (14 period)", inline="indicator7", group="Columns Settings")
// ---- Indicators Show/Hide Settings end ----}//

// ---- Symbols Show/Hide Settings Start {----//
showSiv = input.bool(defval=true, title="Show India VIX", group="Rows Settings")
showS1 = input.bool(defval=true, title="Show Symbol 1 :", inline='SSym1', group="Rows Settings")
showS2 = input.bool(defval=true, title="Show Symbol 2", inline='SSym1', group="Rows Settings")
showS3 = input.bool(defval=true, title="Show Symbol 3 :", inline='SSym2', group="Rows Settings")
showS4 = input.bool(defval=true, title="Show Symbol 4", inline='SSym2', group="Rows Settings")
showS5 = input.bool(defval=true, title="Show Symbol 5 :", inline='SSym3', group="Rows Settings")
showS6 = input.bool(defval=true, title="Show Symbol 6", inline='SSym3', group="Rows Settings")
showS7 = input.bool(defval=true, title="Show Symbol 7 :", inline='SSym4', group="Rows Settings")
showS8 = input.bool(defval=true, title="Show Symbol 8", inline='SSym4', group="Rows Settings")
showS9 = input.bool(defval=true, title="Show Symbol 9 :", inline='SSym5', group="Rows Settings")
showS10 = input.bool(defval=true, title="Show Symbol 10", inline='SSym5', group="Rows Settings")
// ---- Symbols Show/Hide Settings end ----}//

// ----IndiaVIX calculation code start {----//
indvixin = input.symbol("NSE:INDIAVIX","Ticker Vix", group='Symbol Settings')
[indvix,indvixC,ivPDH,ivPDL] = request.security(indvixin,'D',[close,close[1],high[1],low[1]])
indvixChng = (indvix-indvixC)
indvixp = (indvix - indvixC)*100/indvixC
cvix = indvixp >= 0 ? cell_up : cell_dn
// ----IndiaVIX calculation code end ----}//

//---- Index & Symbols Selection code start {----//
_Index = input.string('BankNifty', 'Dashboard for Index', options=['BankNifty', 'Nifty'], group='Symbol Settings')

t1 = _Index == 'BankNifty' ? input.symbol('NSE:BANKNIFTY', 'BNF Symbol 1', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:NIFTY', 'Nifty Symbol 1', inline='Nifty Symbol', group='Symbol Settings')
t2 = _Index == 'BankNifty' ? input.symbol('NSE:BANKNIFTY1!', 'BNF Symbol 2', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:NIFTY1!', 'Nifty Symbol 2',  inline='Nifty Symbol', group='Symbol Settings')
t3 = _Index == 'BankNifty' ? input.symbol('NSE:HDFCBANK', 'BNF Symbol 3', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:HDFCBANK', 'Nifty Symbol 3',  inline='Nifty Symbol', group='Symbol Settings')
t4 = _Index == 'BankNifty' ? input.symbol('NSE:ICICIBANK', 'BNF Symbol 4', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:RELIANCE', 'Nifty Symbol 4',  inline='Nifty Symbol', group='Symbol Settings')
t5 = _Index == 'BankNifty' ? input.symbol('NSE:KOTAKBANK', 'BNF Symbol 5', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:ICICIBANK', 'Nifty Symbol 5',  inline='Nifty Symbol', group='Symbol Settings')
t6 = _Index == 'BankNifty' ? input.symbol('NSE:AXISBANK', 'BNF Symbol 6', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:INFY', 'Nifty Symbol 6',  inline='Nifty Symbol', group='Symbol Settings')
t7 = _Index == 'BankNifty' ? input.symbol('NSE:SBIN', 'BNF Symbol 7', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:ITC', 'Nifty Symbol 7',  inline='Nifty Symbol', group='Symbol Settings')
t8 = _Index == 'BankNifty' ? input.symbol('NSE:INDUSINDBK', 'BNF Symbol 8', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:LT', 'Nifty Symbol 8',  inline='Nifty Symbol', group='Symbol Settings')
t9 = _Index == 'BankNifty' ? input.symbol('NSE:BANKBARODA', 'BNF Symbol 9', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:TCS', 'Nifty Symbol 9',  inline='Nifty Symbol', group='Symbol Settings')
t10 = _Index == 'BankNifty' ? input.symbol('NSE:FEDERALBNK', 'BNF Symbol 10', inline='BNF Symbol', group='Symbol Settings') : input.symbol('NSE:AXISBANK', 'Nifty Symbol 10',  inline='Nifty Symbol', group='Symbol Settings')
//---- Index & Symbols Selection code end ----}//

//---- Indicators code Start {----//
var PColor = color.white
var PText = ''
var SmaHLColor = color.white
var SmaHLText = ''
//---- Alligator code Start {----//

var AlgColor = color.white
var AlgText = ''

jawPeriod = 13
teethPeriod = 8
lipsPeriod = 5

smma(src, length) =>
    smma = 0.0
    sma_1 = ta.sma(src, length)
    smma := na(smma[1]) ? sma_1 : (smma[1] * (length - 1) + src) / length
    smma

jaw = smma(hl2, jawPeriod)
teeth = smma(hl2, teethPeriod)
lips = smma(hl2, lipsPeriod)

//---- Alligator code end ----}//

//---- SuperTrend code start {----//
f1=1
f2=2
f3=3
p1=21
p2=14
p3=10

Supertrend(f1, p1) => 
    [supertrend, trend] = ta.supertrend(f1, p1)
    st1State_ = trend == 1 ? false : true
    [st1State_]

Supertrend2(f2, p2) => 
    [supertrend, trend] = ta.supertrend(f2, p2)
    st2State_ = trend == 1 ? false : true
    [st2State_]

Supertrend3(f3, p3) => 
    [supertrend, trend] = ta.supertrend(f3, p3)
    st3State_ = trend == 1 ? false : true
    [st3State_]

[st1State_] = Supertrend(f1, p1)
[st2State_] = Supertrend2(f2, p2)
[st3State_] = Supertrend3(f3, p3)
//---- SuperTrend code end----}//

vwap = ta.vwap(hlc3)

//---- RSI code start {----//
rsiPeriod = 14
RSI = ta.rsi(close, rsiPeriod)
//---- RSI code end ----}//

//---- ATR code start {----//
atrPeriod = 14
ATR = ta.atr(atrPeriod)
//---- ATR code end ----}//

//---- 5 SMA H-L code start{----//
smaH = ta.sma(high,5)
smaL = ta.sma(low,5)
sma20C = ta.sma(close,20)
//---- 5 SMA H-L code end ----}//

//---- ADX-DMI code start {----//
adxP = 14
adxS = 14
var ADXColor = color.white
var ADXText = ''

ADXf(adxP, adxS) => 
    [diplus, diminus, adx] = ta.dmi(adxP, adxS)

[dp, dm, adxx] = ADXf(adxP, adxS)
//---- ADX-DMI code end ----}//

//---- MACD code start {----//
flen = 12
sllen = 26
sglen = 9
var MACDColor = color.white
var MACDText = ''

Macdf(flen,sllen,sglen) =>
    [macdline,sgline,histline] = ta.macd(close,flen,sllen,sglen)

[ml,sl,hsl] = Macdf(flen,sllen,sglen)
//---- MACD code end ----}//

//---- Calculate Values of Indicators for Symbols code start {----//
[IVixJaw,IVixTeeth,IVixLips,IVix1vwap,st1State_iv1,st2State_iv1,st3State_iv1,RSIiv,dpiv,dmiv,adxiv,mliv,sliv,hsliv,tsivsma5H,tsivsma5L,tsivsma20,tsivatr] = request.security(indvixin,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts1jaw,ts1teeth,ts1lips,ts1vwap,st1State_st1,st2State_st1,st3State_st1,RSI1,dp1,dm1,adx1,ml1,sl1,hsl1,ts1sma5H,ts1sma5L,ts1sma20,ts1atr] = request.security(t1,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts2jaw,ts2teeth,ts2lips,ts2vwap,st1State_st2,st2State_st2,st3State_st2,RSI2,dp2,dm2,adx2,ml2,sl2,hsl2,ts2sma5H,ts2sma5L,ts2sma20,ts2atr] = request.security(t2,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts3jaw,ts3teeth,ts3lips,ts3vwap,st1State_st3,st2State_st3,st3State_st3,RSI3,dp3,dm3,adx3,ml3,sl3,hsl3,ts3sma5H,ts3sma5L,ts3sma20,ts3atr] = request.security(t3,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts4jaw,ts4teeth,ts4lips,ts4vwap,st1State_st4,st2State_st4,st3State_st4,RSI4,dp4,dm4,adx4,ml4,sl4,hsl4,ts4sma5H,ts4sma5L,ts4sma20,ts4atr] = request.security(t4,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts5jaw,ts5teeth,ts5lips,ts5vwap,st1State_st5,st2State_st5,st3State_st5,RSI5,dp5,dm5,adx5,ml5,sl5,hsl5,ts5sma5H,ts5sma5L,ts5sma20,ts5atr] = request.security(t5,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts6jaw,ts6teeth,ts6lips,ts6vwap,st1State_st6,st2State_st6,st3State_st6,RSI6,dp6,dm6,adx6,ml6,sl6,hsl6,ts6sma5H,ts6sma5L,ts6sma20,ts6atr] = request.security(t6,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts7jaw,ts7teeth,ts7lips,ts7vwap,st1State_st7,st2State_st7,st3State_st7,RSI7,dp7,dm7,adx7,ml7,sl7,hsl7,ts7sma5H,ts7sma5L,ts7sma20,ts7atr] = request.security(t7,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts8jaw,ts8teeth,ts8lips,ts8vwap,st1State_st8,st2State_st8,st3State_st8,RSI8,dp8,dm8,adx8,ml8,sl8,hsl8,ts8sma5H,ts8sma5L,ts8sma20,ts8atr] = request.security(t8,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts9jaw,ts9teeth,ts9lips,ts9vwap,st1State_st9,st2State_st9,st3State_st9,RSI9,dp9,dm9,adx9,ml9,sl9,hsl9,ts9sma5H,ts9sma5L,ts9sma20,ts9atr] = request.security(t9,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
[ts10jaw,ts10teeth,ts10lips,ts10vwap,st1State_st10,st2State_st10,st3State_st10,RSI10,dp10,dm10,adx10,ml10,sl10,hsl10,ts10sma5H,ts10sma5L,ts10sma20,ts10atr] = request.security(t10,timeframe.period,[jaw,teeth,lips,vwap,st1State_,st2State_,st3State_,RSI,dp,dm,adxx,ml,sl,hsl,smaH,smaL,sma20C,ATR])
//---- Calculate Values of Indicators for Symbols code end ----}//

//---- Calculate Change & %Change code start {----//
[ts1,ts1C,ts1PDH,ts1PDL] = request.security(t1,'D',[close,close[1],high[1],low[1]])
ts1Chng = (ts1-ts1C)
ts1p = (ts1-ts1C)*100/ts1C

//------------------
[ts2,ts2C,ts2PDH,ts2PDL] = request.security(t2,'D',[close,close[1],high[1],low[1]])
ts2Chng = (ts2-ts2C)
ts2p = (ts2-ts2C)*100/ts2C

//---------------
[ts3,ts3C,ts3PDH,ts3PDL] = request.security(t3,'D',[close,close[1],high[1],low[1]])
ts3Chng = (ts3-ts3C)
ts3p = (ts3-ts3C)*100/ts3C

//----------------
[ts4,ts4C,ts4PDH,ts4PDL] = request.security(t4,'D',[close,close[1],high[1],low[1]])
ts4Chng = (ts4-ts4C)
ts4p = (ts4-ts4C)*100/ts4C

//----------------
[ts5,ts5C,ts5PDH,ts5PDL] = request.security(t5,'D',[close,close[1],high[1],low[1]])
ts5Chng = (ts5-ts5C)
ts5p = (ts5-ts5C)*100/ts5C

//----------------
[ts6,ts6C,ts6PDH,ts6PDL] = request.security(t6,'D',[close,close[1],high[1],low[1]])
ts6Chng = (ts6-ts6C)
ts6p = (ts6-ts6C)*100/ts6C

//----------------
[ts7,ts7C,ts7PDH,ts7PDL] = request.security(t7,'D',[close,close[1],high[1],low[1]])
ts7Chng = (ts7-ts7C)
ts7p = (ts7-ts7C)*100/ts7C

//----------------
[ts8,ts8C,ts8PDH,ts8PDL] = request.security(t8,'D',[close,close[1],high[1],low[1]])
ts8Chng = (ts8-ts8C)
ts8p = (ts8-ts8C)*100/ts8C

//----------------
[ts9,ts9C,ts9PDH,ts9PDL] = request.security(t9,'D',[close,close[1],high[1],low[1]])
ts9Chng = (ts9-ts9C)
ts9p = (ts9-ts9C)*100/ts9C

//----------------
[ts10,ts10C,ts10PDH,ts10PDL] = request.security(t10,'D',[close,close[1],high[1],low[1]])
ts10Chng = (ts10-ts10C)
ts10p = (ts10-ts10C)*100/ts10C

//---- Calculate Change & %Change code end----}//

//---- Indicators code end ----}//

//-------------- Table code Start {-------------------//

//---- Table Position & Size code start {----//
var table_position = dash_loc == 'Top Left' ? position.top_left :
  dash_loc == 'Bottom Left' ? position.bottom_left :
  dash_loc == 'Middle Right' ? position.middle_right :
  dash_loc == 'Bottom Center' ? position.bottom_center :
  dash_loc == 'Top Right' ? position.top_right : position.bottom_right
  
var table_text_size = text_size == 'Tiny' ? size.tiny :
  text_size == 'Small' ? size.small :
  text_size == 'Normal' ? size.normal : size.large

var t = table.new(table_position,16,math.abs(max-min)+2,
  frame_color=color.new(#000000,0),
  frame_width=1,
  border_color=color.new(#000000,0),
  border_width=1)
//---- Table Position & Size code end ----}//

//---- Table Column & Rows code start {----//
if (barstate.islast)
//---- Table Main Column Headers code start {----//
    table.cell(t,1,0,'Dashboard',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
//    table.merge_cells(t,1,0,13,0)
    table.cell(t,1,1,'Symbol',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_Sym)
    if showLTP
        table.cell(t,2,1,'LTP',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_LTP)
    if showChng
        table.cell(t,3,1,'Chng',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_Chng)
    if showPChng
        table.cell(t,4,1,'%Chng',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_PChng)
    if showVwap
        table.cell(t,5,1,'VWAP',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_VWAP)
    if showST1
        table.cell(t,6,1,'ST 21-1',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_ST1)
    if showST2
        table.cell(t,7,1,'ST 14-2',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_ST2)
    if showST3
        table.cell(t,8,1,'ST 10-3',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_ST3)
    if showRSI
        table.cell(t,9,1,'RSI 14',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_RSI)
    if showADX
        table.cell(t,10,1,'ADX',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_ADX)
    if showMACD
        table.cell(t,11,1,'MACD',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_MACD)
    if showAlg
        table.cell(t,12,1,'Alligator',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_Alg)
    if showPHL
        table.cell(t,13,1,'PDH-PDL',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_PDHL)
    if showSmaHL
        table.cell(t,14,1,'5 Sma H/L',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_SmaHL)
    if showATR
        table.cell(t,15,1,'ATR (14)',text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp),tooltip=tooltip_ATR)
//---- Table Main Column Headers code end ----}//

//---- Display IndiaVIX data code start {----//
    if showSiv
        table.cell(t,1,2, str.replace_all(indvixin, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showSiv and showLTP
        table.cell(t,2,2, str.tostring(indvix, '#.##') ,text_color=color.new(indvixp >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(indvixp >= 0 ? cell_up : cell_dn ,cell_transp))
    if showSiv and showChng
        table.cell(t,3,2, str.tostring(indvixChng, '#.##'),text_color=color.new(indvixp >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(indvixp >= 0 ? cell_up : cell_dn ,cell_transp))
    if showSiv and showPChng
        table.cell(t,4,2, str.tostring(indvixp, '#.##') +'%',text_color=color.new(indvixp >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(indvixp >= 0 ? cell_up : cell_dn ,cell_transp))
    if showSiv and showVwap
        table.cell(t,5,2, str.tostring(IVix1vwap, '#.##'),text_color=color.new(indvix >= IVix1vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(indvix >= IVix1vwap ? cell_up : cell_dn ,cell_transp))
    if showSiv and showST1
        table.cell(t,6,2, st1State_iv1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_iv1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_iv1==true ? cell_up : cell_dn ,cell_transp))
    if showSiv and showST2
        table.cell(t,7,2, st2State_iv1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_iv1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_iv1==true ? cell_up : cell_dn ,cell_transp))
    if showSiv and showST3
        table.cell(t,8,2, st3State_iv1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_iv1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_iv1==true ? cell_up : cell_dn ,cell_transp))
    if showSiv and showRSI
        table.cell(t,9,2, str.tostring(RSIiv, '#.##'),text_color=color.new(RSIiv > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSIiv > 50 ? cell_up : cell_dn ,cell_transp))
    if adxiv >= 75 and dpiv > dmiv
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adxiv >= 75 and dpiv < dmiv
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adxiv < 75 and adxiv >= 50 and dpiv > dmiv
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adxiv < 75 and adxiv >= 50 and dpiv < dmiv
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adxiv < 50 and adxiv >= 25 and dpiv > dmiv
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adxiv < 25 and adxiv >= 25 and dpiv < dmiv
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adxiv < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showSiv and showADX
        table.cell(t,10,2, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsliv >0 and mliv > sliv
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsliv <0 and mliv < sliv
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showSiv and showMACD
        table.cell(t,11,2, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if IVixLips > IVixTeeth and IVixTeeth > IVixJaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if IVixLips < IVixTeeth and IVixTeeth < IVixJaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if IVixLips > IVixTeeth and IVixTeeth < IVixJaw or IVixLips < IVixTeeth and IVixTeeth > IVixJaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showSiv and showAlg
        table.cell(t,12,2, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if indvix > ivPDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if indvix < ivPDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if indvix < ivPDH and indvix > ivPDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showSiv and showPHL
        table.cell(t,13,2, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if indvix > tsivsma20 and indvix > tsivsma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if indvix < tsivsma20 and indvix < tsivsma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if indvix < tsivsma5H and indvix > tsivsma20 or indvix > tsivsma5L and indvix < tsivsma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showSiv and showSmaHL
        table.cell(t,14,2, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showSiv and showATR
        table.cell(t,15,2, str.tostring(tsivatr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display IndiaVIX data code end ----}//

//---- Display Symbol-1 data code start {----//
    if showS1
        table.cell(t,1,3, str.replace_all(t1, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS1 and showLTP
        table.cell(t,2,3, str.tostring(ts1, '#.##') ,text_color=color.new(ts1p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts1p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS1 and showChng
        table.cell(t,3,3, str.tostring(ts1Chng, '#.##'),text_color=color.new(ts1p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts1p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS1 and showPChng
        table.cell(t,4,3, str.tostring(ts1p, '#.##') +'%',text_color=color.new(ts1p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts1p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS1 and showVwap
        table.cell(t,5,3, str.tostring(ts1vwap, '#.##'),text_color=color.new(ts1 >= ts1vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts1 >= ts1vwap ? cell_up : cell_dn ,cell_transp))
    if showS1 and showST1
        table.cell(t,6,3, st1State_st1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st1==true ? cell_up : cell_dn ,cell_transp))
    if showS1 and showST2
        table.cell(t,7,3, st2State_st1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st1==true ? cell_up : cell_dn ,cell_transp))
    if showS1 and showST3
        table.cell(t,8,3, st3State_st1 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st1==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st1==true ? cell_up : cell_dn ,cell_transp))
    if showS1 and showRSI
        table.cell(t,9,3, str.tostring(RSI1, '#.##'),text_color=color.new(RSI1 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI1 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx1 >= 75 and dp1 > dm1
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx1 >= 75 and dp1 < dm1
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx1 < 75 and adx1 >= 50 and dp1 > dm1
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx1 < 75 and adx1 >= 50 and dp1 < dm1
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx1 < 50 and adx1 >= 25 and dp1 > dm1
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx1 < 50 and adx1 >= 25 and dp1 < dm1
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx1 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS1 and showADX
        table.cell(t,10,3, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl1 >0 and ml1 > sl1
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl1 <0 and ml1 < sl1
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS1 and showMACD
        table.cell(t,11,3, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts1lips > ts1teeth and ts1teeth > ts1jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts1lips < ts1teeth and ts1teeth < ts1jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts1lips > ts1teeth and ts1teeth < ts1jaw or ts1lips < ts1teeth and ts1teeth > ts1jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS1 and showAlg
        table.cell(t,12,3, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts1 > ts1PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts1 < ts1PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts1 < ts1PDH and ts1 > ts1PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS1 and showPHL
        table.cell(t,13,3, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts1 > ts1sma20 and ts1 > ts1sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts1 < ts1sma20 and ts1 < ts1sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts1 < ts1sma5H and ts1 > ts1sma20 or ts1 > ts1sma5L and ts1 < ts1sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS1 and showSmaHL
        table.cell(t,14,3, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS1 and showATR
        table.cell(t,15,3, str.tostring(ts1atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-1 data code end ----}//

//---- Display Symbol-2 data code start {----//
    if showS2 
        table.cell(t,1,4, str.replace_all(t2, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS2 and showLTP
        table.cell(t,2,4, str.tostring(ts2, '#.##') ,text_color=color.new(ts2p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts2p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS2 and showChng
        table.cell(t,3,4, str.tostring(ts2Chng, '#.##'),text_color=color.new(ts2p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts2p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS2 and showPChng
        table.cell(t,4,4, str.tostring(ts2p, '#.##') +'%',text_color=color.new(ts2p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts2p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS2 and showVwap
        table.cell(t,5,4, str.tostring(ts2vwap, '#.##'),text_color=color.new(ts2 >= ts2vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts2 >= ts2vwap ? cell_up : cell_dn ,cell_transp))
    if showS2 and showST1
        table.cell(t,6,4, st1State_st2 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st2==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st2==true ? cell_up : cell_dn ,cell_transp))
    if showS2 and showST2
        table.cell(t,7,4, st2State_st2 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st2==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st2==true ? cell_up : cell_dn ,cell_transp))
    if showS2 and showST3
        table.cell(t,8,4, st3State_st2 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st2==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st2==true ? cell_up : cell_dn ,cell_transp))
    if showS2 and showRSI
        table.cell(t,9,4, str.tostring(RSI2, '#.##'),text_color=color.new(RSI2 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI2 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx2 >= 75 and dp2 > dm2
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx2 >= 75 and dp2 < dm2
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx2 < 75 and adx2 >= 50 and dp2 > dm2
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx2 < 75 and adx2 >= 50 and dp2 < dm2
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx2 < 50 and adx2 >= 25 and dp2 > dm2
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx2 < 50 and adx2 >= 25 and dp2 < dm2
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx2 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS2 and showADX
        table.cell(t,10,4, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl2 >0 and ml2 > sl2
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl2 <0 and ml2 < sl2
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS2 and showMACD
        table.cell(t,11,4, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts2lips > ts2teeth and ts2teeth > ts2jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts2lips < ts2teeth and ts2teeth < ts2jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts2lips > ts2teeth and ts2teeth < ts2jaw or ts2lips < ts2teeth and ts2teeth > ts2jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS2 and showAlg
        table.cell(t,12,4, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts2 > ts2PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts2 < ts2PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts2 < ts2PDH and ts2 > ts2PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS2 and showPHL
        table.cell(t,13,4, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts2 > ts2sma20 and ts2 > ts2sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts2 < ts2sma20 and ts2 < ts2sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts2 < ts2sma5H and ts2 > ts2sma20 or ts2 > ts2sma5L and ts2 < ts2sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS2 and showSmaHL
        table.cell(t,14,4, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS2 and showATR
        table.cell(t,15,4, str.tostring(ts2atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-2 data code end ----}//

//---- Display Symbol-3 data code start {----//
    if showS3
        table.cell(t,1,5, str.replace_all(t3, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS3 and showLTP
        table.cell(t,2,5, str.tostring(ts3, '#.##') ,text_color=color.new(ts3p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts3p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS3 and showChng
        table.cell(t,3,5, str.tostring(ts3Chng, '#.##'),text_color=color.new(ts3p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts3p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS3 and showPChng
        table.cell(t,4,5, str.tostring(ts3p, '#.##') +'%',text_color=color.new(ts3p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts3p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS3 and showVwap
        table.cell(t,5,5, str.tostring(ts3vwap, '#.##'),text_color=color.new(ts3 >= ts3vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts3 >= ts3vwap ? cell_up : cell_dn ,cell_transp))
    if showS3 and showST1
        table.cell(t,6,5, st1State_st3 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st3==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st3==true ? cell_up : cell_dn ,cell_transp))
    if showS3 and showST2
        table.cell(t,7,5, st2State_st3 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st3==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st3==true ? cell_up : cell_dn ,cell_transp))
    if showS3 and showST3
        table.cell(t,8,5, st3State_st3 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st3==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st3==true ? cell_up : cell_dn ,cell_transp))
    if showS3 and showRSI
        table.cell(t,9,5, str.tostring(RSI3, '#.##'),text_color=color.new(RSI3 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI3 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx3 >= 75 and dp3 > dm3
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx3 >= 75 and dp3 < dm3
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx3 < 75 and adx3 >= 50 and dp3 > dm3
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx3 < 75 and adx3 >= 50 and dp3 < dm3
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx3 < 50 and adx3 >= 25 and dp3 > dm3
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx3 < 50 and adx3 >= 25 and dp3 < dm3
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx3 < 25    
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS3 and showADX
        table.cell(t,10,5, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl3 >0 and ml3 > sl3
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl3 <0 and ml3 < sl3
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS3 and showMACD
        table.cell(t,11,5, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts3lips > ts3teeth and ts3teeth > ts3jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts3lips < ts3teeth and ts3teeth < ts3jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts3lips > ts3teeth and ts3teeth < ts3jaw or ts3lips < ts3teeth and ts3teeth > ts3jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS3 and showAlg
        table.cell(t,12,5, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts3 > ts3PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts3 < ts3PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts3 < ts3PDH and ts3 > ts3PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS3 and showPHL
        table.cell(t,13,5, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts3 > ts3sma20 and ts3 > ts3sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts3 < ts3sma20 and ts3 < ts3sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts3 < ts3sma5H and ts3 > ts3sma20 or ts3 > ts3sma5L and ts3 < ts3sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS3 and showSmaHL
        table.cell(t,14,5, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS3 and showATR
        table.cell(t,15,5, str.tostring(ts3atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-3 data code end ----}//

//---- Display Symbol-4 data code start {----//
    if showS4 
        table.cell(t,1,6, str.replace_all(t4, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS4 and showLTP
        table.cell(t,2,6, str.tostring(ts4, '#.##') ,text_color=color.new(ts4p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts4p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS4 and showChng
        table.cell(t,3,6, str.tostring(ts4Chng, '#.##'),text_color=color.new(ts4p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts4p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS4 and showPChng
        table.cell(t,4,6, str.tostring(ts4p, '#.##') +'%',text_color=color.new(ts4p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts4p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS4 and showVwap
        table.cell(t,5,6, str.tostring(ts4vwap, '#.##'),text_color=color.new(ts4 >= ts4vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts4 >= ts4vwap ? cell_up : cell_dn ,cell_transp))
    if showS4 and showST1
        table.cell(t,6,6, st1State_st4 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st4==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st4==true ? cell_up : cell_dn ,cell_transp))
    if showS4 and showST2
        table.cell(t,7,6, st2State_st4 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st4==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st4==true ? cell_up : cell_dn ,cell_transp))
    if showS4 and showST3
        table.cell(t,8,6, st3State_st4 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st4==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st4==true ? cell_up : cell_dn ,cell_transp))
    if showS4 and showRSI
        table.cell(t,9,6, str.tostring(RSI4, '#.##'),text_color=color.new(RSI4 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI4 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx4 >= 75 and dp4 > dm4
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx4 >= 75 and dp4 < dm4
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx4 < 75 and adx4 >= 50 and dp4 > dm4
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx4 < 75 and adx4 >= 50 and dp4 < dm4
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx4 < 50 and adx4 >= 25 and dp4 > dm4
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx4 < 50 and adx4 >= 25 and dp4 < dm4
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx4 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS4 and showADX
        table.cell(t,10,6, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl4 >0 and ml4 > sl4
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl4 <0 and ml4 < sl4
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS4 and showMACD
        table.cell(t,11,6, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts4lips > ts4teeth and ts4teeth > ts4jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts4lips < ts4teeth and ts4teeth < ts4jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts4lips > ts4teeth and ts4teeth < ts4jaw or ts4lips < ts4teeth and ts4teeth > ts4jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS4 and showAlg
        table.cell(t,12,6, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts4 > ts4PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts4 < ts4PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts4 < ts4PDH and ts4 > ts4PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS4 and showPHL
        table.cell(t,13,6, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts4 > ts4sma20 and ts4 > ts4sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts4 < ts4sma20 and ts4 < ts4sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts4 < ts4sma5H and ts4 > ts4sma20 or ts4 > ts4sma5L and ts4 < ts4sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS4 and showSmaHL
        table.cell(t,14,6, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS4 and showATR
        table.cell(t,15,6, str.tostring(ts4atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-4 data code end ----}//

if (barstate.islast)
//---- Display Symbol-5 data code start {----//
    if showS5
        table.cell(t,1,7, str.replace_all(t5, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS5 and showLTP
        table.cell(t,2,7, str.tostring(ts5, '#.##') ,text_color=color.new(ts5p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts5p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS5 and showChng
        table.cell(t,3,7, str.tostring(ts5Chng, '#.##'),text_color=color.new(ts5p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts5p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS5 and showPChng
        table.cell(t,4,7, str.tostring(ts5p, '#.##') +'%',text_color=color.new(ts5p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts5p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS5 and showVwap
        table.cell(t,5,7, str.tostring(ts5vwap, '#.##'),text_color=color.new(ts5 >= ts5vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts5 >= ts5vwap ? cell_up : cell_dn ,cell_transp))
    if showS5 and showST1
        table.cell(t,6,7, st1State_st5 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st5==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st5==true ? cell_up : cell_dn ,cell_transp))
    if showS5 and showST2
        table.cell(t,7,7, st2State_st5 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st5==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st5==true ? cell_up : cell_dn ,cell_transp))
    if showS5 and showST3
        table.cell(t,8,7, st3State_st5 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st5==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st5==true ? cell_up : cell_dn ,cell_transp))
    if showS5 and showRSI
        table.cell(t,9,7, str.tostring(RSI5, '#.##'),text_color=color.new(RSI5 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI5 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx5 >= 75 and dp5 > dm5
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx5 >= 75 and dp5 < dm5
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx5 < 75 and adx5 >= 50 and dp5 > dm5
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx5 < 75 and adx5 >= 50 and dp5 < dm5
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx5 < 50 and adx5 >= 25 and dp5 > dm5
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx5 < 50 and adx5 >= 25 and dp5 < dm5
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx5 < 25      
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS5 and showADX
        table.cell(t,10,7, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl5 >0 and ml5 > sl5
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl5 <0 and ml5 < sl5
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS5 and showMACD
        table.cell(t,11,7, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts5lips > ts5teeth and ts5teeth > ts5jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts5lips < ts5teeth and ts5teeth < ts5jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts5lips > ts5teeth and ts5teeth < ts5jaw or ts5lips < ts5teeth and ts5teeth > ts5jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS5 and showAlg
        table.cell(t,12,7, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts5 > ts5PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts5 < ts5PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts5 < ts5PDH and ts5 > ts5PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS5 and showPHL
        table.cell(t,13,7, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts5 > ts5sma20 and ts5 > ts5sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts5 < ts5sma20 and ts5 < ts5sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts5 < ts5sma5H and ts5 > ts5sma20 or ts5 > ts5sma5L and ts5 < ts5sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS5 and showSmaHL
        table.cell(t,14,7, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS5 and showATR
        table.cell(t,15,7, str.tostring(ts5atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-5 data code end ----}//

//---- Display Symbol-6 data code start {----//
    if showS6
        table.cell(t,1,8, str.replace_all(t6, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS6 and showLTP
        table.cell(t,2,8, str.tostring(ts6, '#.##') ,text_color=color.new(ts6p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts6p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS6 and showChng
        table.cell(t,3,8, str.tostring(ts6Chng, '#.##'),text_color=color.new(ts6p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts6p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS6 and showPChng
        table.cell(t,4,8, str.tostring(ts6p, '#.##') +'%',text_color=color.new(ts6p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts6p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS6 and showVwap
        table.cell(t,5,8, str.tostring(ts6vwap, '#.##'),text_color=color.new(ts6 >= ts6vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts6 >= ts6vwap ? cell_up : cell_dn ,cell_transp))
    if showS6 and showST1
        table.cell(t,6,8, st1State_st6 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st6==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st6==true ? cell_up : cell_dn ,cell_transp))
    if showS6 and showST2
        table.cell(t,7,8, st2State_st6 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st6==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st6==true ? cell_up : cell_dn ,cell_transp))
    if showS6 and showST3
        table.cell(t,8,8, st3State_st6 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st6==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st6==true ? cell_up : cell_dn ,cell_transp))
    if showS6 and showRSI
        table.cell(t,9,8, str.tostring(RSI6, '#.##'),text_color=color.new(RSI6 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI6 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx6 >= 75 and dp6 > dm6
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx6 >= 75 and dp6 < dm6
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx6 < 75 and adx6 >= 50 and dp6 > dm6
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx6 < 75 and adx6 >= 50 and dp6 < dm6
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx6 < 50 and adx6 >= 25 and dp6 > dm6
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx6 < 50 and adx6 >= 25 and dp6 < dm6
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx6 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS6 and showADX
        table.cell(t,10,8, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl6 >0 and ml6 > sl6
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl6 <0 and ml6 < sl6
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS6 and showMACD
        table.cell(t,11,8, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts6lips > ts6teeth and ts6teeth > ts6jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts6lips < ts6teeth and ts6teeth < ts6jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts6lips > ts6teeth and ts6teeth < ts6jaw or ts6lips < ts6teeth and ts6teeth > ts6jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS6 and showAlg
        table.cell(t,12,8, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts6 > ts6PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts6 < ts6PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts6 < ts6PDH and ts6 > ts6PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS6 and showPHL
        table.cell(t,13,8, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts6 > ts6sma20 and ts6 > ts6sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts6 < ts6sma20 and ts6 < ts6sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts6 < ts6sma5H and ts6 > ts6sma20 or ts6 > ts6sma5L and ts6 < ts6sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS6 and showSmaHL
        table.cell(t,14,8, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS6 and showATR
        table.cell(t,15,8, str.tostring(ts6atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-6 data code end ----}//

//---- Display Symbol-7 data code start {----//
    if showS7
        table.cell(t,1,9, str.replace_all(t7, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS7 and showLTP
        table.cell(t,2,9, str.tostring(ts7, '#.##') ,text_color=color.new(ts7p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts7p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS7 and showChng
        table.cell(t,3,9, str.tostring(ts7Chng, '#.##'),text_color=color.new(ts7p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts7p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS7 and showPChng
        table.cell(t,4,9, str.tostring(ts7p, '#.##') +'%',text_color=color.new(ts7p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts7p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS7 and showVwap
        table.cell(t,5,9, str.tostring(ts7vwap, '#.##'),text_color=color.new(ts7 >= ts7vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts7 >= ts7vwap ? cell_up : cell_dn ,cell_transp))
    if showS7 and showST1
        table.cell(t,6,9, st1State_st7 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st7==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st7==true ? cell_up : cell_dn ,cell_transp))
    if showS7 and showST2
        table.cell(t,7,9, st2State_st7 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st7==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st7==true ? cell_up : cell_dn ,cell_transp))
    if showS7 and showST3
        table.cell(t,8,9, st3State_st7 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st7==true? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st7==true? cell_up : cell_dn ,cell_transp))
    if showS7 and showRSI
        table.cell(t,9,9, str.tostring(RSI7, '#.##'),text_color=color.new(RSI7 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI7 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx7 >= 75 and dp7 > dm7
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx7 >= 75 and dp7 < dm7
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx7 < 75 and adx7 >= 50 and dp7 > dm7
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx7 < 75 and adx7 >= 50 and dp7 < dm7
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx7 < 50 and adx7 >= 25 and dp7 > dm7
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx7 < 50 and adx7 >= 25 and dp7 < dm7
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx7 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS7 and showADX
        table.cell(t,10,9, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl7 >0 and ml7 > sl7
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl7 <0 and ml7 < sl7
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS7 and showMACD
        table.cell(t,11,9, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts7lips > ts7teeth and ts7teeth > ts7jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts7lips < ts7teeth and ts7teeth < ts7jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts7lips > ts7teeth and ts7teeth < ts7jaw or ts7lips < ts7teeth and ts7teeth > ts7jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS7 and showAlg
        table.cell(t,12,9, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts7 > ts7PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts7 < ts7PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts7 < ts7PDH and ts7 > ts7PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS7 and showPHL
        table.cell(t,13,9, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts7 > ts7sma20 and ts7 > ts7sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts7 < ts7sma20 and ts7 < ts7sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts7 < ts7sma5H and ts7 > ts7sma20 or ts7 > ts7sma5L and ts7 < ts7sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS7 and showSmaHL
        table.cell(t,14,9, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS7 and showATR
        table.cell(t,15,9, str.tostring(ts7atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-7 data code end ----}//

//---- Display Symbol-8 data code start {----//
    if showS8
        table.cell(t,1,10, str.replace_all(t8, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS8 and showLTP
        table.cell(t,2,10, str.tostring(ts8, '#.##') ,text_color=color.new(ts8p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts8p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS8 and showChng
        table.cell(t,3,10, str.tostring(ts8Chng, '#.##'),text_color=color.new(ts8p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts8p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS8 and showPChng
        table.cell(t,4,10, str.tostring(ts8p, '#.##') +'%',text_color=color.new(ts8p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts8p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS8 and showVwap
        table.cell(t,5,10, str.tostring(ts8vwap, '#.##'),text_color=color.new(ts8 >= ts8vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts8 >= ts8vwap ? cell_up : cell_dn ,cell_transp))
    if showS8 and showST1
        table.cell(t,6,10, st1State_st8 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st8==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st8==true ? cell_up : cell_dn ,cell_transp))
    if showS8 and showST2
        table.cell(t,7,10, st2State_st8 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st8==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st8==true ? cell_up : cell_dn ,cell_transp))
    if showS8 and showST3
        table.cell(t,8,10, st3State_st8 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st8==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st8==true ? cell_up : cell_dn ,cell_transp))
    if showS8 and showRSI
        table.cell(t,9,10, str.tostring(RSI8, '#.##'),text_color=color.new(RSI8 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI8 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx8 >= 75 and dp8 > dm8
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx8 >= 75 and dp8 < dm8
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx8 < 75 and adx8 >= 50 and dp8 > dm8
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx8 < 75 and adx8 >= 50 and dp8 < dm8
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx8 < 50 and adx8 >= 25 and dp8 > dm8
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx8 < 50 and adx8 >= 25 and dp8 < dm8
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx8 < 25      
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS8 and showADX
        table.cell(t,10,10, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl8 >0 and ml8 > sl8
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl8 <0 and ml8 < sl8
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS8 and showMACD
        table.cell(t,11,10, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts8lips > ts8teeth and ts8teeth > ts8jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts8lips < ts8teeth and ts8teeth < ts8jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts8lips > ts8teeth and ts8teeth < ts8jaw or ts8lips < ts8teeth and ts8teeth > ts8jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS8 and showAlg
        table.cell(t,12,10, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts8 > ts8PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts8 < ts8PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts8 < ts8PDH and ts8 > ts8PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS8 and showPHL
        table.cell(t,13,10, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts8 > ts8sma20 and ts8 > ts8sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts8 < ts8sma20 and ts8 < ts8sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts8 < ts8sma5H and ts8 > ts8sma20 or ts8 > ts8sma5L and ts8 < ts8sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS8 and showSmaHL
        table.cell(t,14,10, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS8 and showATR
        table.cell(t,15,10, str.tostring(ts8atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-8 data code end ----}//

//---- Display Symbol-9 data code start {----//
    if showS9
        table.cell(t,1,11, str.replace_all(t9, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS9 and showLTP
        table.cell(t,2,11, str.tostring(ts9, '#.##') ,text_color=color.new(ts9p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts9p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS9 and showChng
        table.cell(t,3,11, str.tostring(ts9Chng, '#.##'),text_color=color.new(ts9p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts9p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS9 and showPChng
        table.cell(t,4,11, str.tostring(ts9p, '#.##') +'%',text_color=color.new(ts9p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts9p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS9 and showVwap
        table.cell(t,5,11, str.tostring(ts9vwap, '#.##'),text_color=color.new(ts9 >= ts9vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts9 >= ts9vwap ? cell_up : cell_dn ,cell_transp))
    if showS9 and showST1
        table.cell(t,6,11, st1State_st9 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st9==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st9==true ? cell_up : cell_dn ,cell_transp))
    if showS9 and showST2
        table.cell(t,7,11, st2State_st9 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st9==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st9==true ? cell_up : cell_dn ,cell_transp))
    if showS9 and showST3
        table.cell(t,8,11, st3State_st9 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st9==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st9==true ? cell_up : cell_dn ,cell_transp))
    if showS9 and showRSI
        table.cell(t,9,11, str.tostring(RSI9, '#.##'),text_color=color.new(RSI9 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI9 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx9 >= 75 and dp9 > dm9
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx9 >= 75 and dp9 < dm9
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx9 < 75 and adx9 >= 50 and dp9 > dm9
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx9 < 75 and adx9 >= 50 and dp9 < dm9
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx9 < 50 and adx9 >= 25 and dp9 > dm9
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx9 < 50 and adx9 >= 25 and dp9 < dm9
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx9 < 25     
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS9 and showADX
        table.cell(t,10,11, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl9 >0 and ml9 > sl9
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl9 <0 and ml9 < sl9
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS9 and showMACD
        table.cell(t,11,11, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts9lips > ts9teeth and ts9teeth > ts9jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts9lips < ts9teeth and ts9teeth < ts9jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts9lips > ts9teeth and ts9teeth < ts9jaw or ts9lips < ts9teeth and ts9teeth > ts9jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS9 and showAlg
        table.cell(t,12,11, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts9 > ts9PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts9 < ts9PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts9 < ts9PDH and ts9 > ts9PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS9 and showPHL
        table.cell(t,13,11, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts9 > ts9sma20 and ts9 > ts9sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts9 < ts9sma20 and ts9 < ts9sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts9 < ts9sma5H and ts9 > ts9sma20 or ts9 > ts9sma5L and ts9 < ts9sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS9 and showSmaHL
        table.cell(t,14,11, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS9 and showATR
        table.cell(t,15,11, str.tostring(ts9atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-9 data code end ----}//

//---- Display Symbol-10 data code start {----//
    if showS10
        table.cell(t,1,12, str.replace_all(t10, 'NSE:', ''),text_color=color.new(col_col,txt_transp),text_size=table_text_size,bgcolor=color.new(color.blue,cell_transp))
    if showS10 and showLTP
        table.cell(t,2,12, str.tostring(ts10, '#.##') ,text_color=color.new(ts10p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts10p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS10 and showChng
        table.cell(t,3,12, str.tostring(ts10Chng, '#.##'),text_color=color.new(ts10p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts10p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS10 and showPChng
        table.cell(t,4,12, str.tostring(ts10p, '#.##') +'%',text_color=color.new(ts10p >= 0 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts10p >= 0 ? cell_up : cell_dn ,cell_transp))
    if showS10 and showVwap
        table.cell(t,5,12, str.tostring(ts10vwap, '#.##'),text_color=color.new(ts10 >= ts10vwap ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(ts10 >= ts10vwap ? cell_up : cell_dn ,cell_transp))
    if showS10 and showST1
        table.cell(t,6,12, st1State_st10 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st1State_st10==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st1State_st10==true ? cell_up : cell_dn ,cell_transp))
    if showS10 and showST2
        table.cell(t,7,12, st2State_st10 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st2State_st10==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st2State_st10==true ? cell_up : cell_dn ,cell_transp))
    if showS10 and showST3
        table.cell(t,8,12, st3State_st10 ? str.tostring('Bullish') : str.tostring('Bearish'),text_color=color.new(st3State_st10==true ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(st3State_st10==true ? cell_up : cell_dn ,cell_transp))
    if showS10 and showRSI
        table.cell(t,9,12, str.tostring(RSI10, '#.##'),text_color=color.new(RSI10 > 50 ? cell_up : cell_dn ,txt_transp),text_size=table_text_size, bgcolor=color.new(RSI10 > 50 ? cell_up : cell_dn ,cell_transp))
    if adx10 >= 75 and dp10 > dm10
        ADXColor:= color.new( cell_up ,cell_transp)
        ADXText:= 'Bullish ++'
    else if adx10 >= 75 and dp10 < dm10
        ADXColor:= color.new( cell_dn ,cell_transp)
        ADXText:= 'Bearish ++'
    else if adx10 < 75 and adx10 >= 50 and dp10 > dm10
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish +'
    else if adx10 < 75 and adx10 >= 50 and dp10 < dm10
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish +'
    else if adx10 < 50 and adx10 >= 25 and dp10 > dm10
        ADXColor:= color.new(cell_up ,cell_transp)
        ADXText:= 'Bullish'
    else if adx10 < 50 and adx10 >= 25 and dp10 < dm10
        ADXColor:= color.new(cell_dn ,cell_transp)
        ADXText:= 'Bearish'    
    else if adx10 < 25    
        ADXColor:= color.new( cell_neutral ,cell_transp) 
        ADXText:= 'Neutral' 
    if showS10 and showADX
        table.cell(t,10,12, str.tostring(ADXText),text_color=color.new(ADXColor,txt_transp),text_size=table_text_size, bgcolor=color.new(ADXColor,cell_transp))
    if hsl10 >0 and ml10 > sl10
        MACDColor:= color.new( cell_up ,cell_transp)
        MACDText:= 'Bullish'
    else if hsl10 <0 and ml10 < sl10
        MACDColor:= color.new( cell_dn ,cell_transp)
        MACDText:= 'Bearish'
    if showS10 and showMACD
        table.cell(t,11,12, str.tostring(MACDText),text_color=color.new(MACDColor,txt_transp),text_size=table_text_size, bgcolor=color.new(MACDColor,cell_transp))
    if ts10lips > ts10teeth and ts10teeth > ts10jaw
        AlgColor:= color.new( cell_up ,cell_transp)
        AlgText:= 'Bullish'
    else if ts10lips < ts10teeth and ts10teeth < ts10jaw
        AlgColor:= color.new( cell_dn ,cell_transp)
        AlgText:= 'Bearish'
    else if ts10lips > ts10teeth and ts10teeth < ts10jaw or ts10lips < ts10teeth and ts10teeth > ts10jaw
        AlgColor:= color.new( cell_neutral ,cell_transp)
        AlgText:= 'Neutral'
    if showS10 and showAlg
        table.cell(t,12,12, str.tostring(AlgText),text_color=color.new(AlgColor,txt_transp),text_size=table_text_size, bgcolor=color.new(AlgColor,cell_transp))
    if ts10 > ts10PDH
        PColor:= color.new( cell_up ,cell_transp)
        PText:= '> PDH'
    else if ts10 < ts10PDL
        PColor:= color.new( cell_dn ,cell_transp)
        PText:= '< PDL'
    else if ts10 < ts10PDH and ts10 > ts10PDL
        PColor:= color.new( cell_neutral ,cell_transp)
        PText:= '< PDH > PDL'
    if showS10 and showPHL
        table.cell(t,13,12, str.tostring(PText),text_color=color.new(PColor,txt_transp),text_size=table_text_size, bgcolor=color.new(PColor,cell_transp))
    if ts10 > ts10sma20 and ts10 > ts10sma5H
        SmaHLColor:= color.new( cell_up ,cell_transp)
        SmaHLText:= 'Bullish'
    else if ts10 < ts10sma20 and ts10 < ts10sma5L
        SmaHLColor:= color.new( cell_dn ,cell_transp)
        SmaHLText:= 'Bearish'
    else if ts10 < ts10sma5H and ts10 > ts10sma20 or ts10 > ts10sma5L and ts10 < ts10sma20
        SmaHLColor:= color.new( cell_neutral ,cell_transp)
        SmaHLText:= 'Neutral'
    if showS10 and showSmaHL
        table.cell(t,14,12, str.tostring(SmaHLText),text_color=color.new(SmaHLColor,txt_transp),text_size=table_text_size, bgcolor=color.new(SmaHLColor,cell_transp))
    if showS10 and showATR
        table.cell(t,15,12, str.tostring(ts10atr, '#.##'),text_color=color.new(cell_neutral ,txt_transp),text_size=table_text_size, bgcolor=color.new(cell_neutral ,cell_transp))
//---- Display Symbol-10 data code end ----}//

//---- Table Column & Rows code end ----}//

//-------------- Table code end -------------------}//