Untitled

 avatar
user_5432013
plain_text
3 months ago
909 B
20
Indexable
updateTableCell(int rowIndex, string tf, string tfName) =>
    signal = mtf(tf)
    signalText = switch signal
        1  => "Yükseliş\nUp Trend"
        -1 => "Düşüş\nDown Trend"
        => "Nötr\nRange"
    signalColor = switch signal
        1  => color.green
        -1 => color.red
        => color.rgb(4, 125, 196, 50)


if TrendTable
    table.cell(mtfTable, 0, 0, "Zaman Dilimi", bgcolor=color.gray, text_color=TablePosTextCol, text_size=textSize)
    table.cell(mtfTable, 0, 1, "Trend", bgcolor=color.gray, text_color=TablePosTextCol, text_size=textSize)
    
    // renk = updateTableCell(0, "D", "Günlük")
    
    table.cell(mtfTable, rowIndex, 0, tfName, bgcolor=color.new(#00b2ff, 90), text_color=TablePosTextCol, text_size=textSize)
    table.cell(mtfTable, rowIndex, 1, signalText, bgcolor=color.new(signalColor, 20), text_color=TablePosTextCol, text_size=textSize)
Editor is loading...
Leave a Comment