mirror of
https://github.com/Death916/emailtrade.git
synced 2026-04-10 03:04:40 -07:00
math fix
This commit is contained in:
parent
36ff320689
commit
15bec8b2d3
1 changed files with 1 additions and 0 deletions
1
trade.py
1
trade.py
|
|
@ -38,6 +38,7 @@ def close_trade(amount):
|
||||||
# print(trex.sell_limit(ticker, amount, rate=sellprice))
|
# print(trex.sell_limit(ticker, amount, rate=sellprice))
|
||||||
print('selling', amount, 'of', ticker)
|
print('selling', amount, 'of', ticker)
|
||||||
hist.tradehist('sold ' + str(amount) + ' of ' + ticker + ' at ' + str(sellprice))
|
hist.tradehist('sold ' + str(amount) + ' of ' + ticker + ' at ' + str(sellprice))
|
||||||
|
global buy_amount
|
||||||
hist.tradehist('profit = ' + '{:.20f}'.format((sellprice * amount) - (buyprice * buy_amount)))
|
hist.tradehist('profit = ' + '{:.20f}'.format((sellprice * amount) - (buyprice * buy_amount)))
|
||||||
|
|
||||||
def open_orders():
|
def open_orders():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue