Market Sector Scanner/Screener With MOM + RSI + MFI + DMI + MACD
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © FriendOfTheTrend

//@version=5
indicator("Market Sector Scanner MOM + RSI + MFI + DMI + MACD - Crypto, Stocks & Forex", shorttitle="Market Scanner", overlay=true)

//Indicator Value Inputs
tableOn = input.bool(true, title="Turn Table On/Off", group="Table Settings")
bright = position.bottom_right
bleft = position.bottom_left
bcenter = position.bottom_center
tright = position.top_right
tleft = position.top_left
tcenter = position.top_center
mright = position.middle_right
mleft = position.middle_left
mcenter = position.middle_center
tablePosition = input.string(bleft, title="Table Position", options=[bright, bleft, bcenter, tright, tleft, tcenter, mright, mleft, mcenter], group="Table Settings")
indSource = input.source(close, title="Indicator Source", group="Source")
momLength = input.int(14, title="Momentum Length", group="Indicator Length Settings")
rsiLength = input.int(14, title="RSI Length", group="Indicator Length Settings")
mfiLength = input.int(14, title="MFI Length", group="Indicator Length Settings")
dmiLength = input.int(14, title="DMI Length", group="Indicator Length Settings")
dmiSmoothing = input.int(14, title="DMI Smoothing", group="DMI Smoothing")
macdFastLength = input.int(12, title="MACD Fast Length", group="MACD Settings")
macdSlowLength = input.int(26, title="MACD Slow Length", group="MACD Settings")
macdSmoothing = input.int(9, title="MACD Smoothing", group="MACD Settings")

//Indicators
momValue = ta.mom(indSource, momLength)
[macdLine, macdSignalLine, macdHistLine] = ta.macd(indSource, macdFastLength, macdSlowLength, macdSmoothing)
rsiValue = ta.rsi(indSource, rsiLength)
mfiValue = ta.mfi(indSource, mfiLength)
[dmiPlus, dmiMinus, dmiAdx] = ta.dmi(dmiLength, dmiSmoothing)

//Ticker 1
ticker1 = input.symbol("COINBASE:BTCUSD", title="Ticker #1", group="Tickers To Scan")

ticker1momV = request.security(ticker1, "", momValue)
ticker1rsiV = request.security(ticker1, "", rsiValue)
ticker1mfiV = request.security(ticker1, "", mfiValue)
ticker1dmiPlus = request.security(ticker1, "", dmiPlus - dmiMinus)
ticker1macdLine = request.security(ticker1, "", macdHistLine)

ticker1text = str.tostring(ticker1)
ticker1mom = str.tostring(ticker1momV, format.mintick)
ticker1rsi = str.tostring(ticker1rsiV, format.mintick)
ticker1mfi = str.tostring(ticker1mfiV, format.mintick)
ticker1dmi = str.tostring(ticker1dmiPlus, format.mintick)
ticker1macd = str.tostring(ticker1macdLine, format.mintick)

ticker1bg = color.aqua
if ticker1momV > 0 and ticker1rsiV > 50 and ticker1mfiV > 50 and ticker1dmiPlus > 0 and ticker1macdLine > 0
    ticker1bg := color.lime
else if ticker1momV < 0 and ticker1rsiV < 50 and ticker1mfiV < 50 and ticker1dmiPlus < 0 and ticker1macdLine < 0
    ticker1bg := color.red
else
    ticker1bg := color.aqua
    
ticker1mombg = color.aqua
if ticker1momV > 0
    ticker1mombg := color.lime
else if ticker1momV < 0
    ticker1mombg := color.red
else
    ticker1mombg := color.aqua
    
ticker1rsibg = color.aqua
if ticker1rsiV > 50
    ticker1rsibg := color.lime
else if ticker1rsiV < 50
    ticker1rsibg := color.red
else
    ticker1rsibg := color.aqua
    
ticker1mfibg = color.aqua
if ticker1mfiV > 50
    ticker1mfibg := color.lime
else if ticker1mfiV < 50
    ticker1mfibg := color.red
else
    ticker1mfibg := color.aqua
    
ticker1dmibg = color.aqua
if ticker1dmiPlus > 0
    ticker1dmibg := color.lime
else if ticker1dmiPlus < 0
    ticker1dmibg := color.red
else
    ticker1dmibg := color.aqua
    
