summaryrefslogtreecommitdiff
path: root/app/trading/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-08-04 10:03:05 -0400
committerluxagraf <sng@luxagraf.net>2021-08-04 10:03:05 -0400
commit01cff9a80da234b9da74eef97dea11aea0a8229a (patch)
treea43e5e90b81d864e08d437797037e55d9c814ef4 /app/trading/views.py
parent001deb3734b6295b39c4431a21b56a2ff4a06537 (diff)
trad: added P/L to options table in list view
Diffstat (limited to 'app/trading/views.py')
-rw-r--r--app/trading/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/trading/views.py b/app/trading/views.py
index aa68192..9e19c05 100644
--- a/app/trading/views.py
+++ b/app/trading/views.py
@@ -18,6 +18,8 @@ class LuxTradeListView(PaginatedListView):
context['options_trades_closed'] = LuxOptionsTrade.objects.filter(status=1)
context['monthly_pl'] = LuxTrade.stats.get_month_pl()
context['year_pl'] = LuxTrade.stats.get_year_pl()
+ context['options_monthly_pl'] = LuxOptionsTrade.stats.get_month_pl()
+ context['options_year_pl'] = LuxOptionsTrade.stats.get_year_pl()
context['month'] = datetime.now().strftime('%h')
return context