ابو رعد//@version=5
indicator('Royal Scanner', overlay=true)
////////////
// INPUTS //
// SMA
rsi_len = input.int( 14, title = "RSI Length", group = "Indicators")
rsi_os = input.float(30, title = "RSI Overbought", group = "Indicators")
rsi_ob = input.float(70, title = "RSI Oversold", group = "Indicators")
// TSI
tsi_long_len = input.int( 25, title = "TSI Long Length", group = "Indicators")
tsi_shrt_len = input.int( 13, title = "TSI Short Length", group = "Indicators")
tsi_ob = input.float( 30, title = "TSI Overbought", group = 'Indicators')
tsi_os = input.float(-30, title = "TSI Oversold", group = 'Indicators')
// ADX Params
adx_smooth = input.int( 14, title = "ADX Smoothing", group = 'Indicators')
adx_dilen = input.int( 14, title = "ADX DI Length", group = 'Indicators')
adx_level = input.float(40, title = "ADX Level", group = 'Indicators')
// SuperTrend
sup_atr_len = input.int( 10, "Supertrend ATR Length", group = 'Indicators')
sup_factor = input.float(3.0, "Supertrend Factor", group = 'Indicators')
/////////////
// SYMBOLS //
u01 = input.bool(true, title = "", group = 'Symbols', inline = 's01')
u02 = input.bool(true, title = "", group = 'Symbols', inline = 's02')
u03 = input.bool(true, title = "", group = 'Symbols', inline = 's03')
u04 = input.bool(true, title = "", group = 'Symbols', inline = 's04')
u05 = input.bool(true, title = "", group = 'Symbols', inline = 's05')
u06 = input.bool(true, title = "", group = 'Symbols', inline = 's06')
u07 = input.bool(true, title = "", group = 'Symbols', inline = 's07')
u08 = input.bool(true, title = "", group = 'Symbols', inline = 's08')
u09 = input.bool(true, title = "", group = 'Symbols', inline = 's09')
u10 = input.bool(true, title = "", group = 'Symbols', inline = 's10')
u11 = input.bool(true, title = "", group = 'Symbols', inline = 's11')
u12 = input.bool(true, title = "", group = 'Symbols', inline = 's12')
u13 = input.bool(true, title = "", group = 'Symbols', inline = 's13')
u14 = input.bool(true, title = "", group = 'Symbols', inline = 's14')
u15 = input.bool(true, title = "", group = 'Symbols', inline = 's15')
u16 = input.bool(true, title = "", group = 'Symbols', inline = 's16')
u17 = input.bool(true, title = "", group = 'Symbols', inline = 's17')
u18 = input.bool(true, title = "", group = 'Symbols', inline = 's18')
u19 = input.bool(true, title = "", group = 'Symbols', inline = 's19')
u20 = input.bool(true, title = "", group = 'Symbols', inline = 's20')
u21 = input.bool(true, title = "", group = 'Symbols', inline = 's21')
u22 = input.bool(true, title = "", group = 'Symbols', inline = 's22')
u23 = input.bool(true, title = "", group = 'Symbols', inline = 's23')
u24 = input.bool(true, title = "", group = 'Symbols', inline = 's24')
u25 = input.bool(true, title = "", group = 'Symbols', inline = 's25')
u26 = input.bool(true, title = "", group = 'Symbols', inline = 's26')
u27 = input.bool(true, title = "", group = 'Symbols', inline = 's27')
u28 = input.bool(true, title = "", group = 'Symbols', inline = 's28')
u29 = input.bool(true, title = "", group = 'Symbols', inline = 's29')
u30 = input.bool(true, title = "", group = 'Symbols', inline = 's30')
u31 = input.bool(true, title = "", group = 'Symbols', inline = 's31')
u32 = input.bool(true, title = "", group = 'Symbols', inline = 's32')
u33 = input.bool(true, title = "", group = 'Symbols', inline = 's33')
u34 = input.bool(true, title = "", group = 'Symbols', inline = 's34')
u35 = input.bool(true, title = "", group = 'Symbols', inline = 's35')
u36 = input.bool(false, title = "", group = 'Symbols', inline = 's36')
u37 = input.bool(false, title = "", group = 'Symbols', inline = 's37')
u38 = input.bool(false, title = "", group = 'Symbols', inline = 's38')
u39 = input.bool(false, title = "", group = 'Symbols', inline = 's39')
u40 = input.bool(false, title = "", group = 'Symbols', inline = 's40')
s01 = input.symbol('SPX500', group = 'Symbols', inline = 's01')
s02 = input.symbol('SPX500', group = 'Symbols', inline = 's02')
s03 = input.symbol('SPX500', group = 'Symbols', inline = 's03')
s04 = input.symbol('SPX500', group = 'Symbols', inline = 's04')
s05 = input.symbol('SPX500', group = 'Symbols', inline = 's05')
s06 = input.symbol('SPX500', group = 'Symbols', inline = 's06')
s07 = input.symbol('SPX500', group = 'Symbols', inline = 's07')
s08 = input.symbol('SPX500', group = 'Symbols', inline = 's08')
s09 = input.symbol('SPX500', group = 'Symbols', inline = 's09')
s10 = input.symbol('SPX500', group = 'Symbols', inline = 's10')
s11 = input.symbol('SPX500', group = 'Symbols', inline = 's11')
s12 = input.symbol('SPX500', group = 'Symbols', inline = 's12')
s13 = input.symbol('SPX500', group = 'Symbols', inline = 's13')
s14 = input.symbol('SPX500', group = 'Symbols', inline = 's14')
s15 = input.symbol('SPX500', group = 'Symbols', inline = 's15')
s16 = input.symbol('SPX500', group = 'Symbols', inline = 's16')
s17 = input.symbol('SPX500', group = 'Symbols', inline = 's17')
s18 = input.symbol('SPX500', group = 'Symbols', inline = 's18')
s19 = input.symbol('SPX500', group = 'Symbols', inline = 's19')
s20 = input.symbol('SPX500', group = 'Symbols', inline = 's20')
s21 = input.symbol('SPX500', group = 'Symbols', inline = 's21')
s22 = input.symbol('SPX500', group = 'Symbols', inline = 's22')
s23 = input.symbol('SPX500', group = 'Symbols', inline = 's23')
s24 = input.symbol('SPX500', group = 'Symbols', inline = 's24')
s25 = input.symbol('SPX500', group = 'Symbols', inline = 's25')
s26 = input.symbol('SPX500', group = 'Symbols', inline = 's26')
s27 = input.symbol('SPX500', group = 'Symbols', inline = 's27')
s28 = input.symbol('SPX500', group = 'Symbols', inline = 's28')
s29 = input.symbol('SPX500', group = 'Symbols', inline = 's29')
s30 = input.symbol('SPX500', group = 'Symbols', inline = 's30')
s31 = input.symbol('SPX500', group = 'Symbols', inline = 's31')
s32 = input.symbol('SPX500', group = 'Symbols', inline = 's32')
s33 = input.symbol('SPX500', group = 'Symbols', inline = 's33')
s34 = input.symbol('SPX500', group = 'Symbols', inline = 's34')
s35 = input.symbol('SPX500', group = 'Symbols', inline = 's35')
s36 = input.symbol('SPX500', group = 'Symbols', inline = 's36')
s37 = input.symbol('SPX500', group = 'Symbols', inline = 's37')
s38 = input.symbol('SPX500', group = 'Symbols', inline = 's38')
s39 = input.symbol('SPX500', group = 'Symbols', inline = 's39')
s40 = input.symbol('SPX500', group = 'Symbols', inline = 's40')
//////////////////
// CALCULATIONS //
// Get only symbol
only_symbol(s) =>
array.get(str.split(s, ":"), 1)
// for TSI
double_smooth(src, long, short) =>
fist_smooth = ta.ema(src, long)
ta.ema(fist_smooth, short)
// ADX
dirmov(len) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
adx_func(dilen, adxlen) =>
= dirmov(dilen)
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
screener_func() =>
// RSI
rsi = ta.rsi(close, rsi_len)
// TSI
pc = ta.change(close)
double_smoothed_pc = double_smooth(pc, tsi_long_len, tsi_shrt_len)
double_smoothed_abs_pc = double_smooth(math.abs(pc), tsi_long_len, tsi_shrt_len)
tsi = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
// ADX
adx = adx_func(adx_dilen, adx_smooth)
// Supertrend
= ta.supertrend(sup_factor, sup_atr_len)
// Security call
= request.security(s01, timeframe.period, screener_func())
= request.security(s02, timeframe.period, screener_func())
= request.security(s03, timeframe.period, screener_func())
= request.security(s04, timeframe.period, screener_func())
= request.security(s05, timeframe.period, screener_func())
= request.security(s06, timeframe.period, screener_func())
= request.security(s07, timeframe.period, screener_func())
= request.security(s08, timeframe.period, screener_func())
= request.security(s09, timeframe.period, screener_func())
= request.security(s10, timeframe.period, screener_func())
= request.security(s11, timeframe.period, screener_func())
= request.security(s12, timeframe.period, screener_func())
= request.security(s13, timeframe.period, screener_func())
= request.security(s14, timeframe.period, screener_func())
= request.security(s15, timeframe.period, screener_func())
= request.security(s16, timeframe.period, screener_func())
= request.security(s17, timeframe.period, screener_func())
= request.security(s18, timeframe.period, screener_func())
= request.security(s19, timeframe.period, screener_func())
= request.security(s20, timeframe.period, screener_func())
= request.security(s21, timeframe.period, screener_func())
= request.security(s22, timeframe.period, screener_func())
= request.security(s23, timeframe.period, screener_func())
= request.security(s24, timeframe.period, screener_func())
= request.security(s25, timeframe.period, screener_func())
= request.security(s26, timeframe.period, screener_func())
= request.security(s27, timeframe.period, screener_func())
= request.security(s28, timeframe.period, screener_func())
= request.security(s29, timeframe.period, screener_func())
= request.security(s30, timeframe.period, screener_func())
= request.security(s31, timeframe.period, screener_func())
= request.security(s32, timeframe.period, screener_func())
= request.security(s33, timeframe.period, screener_func())
= request.security(s34, timeframe.period, screener_func())
= request.security(s35, timeframe.period, screener_func())
= request.security(s36, timeframe.period, screener_func())
= request.security(s37, timeframe.period, screener_func())
= request.security(s38, timeframe.period, screener_func())
= request.security(s39, timeframe.period, screener_func())
= request.security(s40, timeframe.period, screener_func())
////////////
// ARRAYS //
s_arr = array.new_string(0)
u_arr = array.new_bool(0)
cl_arr = array.new_float(0)
rsi_arr = array.new_float(0)
tsi_arr = array.new_float(0)
adx_arr = array.new_float(0)
sup_arr = array.new_float(0)
// Add Symbols
array.push(s_arr, only_symbol(s01))
array.push(s_arr, only_symbol(s02))
array.push(s_arr, only_symbol(s03))
array.push(s_arr, only_symbol(s04))
array.push(s_arr, only_symbol(s05))
array.push(s_arr, only_symbol(s06))
array.push(s_arr, only_symbol(s07))
array.push(s_arr, only_symbol(s08))
array.push(s_arr, only_symbol(s09))
array.push(s_arr, only_symbol(s10))
array.push(s_arr, only_symbol(s11))
array.push(s_arr, only_symbol(s12))
array.push(s_arr, only_symbol(s13))
array.push(s_arr, only_symbol(s14))
array.push(s_arr, only_symbol(s15))
array.push(s_arr, only_symbol(s16))
array.push(s_arr, only_symbol(s17))
array.push(s_arr, only_symbol(s18))
array.push(s_arr, only_symbol(s19))
array.push(s_arr, only_symbol(s20))
array.push(s_arr, only_symbol(s21))
array.push(s_arr, only_symbol(s22))
array.push(s_arr, only_symbol(s23))
array.push(s_arr, only_symbol(s24))
array.push(s_arr, only_symbol(s25))
array.push(s_arr, only_symbol(s26))
array.push(s_arr, only_symbol(s27))
array.push(s_arr, only_symbol(s28))
array.push(s_arr, only_symbol(s29))
array.push(s_arr, only_symbol(s30))
array.push(s_arr, only_symbol(s31))
array.push(s_arr, only_symbol(s32))
array.push(s_arr, only_symbol(s33))
array.push(s_arr, only_symbol(s34))
array.push(s_arr, only_symbol(s35))
array.push(s_arr, only_symbol(s36))
array.push(s_arr, only_symbol(s37))
array.push(s_arr, only_symbol(s38))
array.push(s_arr, only_symbol(s39))
array.push(s_arr, only_symbol(s40))
///////////
// FLAGS //
array.push(u_arr, u01)
array.push(u_arr, u02)
array.push(u_arr, u03)
array.push(u_arr, u04)
array.push(u_arr, u05)
array.push(u_arr, u06)
array.push(u_arr, u07)
array.push(u_arr, u08)
array.push(u_arr, u09)
array.push(u_arr, u10)
array.push(u_arr, u11)
array.push(u_arr, u12)
array.push(u_arr, u13)
array.push(u_arr, u14)
array.push(u_arr, u15)
array.push(u_arr, u16)
array.push(u_arr, u17)
array.push(u_arr, u18)
array.push(u_arr, u19)
array.push(u_arr, u20)
array.push(u_arr, u21)
array.push(u_arr, u22)
array.push(u_arr, u23)
array.push(u_arr, u24)
array.push(u_arr, u25)
array.push(u_arr, u26)
array.push(u_arr, u27)
array.push(u_arr, u28)
array.push(u_arr, u29)
array.push(u_arr, u30)
array.push(u_arr, u31)
array.push(u_arr, u32)
array.push(u_arr, u33)
array.push(u_arr, u34)
array.push(u_arr, u35)
array.push(u_arr, u36)
array.push(u_arr, u37)
array.push(u_arr, u38)
array.push(u_arr, u39)
array.push(u_arr, u40)
///////////
// CLOSE //
array.push(cl_arr, cl01)
array.push(cl_arr, cl02)
array.push(cl_arr, cl03)
array.push(cl_arr, cl04)
array.push(cl_arr, cl05)
array.push(cl_arr, cl06)
array.push(cl_arr, cl07)
array.push(cl_arr, cl08)
array.push(cl_arr, cl09)
array.push(cl_arr, cl10)
array.push(cl_arr, cl11)
array.push(cl_arr, cl12)
array.push(cl_arr, cl13)
array.push(cl_arr, cl14)
array.push(cl_arr, cl15)
array.push(cl_arr, cl16)
array.push(cl_arr, cl17)
array.push(cl_arr, cl18)
array.push(cl_arr, cl19)
array.push(cl_arr, cl20)
array.push(cl_arr, cl21)
array.push(cl_arr, cl22)
array.push(cl_arr, cl23)
array.push(cl_arr, cl24)
array.push(cl_arr, cl25)
array.push(cl_arr, cl26)
array.push(cl_arr, cl27)
array.push(cl_arr, cl28)
array.push(cl_arr, cl29)
array.push(cl_arr, cl30)
array.push(cl_arr, cl31)
array.push(cl_arr, cl32)
array.push(cl_arr, cl33)
array.push(cl_arr, cl34)
array.push(cl_arr, cl35)
array.push(cl_arr, cl36)
array.push(cl_arr, cl37)
array.push(cl_arr, cl38)
array.push(cl_arr, cl39)
array.push(cl_arr, cl40)
/////////
// RSI //
array.push(rsi_arr, rsi01)
array.push(rsi_arr, rsi02)
array.push(rsi_arr, rsi03)
array.push(rsi_arr, rsi04)
array.push(rsi_arr, rsi05)
array.push(rsi_arr, rsi06)
array.push(rsi_arr, rsi07)
array.push(rsi_arr, rsi08)
array.push(rsi_arr, rsi09)
array.push(rsi_arr, rsi10)
array.push(rsi_arr, rsi11)
array.push(rsi_arr, rsi12)
array.push(rsi_arr, rsi13)
array.push(rsi_arr, rsi14)
array.push(rsi_arr, rsi15)
array.push(rsi_arr, rsi16)
array.push(rsi_arr, rsi17)
array.push(rsi_arr, rsi18)
array.push(rsi_arr, rsi19)
array.push(rsi_arr, rsi20)
array.push(rsi_arr, rsi21)
array.push(rsi_arr, rsi22)
array.push(rsi_arr, rsi23)
array.push(rsi_arr, rsi24)
array.push(rsi_arr, rsi25)
array.push(rsi_arr, rsi26)
array.push(rsi_arr, rsi27)
array.push(rsi_arr, rsi28)
array.push(rsi_arr, rsi29)
array.push(rsi_arr, rsi30)
array.push(rsi_arr, rsi31)
array.push(rsi_arr, rsi32)
array.push(rsi_arr, rsi33)
array.push(rsi_arr, rsi34)
array.push(rsi_arr, rsi35)
array.push(rsi_arr, rsi36)
array.push(rsi_arr, rsi37)
array.push(rsi_arr, rsi38)
array.push(rsi_arr, rsi39)
array.push(rsi_arr, rsi40)
/////////
// TSI //
array.push(tsi_arr, tsi01)
array.push(tsi_arr, tsi02)
array.push(tsi_arr, tsi03)
array.push(tsi_arr, tsi04)
array.push(tsi_arr, tsi05)
array.push(tsi_arr, tsi06)
array.push(tsi_arr, tsi07)
array.push(tsi_arr, tsi08)
array.push(tsi_arr, tsi09)
array.push(tsi_arr, tsi10)
array.push(tsi_arr, tsi11)
array.push(tsi_arr, tsi12)
array.push(tsi_arr, tsi13)
array.push(tsi_arr, tsi14)
array.push(tsi_arr, tsi15)
array.push(tsi_arr, tsi16)
array.push(tsi_arr, tsi17)
array.push(tsi_arr, tsi18)
array.push(tsi_arr, tsi19)
array.push(tsi_arr, tsi20)
array.push(tsi_arr, tsi21)
array.push(tsi_arr, tsi22)
array.push(tsi_arr, tsi23)
array.push(tsi_arr, tsi24)
array.push(tsi_arr, tsi25)
array.push(tsi_arr, tsi26)
array.push(tsi_arr, tsi27)
array.push(tsi_arr, tsi28)
array.push(tsi_arr, tsi29)
array.push(tsi_arr, tsi30)
array.push(tsi_arr, tsi31)
array.push(tsi_arr, tsi32)
array.push(tsi_arr, tsi33)
array.push(tsi_arr, tsi34)
array.push(tsi_arr, tsi35)
array.push(tsi_arr, tsi36)
array.push(tsi_arr, tsi37)
array.push(tsi_arr, tsi38)
array.push(tsi_arr, tsi39)
array.push(tsi_arr, tsi40)
/////////
// ADX //
array.push(adx_arr, adx01)
array.push(adx_arr, adx02)
array.push(adx_arr, adx03)
array.push(adx_arr, adx04)
array.push(adx_arr, adx05)
array.push(adx_arr, adx06)
array.push(adx_arr, adx07)
array.push(adx_arr, adx08)
array.push(adx_arr, adx09)
array.push(adx_arr, adx10)
array.push(adx_arr, adx11)
array.push(adx_arr, adx12)
array.push(adx_arr, adx13)
array.push(adx_arr, adx14)
array.push(adx_arr, adx15)
array.push(adx_arr, adx16)
array.push(adx_arr, adx17)
array.push(adx_arr, adx18)
array.push(adx_arr, adx19)
array.push(adx_arr, adx20)
array.push(adx_arr, adx21)
array.push(adx_arr, adx22)
array.push(adx_arr, adx23)
array.push(adx_arr, adx24)
array.push(adx_arr, adx25)
array.push(adx_arr, adx26)
array.push(adx_arr, adx27)
array.push(adx_arr, adx28)
array.push(adx_arr, adx29)
array.push(adx_arr, adx30)
array.push(adx_arr, adx31)
array.push(adx_arr, adx32)
array.push(adx_arr, adx33)
array.push(adx_arr, adx34)
array.push(adx_arr, adx35)
array.push(adx_arr, adx36)
array.push(adx_arr, adx37)
array.push(adx_arr, adx38)
array.push(adx_arr, adx39)
array.push(adx_arr, adx40)
////////////////
// SUPERTREND //
array.push(sup_arr, sup01)
array.push(sup_arr, sup02)
array.push(sup_arr, sup03)
array.push(sup_arr, sup04)
array.push(sup_arr, sup05)
array.push(sup_arr, sup06)
array.push(sup_arr, sup07)
array.push(sup_arr, sup08)
array.push(sup_arr, sup09)
array.push(sup_arr, sup10)
array.push(sup_arr, sup11)
array.push(sup_arr, sup12)
array.push(sup_arr, sup13)
array.push(sup_arr, sup14)
array.push(sup_arr, sup15)
array.push(sup_arr, sup16)
array.push(sup_arr, sup17)
array.push(sup_arr, sup18)
array.push(sup_arr, sup19)
array.push(sup_arr, sup20)
array.push(sup_arr, sup21)
array.push(sup_arr, sup22)
array.push(sup_arr, sup23)
array.push(sup_arr, sup24)
array.push(sup_arr, sup25)
array.push(sup_arr, sup26)
array.push(sup_arr, sup27)
array.push(sup_arr, sup28)
array.push(sup_arr, sup29)
array.push(sup_arr, sup30)
array.push(sup_arr, sup31)
array.push(sup_arr, sup32)
array.push(sup_arr, sup33)
array.push(sup_arr, sup34)
array.push(sup_arr, sup35)
array.push(sup_arr, sup36)
array.push(sup_arr, sup37)
array.push(sup_arr, sup38)
array.push(sup_arr, sup39)
array.push(sup_arr, sup40)
///////////
// PLOTS //
var tbl = table.new(position.top_right, 6, 41, frame_color=#151715, frame_width=2, border_width=2, border_color=color.new(#ffd900, 0))
if barstate.islast
table.cell(tbl, 0, 0, 'Symbol', text_halign = text.align_center, bgcolor = color.rgb(70, 104, 255), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 1, 0, 'Price', text_halign = text.align_center, bgcolor = color.rgb(0,39,76), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 2, 0, 'RSI', text_halign = text.align_center, bgcolor = color.rgb(0,39,76), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 3, 0, 'TSI', text_halign = text.align_center, bgcolor = color.rgb(0,39,76), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 4, 0, 'ADX', text_halign = text.align_center, bgcolor = color.rgb(0,39,76), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 5, 0, 'Supertrend', text_halign = text.align_center, bgcolor = color.rgb(0,39,76), text_color = color.new(#ffd900, 0), text_size = size.small)
for i = 0 to 39
if array.get(u_arr, i)
rsi_col = array.get(rsi_arr, i) > rsi_ob ? color.red : array.get(rsi_arr, i) < rsi_os ? color.green : #000000
tsi_col = array.get(tsi_arr, i) > tsi_ob ? color.red : array.get(tsi_arr, i) < tsi_os ? color.green : #000000
adx_col = array.get(adx_arr, i) > adx_level ? color.green : #000000
sup_text = array.get(sup_arr, i) > 0 ? "Down" : "Up"
sup_col = array.get(sup_arr, i) > 0 ? color.green : color.rgb(255, 0, 0)
table.cell(tbl, 0, i + 1, array.get(s_arr, i), text_halign = text.align_left, bgcolor = color.rgb(70, 104, 255), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 1, i + 1, str.tostring(array.get(cl_arr, i)), text_halign = text.align_center, bgcolor = color.rgb(0, 0, 0), text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 2, i + 1, str.tostring(array.get(rsi_arr, i), "#.##"), text_halign = text.align_center, bgcolor = rsi_col, text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 3, i + 1, str.tostring(array.get(tsi_arr, i), "#.##"), text_halign = text.align_center, bgcolor = tsi_col, text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 4, i + 1, str.tostring(array.get(adx_arr, i), "#.##"), text_halign = text.align_center, bgcolor = adx_col , text_color = color.new(#ffd900, 0), text_size = size.small)
table.cell(tbl, 5, i + 1, sup_text, text_halign = text.align_center, bgcolor = sup_col, text_color = color.new(#ffffff, 0), text_size = size.small)