ticker1macdbg = color.aqua
if ticker1macdLine > 0
    ticker1macdbg := color.lime
else if ticker1macdLine < 0
    ticker1macdbg := color.red
else
    ticker1macdbg := color.aqua

//Ticker 2
ticker2 = input.symbol("COINBASE:ETHUSD", title="Ticker #2", group="Tickers To Scan")

ticker2momV = request.security(ticker2, "", momValue)
ticker2rsiV = request.security(ticker2, "", rsiValue)
ticker2mfiV = request.security(ticker2, "", mfiValue)
ticker2dmiPlus = request.security(ticker2, "", dmiPlus - dmiMinus)
ticker2macdLine = request.security(ticker2, "", macdHistLine)

ticker2text = str.tostring(ticker2)
ticker2mom = str.tostring(ticker2momV, format.mintick)
ticker2rsi = str.tostring(ticker2rsiV, format.mintick)
ticker2mfi = str.tostring(ticker2mfiV, format.mintick)
ticker2dmi = str.tostring(ticker2dmiPlus, format.mintick)
ticker2macd = str.tostring(ticker2macdLine, format.mintick)

ticker2bg = color.aqua
if ticker2momV > 0 and ticker2rsiV > 50 and ticker2mfiV > 50 and ticker2dmiPlus > 0 and ticker2macdLine > 0
    ticker2bg := color.lime
else if ticker2momV < 0 and ticker2rsiV < 50 and ticker2mfiV < 50 and ticker2dmiPlus < 0 and ticker2macdLine < 0
    ticker2bg := color.red
else
    ticker2bg := color.aqua
    
ticker2mombg = color.aqua
if ticker2momV > 0
    ticker2mombg := color.lime
else if ticker2momV < 0
    ticker2mombg := color.red
else
    ticker2mombg := color.aqua
    
ticker2rsibg = color.aqua
if ticker2rsiV > 50
    ticker2rsibg := color.lime
else if ticker2rsiV < 50
    ticker2rsibg := color.red
else
    ticker2rsibg := color.aqua
    
ticker2mfibg = color.aqua
if ticker2mfiV > 50
    ticker2mfibg := color.lime
else if ticker2mfiV < 50
    ticker2mfibg := color.red
else
    ticker2mfibg := color.aqua
    
ticker2dmibg = color.aqua
if ticker2dmiPlus > 0
    ticker2dmibg := color.lime
else if ticker2dmiPlus < 0
    ticker2dmibg := color.red
else
    ticker2dmibg := color.aqua
    
ticker2macdbg = color.aqua
if ticker2macdLine > 0
    ticker2macdbg := color.lime
else if ticker2macdLine < 0
    ticker2macdbg := color.red
else
    ticker2macdbg := color.aqua

//Ticker 3
ticker3 = input.symbol("COINBASE:XRPUSD", title="Ticker #3", group="Tickers To Scan")

ticker3momV = request.security(ticker3, "", momValue)
ticker3rsiV = request.security(ticker3, "", rsiValue)
ticker3mfiV = request.security(ticker3, "", mfiValue)
ticker3dmiPlus = request.security(ticker3, "", dmiPlus - dmiMinus)
ticker3macdLine = request.security(ticker3, "", macdHistLine)

ticker3text = str.tostring(ticker3)
ticker3mom = str.tostring(ticker3momV, format.mintick)
ticker3rsi = str.tostring(ticker3rsiV, format.mintick)
ticker3mfi = str.tostring(ticker3mfiV, format.mintick)
ticker3dmi = str.tostring(ticker3dmiPlus, format.mintick)
ticker3macd = str.tostring(ticker3macdLine, format.mintick)

ticker3bg = color.aqua
if ticker3momV > 0 and ticker3rsiV > 50 and ticker3mfiV > 50 and ticker3dmiPlus > 0 and ticker3macdLine > 0
    ticker3bg := color.lime
else if ticker3momV < 0 and ticker3rsiV < 50 and ticker3mfiV < 50 and ticker3dmiPlus < 0 and ticker3macdLine < 0
    ticker3bg := color.red
else
    ticker3bg := color.aqua
    
ticker3mombg = color.aqua
if ticker3momV > 0
    ticker3mombg := color.lime
else if ticker3momV < 0
    ticker3mombg := color.red
else
    ticker3mombg := color.aqua
    
