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

//@version=5
indicator("BIAS Notes", overlay = true)

textSize = input.string(size.normal, 'Text Size', [size.tiny, size.small, size.normal, size.large, size.huge], inline='txt')
txt_1=input('','1.HTF',inline='first')
txt_2=input('','2.LTF', inline='second')
txt_3=input('','3.TF' , inline='third')

first = input.string("None", "Bias", options = ["None", "Bullish", "Bearish",'Wait'], inline='first')
secondary = input.string("None", "Bias", options = ["None", "Bullish", "Bearish",'Wait'], inline='second')
third = input.string('None', 'Bias', options = ["None", "Bullish", "Bearish",'Wait'], inline='third')
show_icons=input(false,'Show Icons under table?')
first_color = color.rgb(161, 161, 161)
secondary_color = color.rgb(161, 161, 161)
third_color = color.rgb(161, 161, 161)

if first == 'Bullish'
    first_color := color.rgb(0, 152, 68)
if first == 'Bearish'
    first_color := color.rgb(176, 48, 48)

if secondary == 'Bullish'
    secondary_color := color.rgb(52, 172, 114, 20)

if secondary == 'Bearish'
    secondary_color := color.rgb(206, 62, 62)

if third == 'Bullish'
    third_color := color.rgb(121, 187, 30, 23)

if third == 'Bearish'
    third_color := color.rgb(184, 53, 53, 39)



var table = table.new(position=position.top_right, columns=3, rows=3, border_color = color.black, border_width = 1)
table.cell(table, 0, 0, text = txt_1, bgcolor = first_color, text_color = color.white, text_size = textSize)
table.cell(table, 1, 0, text = txt_2, bgcolor = secondary_color, text_color = color.white, text_size = textSize)
table.cell(table, 2, 0, text = txt_3, bgcolor = third_color, text_color = color.white, text_size = textSize)



txt_4=input.string('','Icon',options=['','🟡','🟢','🔴','Wait'],inline='first')
txt_5=input.string('','Icon',options=['','🟡','🟢','🔴','Wait'],inline='second')
txt_6=input.string('','Icon',options=['','🟡','🟢','🔴','Wait'],inline='third')

if show_icons==true
    table.cell(table, 0, 1, text = txt_4, bgcolor = color.white, text_color = color.black, text_size = textSize)
    table.cell(table, 1, 1, text = txt_5, bgcolor = color.white, text_color = color.black, text_size = textSize)
    table.cell(table, 2, 1, text = txt_6, bgcolor = color.white, text_color = color.black, text_size = textSize)