From 15bec8b2d33340c1d2a556c6f09030ef09cb9bba Mon Sep 17 00:00:00 2001 From: Death916 Date: Mon, 30 Jul 2018 02:18:55 -0700 Subject: [PATCH] math fix --- trade.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trade.py b/trade.py index 1b528cd..fcf66c9 100644 --- a/trade.py +++ b/trade.py @@ -38,6 +38,7 @@ def close_trade(amount): # print(trex.sell_limit(ticker, amount, rate=sellprice)) print('selling', amount, 'of', ticker) hist.tradehist('sold ' + str(amount) + ' of ' + ticker + ' at ' + str(sellprice)) + global buy_amount hist.tradehist('profit = ' + '{:.20f}'.format((sellprice * amount) - (buyprice * buy_amount))) def open_orders():