Added persistence futures tests

This commit is contained in:
Sam Germain
2021-10-11 07:48:31 -06:00
parent 01a9e90057
commit bdad604fab
2 changed files with 49 additions and 46 deletions

View File

@@ -649,7 +649,7 @@ class LocalTrade():
zero = Decimal(0.0)
# If nothing was borrowed
if self.has_no_leverage:
if self.has_no_leverage or self.trading_mode != TradingMode.MARGIN:
return zero
open_date = self.open_date.replace(tzinfo=None)