Reputation: 1094
var table theTable = table.new(bottom_right, 1, 5)
if true
table.cell(theTable, 0, 0, strategy.account_currency)
The code above is supposed to display the account currency used by the strategy. When I run it, it just displays a blank table. Am I doing something wrong? How do I display strategy.account_currency
?
Upvotes: 0
Views: 142
Reputation: 1961
Try this:
var testTable = table.new(position = position.top_right, columns = 1, rows = 1, bgcolor = color.yellow, border_width = 1)
if barstate.islastconfirmedhistory
table.cell(table_id = testTable, column = 0, row = 0, text = na(strategy.account_currency)?syminfo.currency:strategy.account_currency)
Upvotes: 1