Paradigmi
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © greenmask9
//@version=4
study(title = "Paradigmi", shorttitle = "Paradigmi", overlay=true)

///////////

i_position = input(type = input.string, title = "Table Placement", defval = "Top Center", 
 options = ["Top Right", "Top Center", "Bottom Right"], group = "Table Characteristics")

position = i_position == "Top Right" ? position.top_right : i_position == "Top Center" ? position.top_center : position.bottom_right

i_w = input(type = input.integer, title = "Width", defval = 12, group = "Table Characteristics")
i_h = input(type = input.integer, title = "Height", defval = 3, group = "Table Characteristics")
i_w_1 = input(type = input.integer, title = "Width", defval = 5, group = "Table Characteristics_1")
i_h_1 = input(type = input.integer, title = "Height", defval = 4, group = "Table Characteristics_1")
i_text_size = input(type = input.string, title = "Text Size", defval = "Normal", options = ["Auto", "Tiny", "Small", "Normal", "Large", "Huge"], group = "Table Characteristics")
i_text_size_1 = input(type = input.string, title = "Text Size", defval = "Normal", options = ["Auto", "Tiny", "Small", "Normal", "Large", "Huge"], group = "Table Characteristics_1") 

text_size = i_text_size == "Normal" ? size.normal : i_text_size == "Auto" ? size.auto : i_text_size == "Auto" ? size.auto : i_text_size == "Tiny" ? size.tiny : i_text_size == "Small" ? size.small : i_text_size == "Large" ? size.large : i_text_size == "Huge" ? size.huge : size.normal

text_size_1 = i_text_size_1 == "Normal" ? size.normal : i_text_size == "Auto" ? size.auto : i_text_size == "Auto" ? size.auto : i_text_size == "Tiny" ? size.tiny : i_text_size == "Small" ? size.small : i_text_size == "Large" ? size.large : i_text_size == "Huge" ? size.huge : size.normal

row_1 = input(type = input.string, title = "Row 1 Text", defval = "RISPETTO SEMPRE IL MIO TRADING PLAN", group = "Texts")
row_2 = input(type = input.string, title = "Row 2 Text", defval = "TRADO QUELLO CHE VEDO, NON QUELLO CHE SENTO", group = "Texts")
row_3 = input(type = input.string, title = "Row 3 Text", defval = "SONO EMOTIVAMENTE DISTTACCATO DAI GRAFICI", group = "Texts")
row_4 = input(type = input.string, title = "Row 4 Text", defval = "RISPETTO LA MIA AZIENDA DI TRADING", group = "Texts")
row_5 = input(type = input.string, title = "Row 5 Text", defval = "WHERE IS THE $$$?", group = "Texts")

i_1 = input(type = input.bool, title = "Row 1", defval = true, group = "Enablers")
i_2 = input(type = input.bool, title = "Row 2", defval = true, group = "Enablers")
i_3 = input(type = input.bool, title = "Row 3", defval = true, group = "Enablers")
i_4 = input(type = input.bool, title = "Row 4", defval = true, group = "Enablers")
i_5 = input(type = input.bool, title = "Row 5", defval = true, group = "Enablers")

var table perfTable = table.new(position, 1, 5, border_width = 1)

var table perfTable_1 = table.new(position.top_right, 1, 5, border_width = 1)

if i_1
    table.cell(perfTable, 0, 0, row_1, text_color = color.new(color.black, 0), width = i_w, height = i_h, text_size = text_size)
if i_2
    table.cell(perfTable, 0, 1, row_2, text_color = color.new(color.black, 0), width = i_w, height = i_h, text_size = text_size)
if i_3
    table.cell(perfTable, 0, 2, row_3, text_color = color.new(color.black, 0), width = i_w, height = i_h, text_size = text_size)
if i_4
    table.cell(perfTable, 0, 3, row_4, text_color = color.new(color.black, 0), width = i_w, height = i_h, text_size = text_size)
if i_5
    table.cell(perfTable_1, 0, 4, row_5, text_color = color.new(color.black, 0), width = i_w_1, height = i_h_1, text_size = text_size_1)