ticker3rsibg = color.aqua
if ticker3rsiV > 50
    ticker3rsibg := color.lime
else if ticker3rsiV < 50
    ticker3rsibg := color.red
else
    ticker3rsibg := color.aqua
    
ticker3mfibg = color.aqua
if ticker3mfiV > 50
    ticker3mfibg := color.lime
else if ticker3mfiV < 50
    ticker3mfibg := color.red
else
    ticker3mfibg := color.aqua
    
ticker3dmibg = color.aqua
if ticker3dmiPlus > 0
    ticker3dmibg := color.lime
else if ticker3dmiPlus < 0
    ticker3dmibg := color.red
else
    ticker3dmibg := color.aqua
    
ticker3macdbg = color.aqua
if ticker3macdLine > 0
    ticker3macdbg := color.lime
else if ticker3macdLine < 0
    ticker3macdbg := color.red
else
    ticker3macdbg := color.aqua

//Ticker 4
ticker4 = input.symbol("COINBASE:ADAUSD", title="Ticker #4", group="Tickers To Scan")

ticker4momV = request.security(ticker4, "", momValue)
ticker4rsiV = request.security(ticker4, "", rsiValue)
ticker4mfiV = request.security(ticker4, "", mfiValue)
ticker4dmiPlus = request.security(ticker4, "", dmiPlus - dmiMinus)
ticker4macdLine = request.security(ticker4, "", macdHistLine)

ticker4text = str.tostring(ticker4)
ticker4mom = str.tostring(ticker4momV, format.mintick)
ticker4rsi = str.tostring(ticker4rsiV, format.mintick)
ticker4mfi = str.tostring(ticker4mfiV, format.mintick)
ticker4dmi = str.tostring(ticker4dmiPlus, format.mintick)
ticker4macd = str.tostring(ticker4macdLine, format.mintick)

ticker4bg = color.aqua
if ticker4momV > 0 and ticker4rsiV > 50 and ticker4mfiV > 50 and ticker4dmiPlus > 0 and ticker4macdLine > 0
    ticker4bg := color.lime
else if ticker4momV < 0 and ticker4rsiV < 50 and ticker4mfiV < 50 and ticker4dmiPlus < 0 and ticker4macdLine < 0
    ticker4bg := color.red
else
    ticker4bg := color.aqua
    
ticker4mombg = color.aqua
if ticker4momV > 0
    ticker4mombg := color.lime
else if ticker4momV < 0
    ticker4mombg := color.red
else
    ticker4mombg := color.aqua
    
ticker4rsibg = color.aqua
if ticker4rsiV > 50
    ticker4rsibg := color.lime
else if ticker4rsiV < 50
    ticker4rsibg := color.red
else
    ticker4rsibg := color.aqua
    
ticker4mfibg = color.aqua
if ticker4mfiV > 50
    ticker4mfibg := color.lime
else if ticker4mfiV < 50
    ticker4mfibg := color.red
else
    ticker4mfibg := color.aqua
    
ticker4dmibg = color.aqua
if ticker4dmiPlus > 0
    ticker4dmibg := color.lime
else if ticker4dmiPlus < 0
    ticker4dmibg := color.red
else
    ticker4dmibg := color.aqua
    
ticker4macdbg = color.aqua
if ticker4macdLine > 0
    ticker4macdbg := color.lime
else if ticker4macdLine < 0
    ticker4macdbg := color.red
else
    ticker4macdbg := color.aqua

//Ticker 5
ticker5 = input.symbol("COINBASE:SOLUSD", title="Ticker #5", group="Tickers To Scan")

ticker5momV = request.security(ticker5, "", momValue)
ticker5rsiV = request.security(ticker5, "", rsiValue)
ticker5mfiV = request.security(ticker5, "", mfiValue)
ticker5dmiPlus = request.security(ticker5, "", dmiPlus - dmiMinus)
ticker5macdLine = request.security(ticker5, "", macdHistLine)

ticker5text = str.tostring(ticker5)
ticker5mom = str.tostring(ticker5momV, format.mintick)
ticker5rsi = str.tostring(ticker5rsiV, format.mintick)
ticker5mfi = str.tostring(ticker5mfiV, format.mintick)
ticker5dmi = str.tostring(ticker5dmiPlus, format.mintick)
ticker5macd = str.tostring(ticker5macdLine, format.mintick)

