From 0f54421cdf75acadae780fa29c692326c358ebab Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 30 Aug 2021 09:08:53 -0400 Subject: trad: fixed some bugs in main template list --- app/trading/models.py | 4 ++-- app/trading/templates/trading/list.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/trading') diff --git a/app/trading/models.py b/app/trading/models.py index 80a67ed..f0f332c 100644 --- a/app/trading/models.py +++ b/app/trading/models.py @@ -288,11 +288,11 @@ class LuxOptionsTrade(models.Model): @property def trade_risk_percent(self): - return round((self.risk_total/self.amount_invested)*100, 2); + return round((self.risk_total/self.amount_invested)*100, 0); @property def portfolio_risk_percent(self): - return round((self.risk_total/10000)*100, 2); + return round((self.risk_total/10000)*100, 0); @property diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html index 38c7d46..a132cd6 100644 --- a/app/trading/templates/trading/list.html +++ b/app/trading/templates/trading/list.html @@ -116,8 +116,8 @@ ${{object.amount_invested}} ${{object.risk_per_contract}} ${{object.risk_total}} - ${{object.trade_risk_percent}} - ${{object.portfolio_risk_percent}} + {{object.trade_risk_percent}}% + {{object.portfolio_risk_percent}}% ${{object.profit_goal}} {{object.risk_reward}} -- cgit v1.2.3-70-g09d2