Sticky Notes v1.0 [NL]
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//@author=Nikola Lazic
//@version=5

indicator("Sticky Notes v1.0 [NL]", shorttitle = "Notes", overlay = true)

// Sentence input
sentence01 = input.string("First sentence", title = "Sentence 1", group = "Sentences")
sentence02 = input.string("Second sentence", title = "Sentence 2", group = "Sentences")
sentence03 = input.string("Third sentence", title = "Sentence 3", group = "Sentences")
sentence04 = input.string("Fourth sentence", title = "Sentence 4", group = "Sentences")
sentence05 = input.string("Fifth sentence", title = "Sentence 5", group = "Sentences")
sentence06 = input.string("Sixth sentence", title = "Sentence 6", group = "Sentences")
sentence07 = input.string("Seventh sentence", title = "Sentence 7", group = "Sentences")
sentence08 = input.string("Eighth sentence", title = "Sentence 8", group = "Sentences")
sentence09 = input.string("Ninth sentence", title = "Sentence 9", group = "Sentences")
sentence10 = input.string("Tenth sentence", title = "Sentence 10", group = "Sentences")

// Sticky Note Settings Input
tl1 = input.string("middle", title = "Note Position", options = ["top", "middle", "bottom"], group = "Sticky Note Settings", inline = "1")
tl2 = input.string("right", title = "", options = ["left", "center", "right"], group = "Sticky Note Settings", inline = "1")
note_color = input.color(color (#e6b905), title = "Note Color", group = "Sticky Note Settings")

// Font Input
font_size = input.string("Auto", title = "Font Size", options = ["Auto", "Huge", "Large", "Normal", "Small", "Tiny"], group = "Font Settings")
font_type = input.string("Default", title = "Font Type", options = ["Default", "Monospace"], group = "Font Settings")
font_color = input.color(color.black, title = "Font Color", group = "Font Settings")

// Selected Font
selected_font = font_type == "Default" ? font.family_default : font.family_monospace

//Font Size
selected_size = font_size == "Auto" ? size.auto : font_size == "Huge" ? size.huge : font_size == "Large" ? size.large : font_size == "Normal" ? size.normal : font_size == "Small" ? size.small : font_size == "Tiny" ? size.tiny : na

// Table
var table t1 = table.new(tl1 + "_" + tl2, 1, 10)

// Writing rows in the table.
// If sentence is empty, then row will be excluded from the table
if barstate.islast
    if not na(sentence01) and sentence01 != ""
        table.cell(t1,0,0, text = sentence01 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence02) and sentence02 != ""
        table.cell(t1,0,1, text = sentence02 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence03) and sentence03 != ""
        table.cell(t1,0,2, text = sentence03 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence04) and sentence04 != ""
        table.cell(t1,0,3, text = sentence04 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence05) and sentence05 != ""
        table.cell(t1,0,4, text = sentence05 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence06) and sentence06 != ""
        table.cell(t1,0,5, text = sentence06 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence07) and sentence07 != ""
        table.cell(t1,0,6, text = sentence07 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence08) and sentence08 != ""
        table.cell(t1,0,7, text = sentence08 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence09) and sentence09 != ""
        table.cell(t1,0,8, text = sentence09 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)
    if not na(sentence10) and sentence10 != ""
        table.cell(t1,0,9, text = sentence10 , bgcolor = note_color, text_color = font_color, text_halign = text.align_left, text_size = selected_size, text_font_family = selected_font)