ticker5bg = color.aqua
if ticker5momV > 0 and ticker5rsiV > 50 and ticker5mfiV > 50 and ticker5dmiPlus > 0 and ticker5macdLine > 0
    ticker5bg := color.lime
else if ticker5momV < 0 and ticker5rsiV < 50 and ticker5mfiV < 50 and ticker5dmiPlus < 0 and ticker5macdLine < 0
    ticker5bg := color.red
else
    ticker5bg := color.aqua
    
ticker5mombg = color.aqua
if ticker5momV > 0
    ticker5mombg := color.lime
else if ticker5momV < 0
    ticker5mombg := color.red
else
    ticker5mombg := color.aqua
    
ticker5rsibg = color.aqua
if ticker5rsiV > 50
    ticker5rsibg := color.lime
else if ticker5rsiV < 50
    ticker5rsibg := color.red
else
    ticker5rsibg := color.aqua
    
ticker5mfibg = color.aqua
if ticker5mfiV > 50
    ticker5mfibg := color.lime
else if ticker5mfiV < 50
    ticker5mfibg := color.red
else
    ticker5mfibg := color.aqua
    
ticker5dmibg = color.aqua
if ticker5dmiPlus > 0
    ticker5dmibg := color.lime
else if ticker5dmiPlus < 0
    ticker5dmibg := color.red
else
    ticker5dmibg := color.aqua
    
ticker5macdbg = color.aqua
if ticker5macdLine > 0
    ticker5macdbg := color.lime
else if ticker5macdLine < 0
    ticker5macdbg := color.red
else
    ticker5macdbg := color.aqua

//Ticker 6
ticker6 = input.symbol("COINBASE:DOTUSD", title="Ticker #6", group="Tickers To Scan")

ticker6momV = request.security(ticker6, "", momValue)
ticker6rsiV = request.security(ticker6, "", rsiValue)
ticker6mfiV = request.security(ticker6, "", mfiValue)
ticker6dmiPlus = request.security(ticker6, "", dmiPlus - dmiMinus)
ticker6macdLine = request.security(ticker6, "", macdHistLine)

ticker6text = str.tostring(ticker6)
ticker6mom = str.tostring(ticker6momV, format.mintick)
ticker6rsi = str.tostring(ticker6rsiV, format.mintick)
ticker6mfi = str.tostring(ticker6mfiV, format.mintick)
ticker6dmi = str.tostring(ticker6dmiPlus, format.mintick)
ticker6macd = str.tostring(ticker6macdLine, format.mintick)

ticker6bg = color.aqua
if ticker6momV > 0 and ticker6rsiV > 50 and ticker6mfiV > 50 and ticker6dmiPlus > 0 and ticker6macdLine > 0
    ticker6bg := color.lime
else if ticker6momV < 0 and ticker6rsiV < 50 and ticker6mfiV < 50 and ticker6dmiPlus < 0 and ticker6macdLine < 0
    ticker6bg := color.red
else
    ticker6bg := color.aqua
    
ticker6mombg = color.aqua
if ticker6momV > 0
    ticker6mombg := color.lime
else if ticker6momV < 0
    ticker6mombg := color.red
else
    ticker6mombg := color.aqua
    
ticker6rsibg = color.aqua
if ticker6rsiV > 50
    ticker6rsibg := color.lime
else if ticker6rsiV < 50
    ticker6rsibg := color.red
else
    ticker6rsibg := color.aqua
    
ticker6mfibg = color.aqua
if ticker6mfiV > 50
    ticker6mfibg := color.lime
else if ticker6mfiV < 50
    ticker6mfibg := color.red
else
    ticker6mfibg := color.aqua
    
ticker6dmibg = color.aqua
if ticker6dmiPlus > 0
    ticker6dmibg := color.lime
else if ticker6dmiPlus < 0
    ticker6dmibg := color.red
else
    ticker6dmibg := color.aqua
    
ticker6macdbg = color.aqua
if ticker6macdLine > 0
    ticker6macdbg := color.lime
else if ticker6macdLine < 0
    ticker6macdbg := color.red
else
    ticker6macdbg := color.aqua

//Ticker 7
ticker7 = input.symbol("COINBASE:LTCUSD", title="Ticker #7", group="Tickers To Scan")

