diff options
author | luxagraf <sng@luxagraf.net> | 2021-08-30 09:08:53 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2021-08-30 09:08:53 -0400 |
commit | 0f54421cdf75acadae780fa29c692326c358ebab (patch) | |
tree | 9fcad6c0ac202be72a43aa699d9bdee58bff41f0 /app/trading | |
parent | 2d44c2ad39fdd75091d0ef4ecef28eca4f5168da (diff) |
trad: fixed some bugs in main template list
Diffstat (limited to 'app/trading')
-rw-r--r-- | app/trading/models.py | 4 | ||||
-rw-r--r-- | app/trading/templates/trading/list.html | 4 |
2 files changed, 4 insertions, 4 deletions
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 @@ <td>${{object.amount_invested}}</td> <td>${{object.risk_per_contract}}</td> <td>${{object.risk_total}}</td> - <td>${{object.trade_risk_percent}}</td> - <td>${{object.portfolio_risk_percent}}</td> + <td>{{object.trade_risk_percent}}%</td> + <td>{{object.portfolio_risk_percent}}%</td> <td>${{object.profit_goal}}</td> <td>{{object.risk_reward}}</td> <td> |