Untitled

 avatar
unknown
plain_text
a month ago
2.0 kB
2
Indexable
array.sort(myBuySellList, order.ascending)
arraySize = array.size(myBuySellList)
if barstate.islast and arraySize > 0
    series int columnCountManeul = 6
    series int rowsCountManuel = 20

    myTable = table.new(position = table_pos(locationDashboard), columns = columnCountManeul + 1, rows = rowsCountManuel + 1, border_width = 2)
    table.merge_cells(myTable, 0, 0, columnCountManeul - 1, 0)
    table.cell(myTable, 0, 0, text = str.tostring(selectedGrupName), text_color = color.white, bgcolor = #414158, text_halign = text.align_center, text_size = table_size(sizeDashboard))

    for column = 0 to columnCountManeul - 1 by 1
        for row = 0 to rowsCountManuel - 1 by 1
            index = column * rowsCountManuel + row
            if index < arraySize
                array<string> rowData = str.split(array.get(myBuySellList, index), '-')
                string valueSymbol = str.tostring(array.get(rowData, 0))
                string valueCondition = str.tostring(array.get(rowData, 1))
                table.cell(myTable, column, row + 1, text = str.replace(str.tostring(valueSymbol), 'BIST:', ''), text_color = tableTextColor, bgcolor = valueCondition == 'MACD Al' or valueCondition == 'EMA 34 Al' or valueCondition == 'EMA 55 Al' or valueCondition == 'Tekrar AL' or valueCondition == 'DİP Al' ? color.green : color.red, text_halign = text.align_left, text_size = table_size(sizeDashboard))
                if arraySize < rowsCountManuel
                    table.merge_cells(myTable, 1, row + 1, columnCountManeul - 1, row + 1)
                    table.cell(myTable, 1, row + 1, text = str.tostring(valueCondition) + '', text_color = tableTextColor, bgcolor = valueCondition == 'MACD Al' or valueCondition == 'EMA 34 Al' or valueCondition == 'EMA 55 Al' or valueCondition == 'Tekrar AL' or valueCondition == 'DİP Al' ? color.green : color.red, text_halign = text.align_left, text_size = table_size(sizeDashboard))

array.clear(myBuySellList)
Editor is loading...
Leave a Comment