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

//simple table - customizable. Can assist with identifying trends and fitting criteria depending on strategy. Manual

//@version=5
indicator("Check List", shorttitle="Check List", overlay=true)

// Customizable Inputs
title = input.string("Check List", "Title")
currencyPair = syminfo.ticker
trend = input.string("Ranging", "Trend Direction", options=["Trending Higher", "Trending Lower", "Ranging"] )
trendConfirmation = input.string("Yes", "Trend Confirmed?", options=["Yes", "No"])

// Additional Rows
showRow1 = input.bool(false, "Show Row 1?")
row1Text = input.string("-----------", "Row 1")
row1Confirmation = input.string("No", "Row 1 Confirmed?", options=["Yes", "No", " "])
showRow2 = input.bool(false, "Show Row 2?")
row2Text = input.string("-----------", "Row 2")
row2Confirmation = input.string("No", "Row 2 Confirmed?", options=["Yes", "No", " "])
showRow3 = input.bool(false, "Show Row 3?")
row3Text = input.string("-----------", "Row 3")
row3Confirmation = input.string("No", "Row 3 Confirmed?", options=["Yes", "No", " "])
showRow4 = input.bool(false, "Show Row 4?")
row4Text = input.string("-----------", "Row 4")
row4Confirmation = input.string("No", "Row 4 Confirmed?", options=["Yes", "No", " "])
showRow5 = input.bool(false, "Show Row 5?")
row5Text = input.string("-----------", "Row 5")
row5Confirmation = input.string("No", "Row 5 Confirmed?", options=["Yes", "No", " "])
showRow6 = input.bool(false, "Show Row 6?")
row6Text = input.string("-----------", "Row 6")
row6Confirmation = input.string("No", "Row 6 Confirmed?", options=["Yes", "No", " "])
showRow7 = input.bool(false, "Show Row 7?")
row7Text = input.string("-----------", "Row 7")
row7Confirmation = input.string("No", "Row 7 Confirmed?", options=["Yes", "No", " "])
showRow8 = input.bool(false, "Show Row 8?")
row8Text = input.string("-----------", "Row 8")
row8Confirmation = input.string("No", "Row 8 Confirmed?", options=["Yes", "No", " "])

// Position Settings
_tableGrp = "Position"
_tableYpos = input.string('Top', 'Vertical Position', inline='01', group=_tableGrp, options=['Top', 'Middle', 'Bottom'])
tableYpos = _tableYpos == "Top" ? "top" : _tableYpos == "Bottom" ? "bottom" : "middle"
_tableXpos = input.string('Right', 'Horizontal Position', inline='01', group=_tableGrp, options=['Left', 'Center', 'Right'])
tableXpos = _tableXpos == "Right" ? "right" : _tableXpos == "Center" ? "center" : "left"

// Appearance Settings
fontColor = input.color(color.blue, "Font Color")
bgColor = input.color(color.new(#6d7ca5, 42), "Background Color") 
showBorder = input.bool(false, "Show Table Border?")
borderThickness = input.int(1, "Border Thickness", minval=1)
borderColor = input.color(color.blue, "Border Color")




// Draw Table
var tradingPanel = table.new(position= tableYpos + '_' + tableXpos , columns=2, rows=11, bgcolor=bgColor, border_width = showBorder ? borderThickness : 0, border_color=borderColor)
if barstate.islast
    table.cell(table_id=tradingPanel, column=0, row=0, text=title, text_size=size.huge, text_color=fontColor, text_halign=text.align_center)
    table.cell(table_id=tradingPanel, column=0, row=1, text=currencyPair, text_size=size.large, text_color=fontColor, text_halign=text.align_center)
    table.cell(table_id=tradingPanel, column=0, row=2, text=trend, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    table.cell(table_id=tradingPanel, column=1, row=2, text=trendConfirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)

    // Additional Rows
    if showRow1
        table.cell(table_id=tradingPanel, column=0, row=3, text=row1Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=3, text=row1Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow2
        table.cell(table_id=tradingPanel, column=0, row=4, text=row2Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=4, text=row2Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow3
        table.cell(table_id=tradingPanel, column=0, row=5, text=row3Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=5, text=row3Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow4
        table.cell(table_id=tradingPanel, column=0, row=6, text=row4Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=6, text=row4Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow5
        table.cell(table_id=tradingPanel, column=0, row=7, text=row5Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=7, text=row5Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow6
        table.cell(table_id=tradingPanel, column=0, row=8, text=row6Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=8, text=row6Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow7
        table.cell(table_id=tradingPanel, column=0, row=9, text=row7Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=9, text=row7Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
    if showRow8
        table.cell(table_id=tradingPanel, column=0, row=10, text=row8Text, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
        table.cell(table_id=tradingPanel, column=1, row=10, text=row8Confirmation, text_size=size.normal, text_color=fontColor, text_halign=text.align_left)
