Stock Screener
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © yosimadsu

// QQE Mod by Glaz, modified
// RMO by LazyBear

//@version=5
indicator("Stock Screener")

t01 = input.symbol("BATS:META", "Ticker 1",  group="Tickers", inline="a")
t02 = input.symbol("BATS:META", "Ticker 2",  group="Tickers", inline="b")
t03 = input.symbol("BATS:META", "Ticker 3",  group="Tickers", inline="c")
t04 = input.symbol("BATS:META", "Ticker 4",  group="Tickers", inline="d")
t05 = input.symbol("BATS:META", "Ticker 5",  group="Tickers", inline="e")
t06 = input.symbol("BATS:META", "Ticker 6",  group="Tickers", inline="f")
t07 = input.symbol("BATS:META", "Ticker 7",  group="Tickers", inline="g")
t08 = input.symbol("BATS:META", "Ticker 8",  group="Tickers", inline="h")
t09 = input.symbol("BATS:META", "Ticker 9",  group="Tickers", inline="i")
t10 = input.symbol("BATS:META", "Ticker 10", group="Tickers", inline="j")
t11 = input.symbol("BATS:META", "Ticker 11", group="Tickers", inline="k")
t12 = input.symbol("BATS:META", "Ticker 12", group="Tickers", inline="l")
t13 = input.symbol("BATS:META", "Ticker 13", group="Tickers", inline="m")
t14 = input.symbol("BATS:META", "Ticker 14", group="Tickers", inline="n")
t15 = input.symbol("BATS:META", "Ticker 15", group="Tickers", inline="o")
t16 = input.symbol("BATS:META", "Ticker 16", group="Tickers", inline="p")
t17 = input.symbol("BATS:META", "Ticker 17", group="Tickers", inline="q")
t18 = input.symbol("BATS:META", "Ticker 18", group="Tickers", inline="r")
t19 = input.symbol("BATS:META", "Ticker 19", group="Tickers", inline="s")
t20 = input.symbol("BATS:META", "Ticker 20", group="Tickers", inline="t")

c01 = input.color(color.yellow, "", group="Tickers",  inline="a")
c02 = input.color(color.yellow, "", group="Tickers",  inline="b")
c03 = input.color(color.yellow, "", group="Tickers",  inline="c")
c04 = input.color(color.yellow, "", group="Tickers",  inline="d")
c05 = input.color(color.yellow, "", group="Tickers",  inline="e")
c06 = input.color(color.yellow, "", group="Tickers",  inline="f")
c07 = input.color(color.yellow, "", group="Tickers",  inline="g")
c08 = input.color(color.yellow, "", group="Tickers",  inline="h")
c09 = input.color(color.yellow, "", group="Tickers",  inline="i")
c10 = input.color(color.yellow, "", group="Tickers", inline="j")
c11 = input.color(color.yellow, "", group="Tickers", inline="k")
c12 = input.color(color.yellow, "", group="Tickers", inline="l")
c13 = input.color(color.yellow, "", group="Tickers", inline="m")
c14 = input.color(color.yellow, "", group="Tickers", inline="n")
c15 = input.color(color.yellow, "", group="Tickers", inline="o")
c16 = input.color(color.yellow, "", group="Tickers", inline="p")
c17 = input.color(color.yellow, "", group="Tickers", inline="q")
c18 = input.color(color.yellow, "", group="Tickers", inline="r")
c19 = input.color(color.yellow, "", group="Tickers", inline="s")
c20 = input.color(color.yellow, "", group="Tickers", inline="t")

//
// QQE MOD
//

RSI_Period = input(6, title='RSI Length', group="Settings")
RSI_Smooth = input(5, title='RSI Smoothing', group="Settings")
QQE = input(3, title='Fast QQE Factor', group="Settings")
Threshold = input(3, title='Thresh-hold', group="Settings")
tfLow = input.timeframe('120', "Lower Timeframe", group="Settings")
tfHigh = input.timeframe('D', "Higher Timeframe", group="Settings")
length = input.int(50, minval=1, title='Bollinger Length', group="Settings")
mult = input.float(0.35, minval=0.001, maxval=5, step=0.1, title='BB Multiplier', group="Settings")

Wilders_Period = RSI_Period * 2 - 1

