diff --git a/core/lib/schemas/oanda_s.py b/core/lib/schemas/oanda_s.py index 2e915e6..9005b21 100644 --- a/core/lib/schemas/oanda_s.py +++ b/core/lib/schemas/oanda_s.py @@ -82,7 +82,7 @@ def parse_side(x): return "unknown" -def parse_trade_ids(x, sum=-1): +def parse_trade_ids(x, sum=0): if float(x["long"]["units"]) > 0: return [str(int(y) + sum) for y in x["long"]["tradeIDs"]] elif float(x["short"]["units"]) < 0: diff --git a/core/templates/partials/position-list.html b/core/templates/partials/position-list.html index c4d91fa..3bcfeac 100644 --- a/core/templates/partials/position-list.html +++ b/core/templates/partials/position-list.html @@ -8,7 +8,7 @@ quote P/L side - stored + trades actions {% for item in items %} @@ -33,7 +33,7 @@ {% endif %} - {{ item.trades|length }} + {{ item.trade_ids|length }}