ticker7momV = request.security(ticker7, "", momValue)
ticker7rsiV = request.security(ticker7, "", rsiValue)
ticker7mfiV = request.security(ticker7, "", mfiValue)
ticker7dmiPlus = request.security(ticker7, "", dmiPlus - dmiMinus)
ticker7macdLine = request.security(ticker7, "", macdHistLine)

ticker7text = str.tostring(ticker7)
ticker7mom = str.tostring(ticker7momV, format.mintick)
ticker7rsi = str.tostring(ticker7rsiV, format.mintick)
ticker7mfi = str.tostring(ticker7mfiV, format.mintick)
ticker7dmi = str.tostring(ticker7dmiPlus, format.mintick)
ticker7macd = str.tostring(ticker7macdLine, format.mintick)

ticker7bg = color.aqua
if ticker7momV > 0 and ticker7rsiV > 50 and ticker7mfiV > 50 and ticker7dmiPlus > 0 and ticker7macdLine > 0
    ticker7bg := color.lime
else if ticker7momV < 0 and ticker7rsiV < 50 and ticker7mfiV < 50 and ticker7dmiPlus < 0 and ticker7macdLine < 0
    ticker7bg := color.red
else
    ticker7bg := color.aqua
    
ticker7mombg = color.aqua
if ticker7momV > 0
    ticker7mombg := color.lime
else if ticker7momV < 0
    ticker7mombg := color.red
else
    ticker7mombg := color.aqua
    
ticker7rsibg = color.aqua
if ticker7rsiV > 50
    ticker7rsibg := color.lime
else if ticker7rsiV < 50
    ticker7rsibg := color.red
else
    ticker7rsibg := color.aqua
    
ticker7mfibg = color.aqua
if ticker7mfiV > 50
    ticker7mfibg := color.lime
else if ticker7mfiV < 50
    ticker7mfibg := color.red
else
    ticker7mfibg := color.aqua
    
ticker7dmibg = color.aqua
if ticker7dmiPlus > 0
    ticker7dmibg := color.lime
else if ticker7dmiPlus < 0
    ticker7dmibg := color.red
else
    ticker7dmibg := color.aqua
    
ticker7macdbg = color.aqua
if ticker7macdLine > 0
    ticker7macdbg := color.lime
else if ticker7macdLine < 0
    ticker7macdbg := color.red
else
    ticker7macdbg := color.aqua

//Ticker 8
ticker8 = input.symbol("COINBASE:LINKUSD", title="Ticker #8", group="Tickers To Scan")

ticker8momV = request.security(ticker8, "", momValue)
ticker8rsiV = request.security(ticker8, "", rsiValue)
ticker8mfiV = request.security(ticker8, "", mfiValue)
ticker8dmiPlus = request.security(ticker8, "", dmiPlus - dmiMinus)
ticker8macdLine = request.security(ticker8, "", macdHistLine)

ticker8text = str.tostring(ticker8)
ticker8mom = str.tostring(ticker8momV, format.mintick)
ticker8rsi = str.tostring(ticker8rsiV, format.mintick)
ticker8mfi = str.tostring(ticker8mfiV, format.mintick)
ticker8dmi = str.tostring(ticker8dmiPlus, format.mintick)
ticker8macd = str.tostring(ticker8macdLine, format.mintick)

ticker8bg = color.aqua
if ticker8momV > 0 and ticker8rsiV > 50 and ticker8mfiV > 50 and ticker8dmiPlus > 0 and ticker8macdLine > 0
    ticker8bg := color.lime
else if ticker8momV < 0 and ticker8rsiV < 50 and ticker8mfiV < 50 and ticker8dmiPlus < 0 and ticker8macdLine < 0
    ticker8bg := color.red
else
    ticker8bg := color.aqua
    
ticker8mombg = color.aqua
if ticker8momV > 0
    ticker8mombg := color.lime
else if ticker8momV < 0
    ticker8mombg := color.red
else
    ticker8mombg := color.aqua
    
ticker8rsibg = color.aqua
if ticker8rsiV > 50
    ticker8rsibg := color.lime
else if ticker8rsiV < 50
    ticker8rsibg := color.red
else
    ticker8rsibg := color.aqua
    
ticker8mfibg = color.aqua
if ticker8mfiV > 50
    ticker8mfibg := color.lime
else if ticker8mfiV < 50
    ticker8mfibg := color.red
