Currency Converter
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ronylts

//@version=5
indicator("Currency Converter",overlay = true)
//input for main
inm1=input.string("USD","Main Currency",group = "From")
//input for other currency
in1=input.string("GBP","Currency 1",group = "To")
in2=input.string("AUD","Currency 2",group = "To")
in3=input.string("EUR","Currency 3",group = "To")
in4=input.string("CAD","Currency 4",group = "To")
in5=input.string("JPY","Currency 5",group = "To")

// Rate main calculation
rate1 = request.currency_rate(inm1, in1)
rate2 = request.currency_rate(inm1, in2)
rate3 = request.currency_rate(inm1, in3)
rate4 = request.currency_rate(inm1, in4)
rate5 = request.currency_rate(inm1, in5)

//table
var table rateT = table.new(position.top_right, 2, 6, border_width = 1,bgcolor = color.new(color.yellow,10), border_color = color.gray ,frame_width = 2, frame_color = color.gray  )

if barstate.islast

    table.cell(rateT, 0, 0, "Currency")
    table.cell(rateT, 1, 0, "Values")

    table.cell(rateT, 0, 1, inm1+" to "+in1)
    table.cell(rateT, 1, 1, str.tostring(rate1))

    table.cell(rateT, 0, 2, inm1+" to "+in2)
    table.cell(rateT, 1, 2, str.tostring(rate2))

    table.cell(rateT, 0, 3, inm1+" to "+in3)
    table.cell(rateT, 1, 3, str.tostring(rate3))

    table.cell(rateT, 0, 4, inm1+" to "+in4)
    table.cell(rateT, 1, 4, str.tostring(rate4))

    table.cell(rateT, 0, 5, inm1+" to "+in5)
    table.cell(rateT, 1, 5, str.tostring(rate5))