qqermo(src) =>
    longband = 0.0
    shortband = 0.0
    trend = 0
    
    Rsi = ta.rsi(src, RSI_Period)
    RsiMa = ta.ema(Rsi, RSI_Smooth)
    AtrRsi = math.abs(RsiMa[1] - RsiMa)
    MaAtrRsi = ta.ema(AtrRsi, Wilders_Period)
    DeltaFastAtrRsi = ta.ema(MaAtrRsi, Wilders_Period) * QQE
   
    newshortband = RsiMa + DeltaFastAtrRsi
    newlongband = RsiMa - DeltaFastAtrRsi
    longband := RsiMa[1] > longband[1] and RsiMa > longband[1] ? math.max(longband[1], newlongband) : newlongband
    shortband := RsiMa[1] < shortband[1] and RsiMa < shortband[1] ? math.min(shortband[1], newshortband) : newshortband
    cross_1 = ta.cross(longband[1], RsiMa)
    trend := ta.cross(RsiMa, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
    FastAtrRsiTL = trend == 1 ? longband : shortband
    
    basis = ta.sma(FastAtrRsiTL - 50, length)
    dev = mult * ta.stdev(FastAtrRsiTL - 50, length)
    upper = basis + dev
    lower = basis - dev
    
    Greenbar1 = RsiMa - 50 > Threshold
    Greenbar2 = RsiMa - 50 > upper
    
    Redbar1 = RsiMa - 50 < 0 - Threshold
    Redbar2 = RsiMa - 50 < lower
    
    qqe_result = Greenbar1 and Greenbar2 ? "🔹" : Redbar1 and Redbar2 ? "🔸" : RsiMa - 50 > Threshold ? "◽" : ""
    
    //
    // RMO
    //
    ma1 = ta.sma(src, 2)
    ma2 = ta.sma(ma1, 2)
    ma3 = ta.sma(ma2, 2)
    ma4 = ta.sma(ma3, 2)
    ma5 = ta.sma(ma4, 2)
    ma6 = ta.sma(ma5, 2)
    ma7 = ta.sma(ma6, 2)
    ma8 = ta.sma(ma7, 2)
    ma9 = ta.sma(ma8, 2)
    ma10 = ta.sma(ma9, 2)
    SwingTrd1 = 100 * (src - (ma1 + ma2 + ma3 + ma4 + ma5 + ma6 + ma7 + ma8 + ma9 + ma10) / 10) / (ta.highest(src, 10) - ta.lowest(src, 10))
    SwingTrd2 = ta.ema(SwingTrd1, 30)
    SwingTrd3 = ta.ema(SwingTrd2, 30)
    RMO = ta.ema(SwingTrd1, 81)
    Bull_Trend = ta.ema(SwingTrd1, 81) > 0
    Impulse_UP = SwingTrd2 > 0
    Impulse_Down = RMO < 0
    bg_result = Impulse_UP ? color.aqua : Impulse_Down ? color.red : Bull_Trend ? color.aqua : color.white
    
    [qqe_result, bg_result]

//
// TICKERS
//

[m01, p01] = request.security(t01, tfHigh, qqermo(close))
[m02, p02] = request.security(t02, tfHigh, qqermo(close))
[m03, p03] = request.security(t03, tfHigh, qqermo(close))
[m04, p04] = request.security(t04, tfHigh, qqermo(close))
[m05, p05] = request.security(t05, tfHigh, qqermo(close))
[m06, p06] = request.security(t06, tfHigh, qqermo(close))
[m07, p07] = request.security(t07, tfHigh, qqermo(close))
[m08, p08] = request.security(t08, tfHigh, qqermo(close))
[m09, p09] = request.security(t09, tfHigh, qqermo(close))
[m10, p10] = request.security(t10, tfHigh, qqermo(close))
[m11, p11] = request.security(t11, tfHigh, qqermo(close))
[m12, p12] = request.security(t12, tfHigh, qqermo(close))
[m13, p13] = request.security(t13, tfHigh, qqermo(close))
[m14, p14] = request.security(t14, tfHigh, qqermo(close))
[m15, p15] = request.security(t15, tfHigh, qqermo(close))
[m16, p16] = request.security(t16, tfHigh, qqermo(close))
[m17, p17] = request.security(t17, tfHigh, qqermo(close))
[m18, p18] = request.security(t18, tfHigh, qqermo(close))
[m19, p19] = request.security(t19, tfHigh, qqermo(close))
[m20, p20] = request.security(t20, tfHigh, qqermo(close))

[q01, r01] = request.security(t01, tfLow, qqermo(close))
[q02, r02] = request.security(t02, tfLow, qqermo(close))
[q03, r03] = request.security(t03, tfLow, qqermo(close))
[q04, r04] = request.security(t04, tfLow, qqermo(close))
[q05, r05] = request.security(t05, tfLow, qqermo(close))
[q06, r06] = request.security(t06, tfLow, qqermo(close))
[q07, r07] = request.security(t07, tfLow, qqermo(close))
[q08, r08] = request.security(t08, tfLow, qqermo(close))
[q09, r09] = request.security(t09, tfLow, qqermo(close))
[q10, r10] = request.security(t10, tfLow, qqermo(close))
[q11, r11] = request.security(t11, tfLow, qqermo(close))
[q12, r12] = request.security(t12, tfLow, qqermo(close))
[q13, r13] = request.security(t13, tfLow, qqermo(close))
[q14, r14] = request.security(t14, tfLow, qqermo(close))
[q15, r15] = request.security(t15, tfLow, qqermo(close))
[q16, r16] = request.security(t16, tfLow, qqermo(close))
[q17, r17] = request.security(t17, tfLow, qqermo(close))
[q18, r18] = request.security(t18, tfLow, qqermo(close))
[q19, r19] = request.security(t19, tfLow, qqermo(close))
[q20, r20] = request.security(t20, tfLow, qqermo(close))

//
// TABLE
//

var tabel = table.new(position = position.middle_center, columns = 27, rows = 10, bgcolor = na, border_color=na, border_width = 1)

if barstate.islast
    table.cell(table_id = tabel, row = 0, column =  0, text = q01[7], bgcolor=r01[7])
    table.cell(table_id = tabel, row = 0, column =  1, text = q01[6], bgcolor=r01[6])
    table.cell(table_id = tabel, row = 0, column =  2, text = q01[5], bgcolor=r01[5])
    table.cell(table_id = tabel, row = 0, column =  3, text = q01[4], bgcolor=r01[4])
    table.cell(table_id = tabel, row = 0, column =  4, text = q01[3], bgcolor=r01[3])
    table.cell(table_id = tabel, row = 0, column =  5, text = q01[2], bgcolor=r01[2])
    table.cell(table_id = tabel, row = 0, column =  6, text = q01[1], bgcolor=r01[1])
    table.cell(table_id = tabel, row = 0, column =  7, text = q01[0], bgcolor=r01[0])
    table.cell(table_id = tabel, row = 0, column =  8, text =                t01, bgcolor=c01)
    table.cell(table_id = tabel, row = 0, column =  9, text = m01[3], bgcolor=p01[3])
    table.cell(table_id = tabel, row = 0, column = 10, text = m01[2], bgcolor=p01[2])
    table.cell(table_id = tabel, row = 0, column = 11, text = m01[1], bgcolor=p01[1])
    table.cell(table_id = tabel, row = 0, column = 12, text = m01[0], bgcolor=p01[0])
	
    table.cell(table_id = tabel, row = 0, column = 13, text = "    ")

    table.cell(table_id = tabel, row = 0, column = 14, text = q02[7], bgcolor=r02[7])
    table.cell(table_id = tabel, row = 0, column = 15, text = q02[6], bgcolor=r02[6])
    table.cell(table_id = tabel, row = 0, column = 16, text = q02[5], bgcolor=r02[5])
    table.cell(table_id = tabel, row = 0, column = 17, text = q02[4], bgcolor=r02[4])
    table.cell(table_id = tabel, row = 0, column = 18, text = q02[3], bgcolor=r02[3])
    table.cell(table_id = tabel, row = 0, column = 19, text = q02[2], bgcolor=r02[2])
    table.cell(table_id = tabel, row = 0, column = 20, text = q02[1], bgcolor=r02[1])
    table.cell(table_id = tabel, row = 0, column = 21, text = q02[0], bgcolor=r02[0])
    table.cell(table_id = tabel, row = 0, column = 22, text =                t02, bgcolor=c02)
    table.cell(table_id = tabel, row = 0, column = 23, text = m02[3], bgcolor=p02[3])
    table.cell(table_id = tabel, row = 0, column = 24, text = m02[2], bgcolor=p02[2])
    table.cell(table_id = tabel, row = 0, column = 25, text = m02[1], bgcolor=p02[1])
    table.cell(table_id = tabel, row = 0, column = 26, text = m02[0], bgcolor=p02[0])
	

    table.cell(table_id = tabel, row = 1, column =  0, text = q03[7], bgcolor=r03[7])
    table.cell(table_id = tabel, row = 1, column =  1, text = q03[6], bgcolor=r03[6])
    table.cell(table_id = tabel, row = 1, column =  2, text = q03[5], bgcolor=r03[5])
    table.cell(table_id = tabel, row = 1, column =  3, text = q03[4], bgcolor=r03[4])
    table.cell(table_id = tabel, row = 1, column =  4, text = q03[3], bgcolor=r03[3])
    table.cell(table_id = tabel, row = 1, column =  5, text = q03[2], bgcolor=r03[2])
    table.cell(table_id = tabel, row = 1, column =  6, text = q03[1], bgcolor=r03[1])
    table.cell(table_id = tabel, row = 1, column =  7, text = q03[0], bgcolor=r03[0])
    table.cell(table_id = tabel, row = 1, column =  8, text =                t03, bgcolor=c03)          
    table.cell(table_id = tabel, row = 1, column =  9, text = m03[3], bgcolor=p03[3])
    table.cell(table_id = tabel, row = 1, column = 10, text = m03[2], bgcolor=p03[2])
    table.cell(table_id = tabel, row = 1, column = 11, text = m03[1], bgcolor=p03[1])
    table.cell(table_id = tabel, row = 1, column = 12, text = m03[0], bgcolor=p03[0])
									    
    table.cell(table_id = tabel, row = 1, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 1, column = 14, text = q04[7], bgcolor=r04[7])
    table.cell(table_id = tabel, row = 1, column = 15, text = q04[6], bgcolor=r04[6])
    table.cell(table_id = tabel, row = 1, column = 16, text = q04[5], bgcolor=r04[5])
    table.cell(table_id = tabel, row = 1, column = 17, text = q04[4], bgcolor=r04[4])
    table.cell(table_id = tabel, row = 1, column = 18, text = q04[3], bgcolor=r04[3])
    table.cell(table_id = tabel, row = 1, column = 19, text = q04[2], bgcolor=r04[2])
    table.cell(table_id = tabel, row = 1, column = 20, text = q04[1], bgcolor=r04[1])
    table.cell(table_id = tabel, row = 1, column = 21, text = q04[0], bgcolor=r04[0])
    table.cell(table_id = tabel, row = 1, column = 22, text =               t04, bgcolor=c04)         
    table.cell(table_id = tabel, row = 1, column = 23, text = m04[3], bgcolor=p04[3])
    table.cell(table_id = tabel, row = 1, column = 24, text = m04[2], bgcolor=p04[2])
    table.cell(table_id = tabel, row = 1, column = 25, text = m04[1], bgcolor=p04[1])
    table.cell(table_id = tabel, row = 1, column = 26, text = m04[0], bgcolor=p04[0])
	
	

    table.cell(table_id = tabel, row = 2, column = 	0, text = q05[7], bgcolor=r05[7])
    table.cell(table_id = tabel, row = 2, column = 	1, text = q05[6], bgcolor=r05[6])
    table.cell(table_id = tabel, row = 2, column = 	2, text = q05[5], bgcolor=r05[5])
    table.cell(table_id = tabel, row = 2, column = 	3, text = q05[4], bgcolor=r05[4])
    table.cell(table_id = tabel, row = 2, column = 	4, text = q05[3], bgcolor=r05[3])
    table.cell(table_id = tabel, row = 2, column = 	5, text = q05[2], bgcolor=r05[2])
    table.cell(table_id = tabel, row = 2, column = 	6, text = q05[1], bgcolor=r05[1])
    table.cell(table_id = tabel, row = 2, column = 	7, text = q05[0], bgcolor=r05[0])
    table.cell(table_id = tabel, row = 2, column = 	8, text =               t05, bgcolor=c05)          
    table.cell(table_id = tabel, row = 2, column =  9, text = m05[3], bgcolor=p05[3])
    table.cell(table_id = tabel, row = 2, column = 10, text = m05[2], bgcolor=p05[2])
    table.cell(table_id = tabel, row = 2, column = 11, text = m05[1], bgcolor=p05[1])
    table.cell(table_id = tabel, row = 2, column = 12, text = m05[0], bgcolor=p05[0])
									    
    table.cell(table_id = tabel, row = 2, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 2, column = 14, text = q06[7], bgcolor=r06[7])
    table.cell(table_id = tabel, row = 2, column = 15, text = q06[6], bgcolor=r06[6])
    table.cell(table_id = tabel, row = 2, column = 16, text = q06[5], bgcolor=r06[5])
    table.cell(table_id = tabel, row = 2, column = 17, text = q06[4], bgcolor=r06[4])
    table.cell(table_id = tabel, row = 2, column = 18, text = q06[3], bgcolor=r06[3])
    table.cell(table_id = tabel, row = 2, column = 19, text = q06[2], bgcolor=r06[2])
    table.cell(table_id = tabel, row = 2, column = 20, text = q06[1], bgcolor=r06[1])
    table.cell(table_id = tabel, row = 2, column = 21, text = q06[0], bgcolor=r06[0])
    table.cell(table_id = tabel, row = 2, column = 22, text =               t06, bgcolor=c06)          
    table.cell(table_id = tabel, row = 2, column = 23, text = m06[3], bgcolor=p06[3])
    table.cell(table_id = tabel, row = 2, column = 24, text = m06[2], bgcolor=p06[2])
    table.cell(table_id = tabel, row = 2, column = 25, text = m06[1], bgcolor=p06[1])
    table.cell(table_id = tabel, row = 2, column = 26, text = m06[0], bgcolor=p06[0])
	
	
	
    table.cell(table_id = tabel, row = 3, column =  0, text = q07[7], bgcolor=r07[7])
    table.cell(table_id = tabel, row = 3, column =  1, text = q07[6], bgcolor=r07[6])
    table.cell(table_id = tabel, row = 3, column =  2, text = q07[5], bgcolor=r07[5])
    table.cell(table_id = tabel, row = 3, column =  3, text = q07[4], bgcolor=r07[4])
    table.cell(table_id = tabel, row = 3, column =  4, text = q07[3], bgcolor=r07[3])
    table.cell(table_id = tabel, row = 3, column =  5, text = q07[2], bgcolor=r07[2])
    table.cell(table_id = tabel, row = 3, column =  6, text = q07[1], bgcolor=r07[1])
    table.cell(table_id = tabel, row = 3, column =  7, text = q07[0], bgcolor=r07[0])
    table.cell(table_id = tabel, row = 3, column =  8, text =               t07, bgcolor=c07)          
    table.cell(table_id = tabel, row = 3, column =  9, text = m07[3], bgcolor=p07[3])
    table.cell(table_id = tabel, row = 3, column = 10, text = m07[2], bgcolor=p07[2])
    table.cell(table_id = tabel, row = 3, column = 11, text = m07[1], bgcolor=p07[1])
    table.cell(table_id = tabel, row = 3, column = 12, text = m07[0], bgcolor=p07[0])
									    
    table.cell(table_id = tabel, row = 3, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 3, column = 14, text = q08[7], bgcolor=r08[7])
    table.cell(table_id = tabel, row = 3, column = 15, text = q08[6], bgcolor=r08[6])
    table.cell(table_id = tabel, row = 3, column = 16, text = q08[5], bgcolor=r08[5])
    table.cell(table_id = tabel, row = 3, column = 17, text = q08[4], bgcolor=r08[4])
    table.cell(table_id = tabel, row = 3, column = 18, text = q08[3], bgcolor=r08[3])
    table.cell(table_id = tabel, row = 3, column = 19, text = q08[2], bgcolor=r08[2])
    table.cell(table_id = tabel, row = 3, column = 20, text = q08[1], bgcolor=r08[1])
    table.cell(table_id = tabel, row = 3, column = 21, text = q08[0], bgcolor=r08[0])
    table.cell(table_id = tabel, row = 3, column = 22, text =                t08, bgcolor=c08)          
    table.cell(table_id = tabel, row = 3, column = 23, text = m08[3], bgcolor=p08[3])
    table.cell(table_id = tabel, row = 3, column = 24, text = m08[2], bgcolor=p08[2])
    table.cell(table_id = tabel, row = 3, column = 25, text = m08[1], bgcolor=p08[1])
    table.cell(table_id = tabel, row = 3, column = 26, text = m08[0], bgcolor=p08[0])
	


    table.cell(table_id = tabel, row = 4, column = 	0, text = q09[7], bgcolor=r09[7])
    table.cell(table_id = tabel, row = 4, column = 	1, text = q09[6], bgcolor=r09[6])
    table.cell(table_id = tabel, row = 4, column = 	2, text = q09[5], bgcolor=r09[5])
    table.cell(table_id = tabel, row = 4, column = 	3, text = q09[4], bgcolor=r09[4])
    table.cell(table_id = tabel, row = 4, column = 	4, text = q09[3], bgcolor=r09[3])
    table.cell(table_id = tabel, row = 4, column = 	5, text = q09[2], bgcolor=r09[2])
    table.cell(table_id = tabel, row = 4, column = 	6, text = q09[1], bgcolor=r09[1])
    table.cell(table_id = tabel, row = 4, column = 	7, text = q09[0], bgcolor=r09[0])
    table.cell(table_id = tabel, row = 4, column = 	8, text =                t09, bgcolor=c09)          
    table.cell(table_id = tabel, row = 4, column =  9, text = m09[3], bgcolor=p09[3])
    table.cell(table_id = tabel, row = 4, column = 10, text = m09[2], bgcolor=p09[2])
    table.cell(table_id = tabel, row = 4, column = 11, text = m09[1], bgcolor=p09[1])
    table.cell(table_id = tabel, row = 4, column = 12, text = m09[0], bgcolor=p09[0])
									    
    table.cell(table_id = tabel, row = 4, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 4, column = 14, text = q10[7], bgcolor=r10[7])
    table.cell(table_id = tabel, row = 4, column = 15, text = q10[6], bgcolor=r10[6])
    table.cell(table_id = tabel, row = 4, column = 16, text = q10[5], bgcolor=r10[5])
    table.cell(table_id = tabel, row = 4, column = 17, text = q10[4], bgcolor=r10[4])
    table.cell(table_id = tabel, row = 4, column = 18, text = q10[3], bgcolor=r10[3])
    table.cell(table_id = tabel, row = 4, column = 19, text = q10[2], bgcolor=r10[2])
    table.cell(table_id = tabel, row = 4, column = 20, text = q10[1], bgcolor=r10[1])
    table.cell(table_id = tabel, row = 4, column = 21, text = q10[0], bgcolor=r10[0])
    table.cell(table_id = tabel, row = 4, column = 22, text =                t10, bgcolor=c10)          
    table.cell(table_id = tabel, row = 4, column = 23, text = m10[3], bgcolor=p10[3])
    table.cell(table_id = tabel, row = 4, column = 24, text = m10[2], bgcolor=p10[2])
    table.cell(table_id = tabel, row = 4, column = 25, text = m10[1], bgcolor=p10[1])
    table.cell(table_id = tabel, row = 4, column = 26, text = m10[0], bgcolor=p10[0])
	
	

    table.cell(table_id = tabel, row = 5, column =  0, text = q11[7], bgcolor=r11[7])
    table.cell(table_id = tabel, row = 5, column =  1, text = q11[6], bgcolor=r11[6])
    table.cell(table_id = tabel, row = 5, column =  2, text = q11[5], bgcolor=r11[5])
    table.cell(table_id = tabel, row = 5, column =  3, text = q11[4], bgcolor=r11[4])
    table.cell(table_id = tabel, row = 5, column =  4, text = q11[3], bgcolor=r11[3])
    table.cell(table_id = tabel, row = 5, column =  5, text = q11[2], bgcolor=r11[2])
    table.cell(table_id = tabel, row = 5, column =  6, text = q11[1], bgcolor=r11[1])
    table.cell(table_id = tabel, row = 5, column =  7, text = q11[0], bgcolor=r11[0])
    table.cell(table_id = tabel, row = 5, column =  8, text =                t11, bgcolor=c11)          
    table.cell(table_id = tabel, row = 5, column =  9, text = m11[3], bgcolor=p11[3])
    table.cell(table_id = tabel, row = 5, column = 10, text = m11[2], bgcolor=p11[2])
    table.cell(table_id = tabel, row = 5, column = 11, text = m11[1], bgcolor=p11[1])
    table.cell(table_id = tabel, row = 5, column = 12, text = m11[0], bgcolor=p11[0])
									    
    table.cell(table_id = tabel, row = 5, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 5, column = 14, text = q12[7], bgcolor=r12[7])
    table.cell(table_id = tabel, row = 5, column = 15, text = q12[6], bgcolor=r12[6])
    table.cell(table_id = tabel, row = 5, column = 16, text = q12[5], bgcolor=r12[5])
    table.cell(table_id = tabel, row = 5, column = 17, text = q12[4], bgcolor=r12[4])
    table.cell(table_id = tabel, row = 5, column = 18, text = q12[3], bgcolor=r12[3])
    table.cell(table_id = tabel, row = 5, column = 19, text = q12[2], bgcolor=r12[2])
    table.cell(table_id = tabel, row = 5, column = 20, text = q12[1], bgcolor=r12[1])
    table.cell(table_id = tabel, row = 5, column = 21, text = q12[0], bgcolor=r12[0])
    table.cell(table_id = tabel, row = 5, column = 22, text =                t12, bgcolor=c12)          
    table.cell(table_id = tabel, row = 5, column = 23, text = m12[3], bgcolor=p12[3])
    table.cell(table_id = tabel, row = 5, column = 24, text = m12[2], bgcolor=p12[2])
    table.cell(table_id = tabel, row = 5, column = 25, text = m12[1], bgcolor=p12[1])
    table.cell(table_id = tabel, row = 5, column = 26, text = m12[0], bgcolor=p12[0])


    table.cell(table_id = tabel, row = 6, column =  0, text = q13[7], bgcolor=r13[7])
    table.cell(table_id = tabel, row = 6, column =  1, text = q13[6], bgcolor=r13[6])
    table.cell(table_id = tabel, row = 6, column =  2, text = q13[5], bgcolor=r13[5])
    table.cell(table_id = tabel, row = 6, column =  3, text = q13[4], bgcolor=r13[4])
    table.cell(table_id = tabel, row = 6, column =  4, text = q13[3], bgcolor=r13[3])
    table.cell(table_id = tabel, row = 6, column =  5, text = q13[2], bgcolor=r13[2])
    table.cell(table_id = tabel, row = 6, column =  6, text = q13[1], bgcolor=r13[1])
    table.cell(table_id = tabel, row = 6, column =  7, text = q13[0], bgcolor=r13[0])
    table.cell(table_id = tabel, row = 6, column =  8, text =                t13, bgcolor=c13)          
    table.cell(table_id = tabel, row = 6, column =  9, text = m13[3], bgcolor=p13[3])
    table.cell(table_id = tabel, row = 6, column = 10, text = m13[2], bgcolor=p13[2])
    table.cell(table_id = tabel, row = 6, column = 11, text = m13[1], bgcolor=p13[1])
    table.cell(table_id = tabel, row = 6, column = 12, text = m13[0], bgcolor=p13[0])
									    
    table.cell(table_id = tabel, row = 6, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 6, column = 14, text = q14[7], bgcolor=r14[7])
    table.cell(table_id = tabel, row = 6, column = 15, text = q14[6], bgcolor=r14[6])
    table.cell(table_id = tabel, row = 6, column = 16, text = q14[5], bgcolor=r14[5])
    table.cell(table_id = tabel, row = 6, column = 17, text = q14[4], bgcolor=r14[4])
    table.cell(table_id = tabel, row = 6, column = 18, text = q14[3], bgcolor=r14[3])
    table.cell(table_id = tabel, row = 6, column = 19, text = q14[2], bgcolor=r14[2])
    table.cell(table_id = tabel, row = 6, column = 20, text = q14[1], bgcolor=r14[1])
    table.cell(table_id = tabel, row = 6, column = 21, text = q14[0], bgcolor=r14[0])
    table.cell(table_id = tabel, row = 6, column = 22, text =                t14, bgcolor=c14)          
    table.cell(table_id = tabel, row = 6, column = 23, text = m14[3], bgcolor=p14[3])
    table.cell(table_id = tabel, row = 6, column = 24, text = m14[2], bgcolor=p14[2])
    table.cell(table_id = tabel, row = 6, column = 25, text = m14[1], bgcolor=p14[1])
    table.cell(table_id = tabel, row = 6, column = 26, text = m14[0], bgcolor=p14[0])
	
	

    table.cell(table_id = tabel, row = 7, column =  0, text = q15[7], bgcolor=r15[7])
    table.cell(table_id = tabel, row = 7, column =  1, text = q15[6], bgcolor=r15[6])
    table.cell(table_id = tabel, row = 7, column =  2, text = q15[5], bgcolor=r15[5])
    table.cell(table_id = tabel, row = 7, column =  3, text = q15[4], bgcolor=r15[4])
    table.cell(table_id = tabel, row = 7, column =  4, text = q15[3], bgcolor=r15[3])
    table.cell(table_id = tabel, row = 7, column =  5, text = q15[2], bgcolor=r15[2])
    table.cell(table_id = tabel, row = 7, column =  6, text = q15[1], bgcolor=r15[1])
    table.cell(table_id = tabel, row = 7, column =  7, text = q15[0], bgcolor=r15[0])
    table.cell(table_id = tabel, row = 7, column =  8, text =                t15, bgcolor=c15)          
    table.cell(table_id = tabel, row = 7, column =  9, text = m15[3], bgcolor=p15[3])
    table.cell(table_id = tabel, row = 7, column = 10, text = m15[2], bgcolor=p15[2])
    table.cell(table_id = tabel, row = 7, column = 11, text = m15[1], bgcolor=p15[1])
    table.cell(table_id = tabel, row = 7, column = 12, text = m15[0], bgcolor=p15[0])
									   
    table.cell(table_id = tabel, row = 7, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 7, column = 14, text = q16[7], bgcolor=r16[7])
    table.cell(table_id = tabel, row = 7, column = 15, text = q16[6], bgcolor=r16[6])
    table.cell(table_id = tabel, row = 7, column = 16, text = q16[5], bgcolor=r16[5])
    table.cell(table_id = tabel, row = 7, column = 17, text = q16[4], bgcolor=r16[4])
    table.cell(table_id = tabel, row = 7, column = 18, text = q16[3], bgcolor=r16[3])
    table.cell(table_id = tabel, row = 7, column = 19, text = q16[2], bgcolor=r16[2])
    table.cell(table_id = tabel, row = 7, column = 20, text = q16[1], bgcolor=r16[1])
    table.cell(table_id = tabel, row = 7, column = 21, text = q16[0], bgcolor=r16[0])
    table.cell(table_id = tabel, row = 7, column = 22, text =                t16, bgcolor=c16)          
    table.cell(table_id = tabel, row = 7, column = 23, text = m16[3], bgcolor=p16[3])
    table.cell(table_id = tabel, row = 7, column = 24, text = m16[2], bgcolor=p16[2])
    table.cell(table_id = tabel, row = 7, column = 25, text = m16[1], bgcolor=p16[1])
    table.cell(table_id = tabel, row = 7, column = 26, text = m16[0], bgcolor=p16[0])



    table.cell(table_id = tabel, row = 8, column =  0, text = q17[7], bgcolor=r17[7])
    table.cell(table_id = tabel, row = 8, column =  1, text = q17[6], bgcolor=r17[6])
    table.cell(table_id = tabel, row = 8, column =  2, text = q17[5], bgcolor=r17[5])
    table.cell(table_id = tabel, row = 8, column =  3, text = q17[4], bgcolor=r17[4])
    table.cell(table_id = tabel, row = 8, column =  4, text = q17[3], bgcolor=r17[3])
    table.cell(table_id = tabel, row = 8, column =  5, text = q17[2], bgcolor=r17[2])
    table.cell(table_id = tabel, row = 8, column =  6, text = q17[1], bgcolor=r17[1])
    table.cell(table_id = tabel, row = 8, column =  7, text = q17[0], bgcolor=r17[0])
    table.cell(table_id = tabel, row = 8, column =  8, text =                t17, bgcolor=c17)          
    table.cell(table_id = tabel, row = 8, column =  9, text = m17[3], bgcolor=p17[3])
    table.cell(table_id = tabel, row = 8, column = 10, text = m17[2], bgcolor=p17[2])
    table.cell(table_id = tabel, row = 8, column = 11, text = m17[1], bgcolor=p17[1])
    table.cell(table_id = tabel, row = 8, column = 12, text = m17[0], bgcolor=p17[0])
									    
    table.cell(table_id = tabel, row = 8, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 8, column = 14, text = q18[7], bgcolor=r18[7])
    table.cell(table_id = tabel, row = 8, column = 15, text = q18[6], bgcolor=r18[6])
    table.cell(table_id = tabel, row = 8, column = 16, text = q18[5], bgcolor=r18[5])
    table.cell(table_id = tabel, row = 8, column = 17, text = q18[4], bgcolor=r18[4])
    table.cell(table_id = tabel, row = 8, column = 18, text = q18[3], bgcolor=r18[3])
    table.cell(table_id = tabel, row = 8, column = 19, text = q18[2], bgcolor=r18[2])
    table.cell(table_id = tabel, row = 8, column = 20, text = q18[1], bgcolor=r18[1])
    table.cell(table_id = tabel, row = 8, column = 21, text = q18[0], bgcolor=r18[0])
    table.cell(table_id = tabel, row = 8, column = 22, text =                t18, bgcolor=c18)          
    table.cell(table_id = tabel, row = 8, column = 23, text = m18[3], bgcolor=p18[3])
    table.cell(table_id = tabel, row = 8, column = 24, text = m18[2], bgcolor=p18[2])
    table.cell(table_id = tabel, row = 8, column = 25, text = m18[1], bgcolor=p18[1])
    table.cell(table_id = tabel, row = 8, column = 26, text = m18[0], bgcolor=p18[0])
	
	

    table.cell(table_id = tabel, row = 9, column =  0, text = q19[7], bgcolor=r19[7])
    table.cell(table_id = tabel, row = 9, column =  1, text = q19[6], bgcolor=r19[6])
    table.cell(table_id = tabel, row = 9, column =  2, text = q19[5], bgcolor=r19[5])
    table.cell(table_id = tabel, row = 9, column =  3, text = q19[4], bgcolor=r19[4])
    table.cell(table_id = tabel, row = 9, column =  4, text = q19[3], bgcolor=r19[3])
    table.cell(table_id = tabel, row = 9, column =  5, text = q19[2], bgcolor=r19[2])
    table.cell(table_id = tabel, row = 9, column =  6, text = q19[1], bgcolor=r19[1])
    table.cell(table_id = tabel, row = 9, column =  7, text = q19[0], bgcolor=r19[0])
    table.cell(table_id = tabel, row = 9, column =  8, text =                t19, bgcolor=c19)          
    table.cell(table_id = tabel, row = 9, column =  9, text = m19[3], bgcolor=p19[3])
    table.cell(table_id = tabel, row = 9, column = 10, text = m19[2], bgcolor=p19[2])
    table.cell(table_id = tabel, row = 9, column = 11, text = m19[1], bgcolor=p19[1])
    table.cell(table_id = tabel, row = 9, column = 12, text = m19[0], bgcolor=p19[0])
									    
    table.cell(table_id = tabel, row = 9, column = 13, text = "    ")
									    
    table.cell(table_id = tabel, row = 9, column = 14, text = q20[7], bgcolor=r20[7])
    table.cell(table_id = tabel, row = 9, column = 15, text = q20[6], bgcolor=r20[6])
    table.cell(table_id = tabel, row = 9, column = 16, text = q20[5], bgcolor=r20[5])
    table.cell(table_id = tabel, row = 9, column = 17, text = q20[4], bgcolor=r20[4])
    table.cell(table_id = tabel, row = 9, column = 18, text = q20[3], bgcolor=r20[3])
    table.cell(table_id = tabel, row = 9, column = 19, text = q20[2], bgcolor=r20[2])
    table.cell(table_id = tabel, row = 9, column = 20, text = q20[1], bgcolor=r20[1])
    table.cell(table_id = tabel, row = 9, column = 21, text = q20[0], bgcolor=r20[0])
    table.cell(table_id = tabel, row = 9, column = 22, text =                t20, bgcolor=c20)          
    table.cell(table_id = tabel, row = 9, column = 23, text = m20[3], bgcolor=p20[3])
    table.cell(table_id = tabel, row = 9, column = 24, text = m20[2], bgcolor=p20[2])
    table.cell(table_id = tabel, row = 9, column = 25, text = m20[1], bgcolor=p20[1])
    table.cell(table_id = tabel, row = 9, column = 26, text = m20[0], bgcolor=p20[0])