else
    ticker8mfibg := color.aqua
    
ticker8dmibg = color.aqua
if ticker8dmiPlus > 0
    ticker8dmibg := color.lime
else if ticker8dmiPlus < 0
    ticker8dmibg := color.red
else
    ticker8dmibg := color.aqua
    
ticker8macdbg = color.aqua
if ticker8macdLine > 0
    ticker8macdbg := color.lime
else if ticker8macdLine < 0
    ticker8macdbg := color.red
else
    ticker8macdbg := color.aqua

//Alerts
allGreenAlert = false
if ticker1bg == color.lime and ticker2bg == color.lime and ticker3bg == color.lime and ticker4bg == color.lime and ticker5bg == color.lime and ticker6bg == color.lime and 
 ticker7bg == color.lime and ticker8bg == color.lime
    allGreenAlert := true

allRedAlert = false
if ticker1bg == color.red and ticker2bg == color.red and ticker3bg == color.red and ticker4bg == color.red and ticker5bg == color.red and ticker6bg == color.red and 
 ticker7bg == color.red and ticker8bg == color.red
    allRedAlert := true

alertcondition(allGreenAlert, "All Bullish Scanner", "Entire Market Scanner Is Bullish")
alertcondition(allRedAlert, "All Bearish Scanner", "Entire Market Scanner Is Bearish")
alertcondition(ticker1bg == color.lime, "Ticker 1 Is All Bullish", "Ticker 1 Scanner All Bullish")
alertcondition(ticker2bg == color.lime, "Ticker 2 Is All Bullish", "Ticker 2 Scanner All Bullish")
alertcondition(ticker3bg == color.lime, "Ticker 3 Is All Bullish", "Ticker 3 Scanner All Bullish")
alertcondition(ticker4bg == color.lime, "Ticker 4 Is All Bullish", "Ticker 4 Scanner All Bullish")
alertcondition(ticker5bg == color.lime, "Ticker 5 Is All Bullish", "Ticker 5 Scanner All Bullish")
alertcondition(ticker6bg == color.lime, "Ticker 6 Is All Bullish", "Ticker 6 Scanner All Bullish")
alertcondition(ticker7bg == color.lime, "Ticker 7 Is All Bullish", "Ticker 7 Scanner All Bullish")
alertcondition(ticker8bg == color.lime, "Ticker 8 Is All Bullish", "Ticker 8 Scanner All Bullish")
alertcondition(ticker1bg == color.red, "Ticker 1 Is All Bearish", "Ticker 1 Scanner All Bearish")
alertcondition(ticker2bg == color.red, "Ticker 2 Is All Bearish", "Ticker 2 Scanner All Bearish")
alertcondition(ticker3bg == color.red, "Ticker 3 Is All Bearish", "Ticker 3 Scanner All Bearish")
alertcondition(ticker4bg == color.red, "Ticker 4 Is All Bearish", "Ticker 4 Scanner All Bearish")
alertcondition(ticker5bg == color.red, "Ticker 5 Is All Bearish", "Ticker 5 Scanner All Bearish")
alertcondition(ticker6bg == color.red, "Ticker 6 Is All Bearish", "Ticker 6 Scanner All Bearish")
alertcondition(ticker7bg == color.red, "Ticker 7 Is All Bearish", "Ticker 7 Scanner All Bearish")
alertcondition(ticker8bg == color.red, "Ticker 8 Is All Bearish", "Ticker 8 Scanner All Bearish")

