def get_info(self): if not self.portfolio: return [] change, percent = self.portfolio.current_change change_text = gui_utils.get_string_from_float(percent) + '%' + ' | ' + gui_utils.get_currency_format_from_float(change) o_change, o_percent = self.portfolio.overall_change o_change_text = gui_utils.get_string_from_float(o_percent) + '%' + ' | ' + gui_utils.get_currency_format_from_float(o_change) return [(_('Day\'s gain'), gui_utils.get_green_red_string(change, change_text)), (_('Overall gain'), gui_utils.get_green_red_string(o_change, o_change_text)), ('Investments', gui_utils.get_currency_format_from_float(self.portfolio.get_current_value())), ('# positions', self.portfolio.active_positions_count), ('Last update', gui_utils.datetime_format(self.portfolio.last_update, False)) ]
def get_info(self): return [('# positions', len(self.watchlist.positions)), ('Last update', gui_utils.datetime_format(self.watchlist.last_update, False))]