diff options
author | lxf <sng@luxagraf.net> | 2022-01-06 10:28:50 -0500 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2022-01-06 10:28:50 -0500 |
commit | 1b74c74fb154385d861d8a74feca75826d1c8a4b (patch) | |
tree | 09a7e8b5edf87815147625df521430df4602fea8 /app/trading/templates | |
parent | 66b01525e454369aacaa5bd42c791aa261878562 (diff) |
trad: added monthly and yearly options stats plus color to tables
Diffstat (limited to 'app/trading/templates')
-rw-r--r-- | app/trading/templates/trading/list.html | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html index a8a0a01..d89504a 100644 --- a/app/trading/templates/trading/list.html +++ b/app/trading/templates/trading/list.html @@ -37,7 +37,7 @@ <td>{{object.portfolio_risk|floatformat:2}}%</td> <td>${{object.sell_half_at|floatformat:2}}</td> <td>${{object.stop_price|floatformat:2}}</td> - <td>${{object.profit_loss|floatformat:2}}</td> + <td {%if object.profit_loss > 0 %}class="money"{%elif object.profit_loss < 0 %}class="nomoney"{%endif%}>${{object.profit_loss|floatformat:2}}</td> <td class="notes"> {% if object.notes %} <div class="wrapper"> @@ -50,6 +50,33 @@ </td>{% endif %} </tr> {% endfor %} + <tr> + <td> </td> + </tr> + <tr> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td>{{month}} P/L:</td> + <td>{{monthly_pl.pl__sum}}</td> + <td></td> + </tr> + <tr> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td></td> + <td>YTD P/L:</td> + <td>{{year_pl.pl__sum}}</td> + <td></td> + </tr> </table> {% comment %} <h3>Options Trades</h3> |