//Plot Scanner Table
dataTable = table.new(tablePosition, columns=6, rows=11, border_color=color.white, border_width=1)
if tableOn and barstate.islast
    table.cell(table_id=dataTable, column=0, row=0, text="TICKER", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=1, row=0, text="MOM", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=2, row=0, text="RSI", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=3, row=0, text="MFI", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=4, row=0, text="DMI", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=5, row=0, text="MACD", height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=color.blue)
    table.cell(table_id=dataTable, column=0, row=1, text=ticker1text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1bg)
    table.cell(table_id=dataTable, column=1, row=1, text=ticker1mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1mombg)
    table.cell(table_id=dataTable, column=2, row=1, text=ticker1rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1rsibg)
    table.cell(table_id=dataTable, column=3, row=1, text=ticker1mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1mfibg)
    table.cell(table_id=dataTable, column=4, row=1, text=ticker1dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1dmibg)
    table.cell(table_id=dataTable, column=5, row=1, text=ticker1macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker1macdbg)
    table.cell(table_id=dataTable, column=0, row=2, text=ticker2text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2bg)
    table.cell(table_id=dataTable, column=1, row=2, text=ticker2mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2mombg)
    table.cell(table_id=dataTable, column=2, row=2, text=ticker2rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2rsibg)
    table.cell(table_id=dataTable, column=3, row=2, text=ticker2mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2mfibg)
    table.cell(table_id=dataTable, column=4, row=2, text=ticker2dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2dmibg)
    table.cell(table_id=dataTable, column=5, row=2, text=ticker2macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker2macdbg)
    table.cell(table_id=dataTable, column=0, row=3, text=ticker3text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3bg)
    table.cell(table_id=dataTable, column=1, row=3, text=ticker3mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3mombg)
    table.cell(table_id=dataTable, column=2, row=3, text=ticker3rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3rsibg)
    table.cell(table_id=dataTable, column=3, row=3, text=ticker3mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3mfibg)
    table.cell(table_id=dataTable, column=4, row=3, text=ticker3dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3dmibg)
    table.cell(table_id=dataTable, column=5, row=3, text=ticker3macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker3macdbg)
    table.cell(table_id=dataTable, column=0, row=4, text=ticker4text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4bg)
    table.cell(table_id=dataTable, column=1, row=4, text=ticker4mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4mombg)
    table.cell(table_id=dataTable, column=2, row=4, text=ticker4rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4rsibg)
    table.cell(table_id=dataTable, column=3, row=4, text=ticker4mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4mfibg)
    table.cell(table_id=dataTable, column=4, row=4, text=ticker4dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4dmibg)
    table.cell(table_id=dataTable, column=5, row=4, text=ticker4macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker4macdbg)
    table.cell(table_id=dataTable, column=0, row=5, text=ticker5text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5bg)
    table.cell(table_id=dataTable, column=1, row=5, text=ticker5mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5mombg)
    table.cell(table_id=dataTable, column=2, row=5, text=ticker5rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5rsibg)
    table.cell(table_id=dataTable, column=3, row=5, text=ticker5mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5mfibg)
    table.cell(table_id=dataTable, column=4, row=5, text=ticker5dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5dmibg)
    table.cell(table_id=dataTable, column=5, row=5, text=ticker5macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker5macdbg)
    table.cell(table_id=dataTable, column=0, row=6, text=ticker6text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6bg)
    table.cell(table_id=dataTable, column=1, row=6, text=ticker6mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6mombg)
    table.cell(table_id=dataTable, column=2, row=6, text=ticker6rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6rsibg)
    table.cell(table_id=dataTable, column=3, row=6, text=ticker6mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6mfibg)
    table.cell(table_id=dataTable, column=4, row=6, text=ticker6dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6dmibg)
    table.cell(table_id=dataTable, column=5, row=6, text=ticker6macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker6macdbg)
    table.cell(table_id=dataTable, column=0, row=7, text=ticker7text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7bg)
    table.cell(table_id=dataTable, column=1, row=7, text=ticker7mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7mombg)
    table.cell(table_id=dataTable, column=2, row=7, text=ticker7rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7rsibg)
    table.cell(table_id=dataTable, column=3, row=7, text=ticker7mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7mfibg)
    table.cell(table_id=dataTable, column=4, row=7, text=ticker7dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7dmibg)
    table.cell(table_id=dataTable, column=5, row=7, text=ticker7macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker7macdbg)
    table.cell(table_id=dataTable, column=0, row=8, text=ticker8text, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8bg)
    table.cell(table_id=dataTable, column=1, row=8, text=ticker8mom, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8mombg)
    table.cell(table_id=dataTable, column=2, row=8, text=ticker8rsi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8rsibg)
    table.cell(table_id=dataTable, column=3, row=8, text=ticker8mfi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8mfibg)
    table.cell(table_id=dataTable, column=4, row=8, text=ticker8dmi, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8dmibg)
    table.cell(table_id=dataTable, column=5, row=8, text=ticker8macd, height=0, text_color=color.white, text_halign=text.align_center, text_valign= text.align_center, bgcolor=ticker8macdbg)
