Skip to content

Commit

Permalink
when pairing with BTC, we need a longer precision
Browse files Browse the repository at this point in the history
  • Loading branch information
Azulinho committed Nov 15, 2021
1 parent 347483c commit e79a34d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def buy_coin(self, coin) -> None:

cprint(
f"{coin.date}: [{coin.symbol}] {coin.status} {coin.holding_time}s "
+ f"U:{coin.volume} P:{coin.price} T:{coin.value:.3f} "
+ f"sell_at:{coin.price * coin.sell_at_percentage /100:.3f} "
+ f"U:{coin.volume} P:{coin.price} T:{coin.value} "
+ f"sell_at:{coin.price * coin.sell_at_percentage /100} "
+ f"({len(self.wallet)}/{self.max_coins})",
"magenta",
)
Expand Down Expand Up @@ -319,10 +319,10 @@ def sell_coin(self, coin) -> None:
cprint(
f"{coin.date}: [{coin.symbol}] {coin.status} A:{coin.holding_time}s "
+ f"U:{coin.volume} "
+ f"P:{coin.price} T:{coin.value:.3f} and "
+ f"P:{coin.price} T:{coin.value} and "
+ f"{message}:{coin.profit:.3f} "
+ f"sell_at:{coin.price * coin.sell_at_percentage / 100:.3f} "
+ f"trail_sell:{coin.price * coin.trail_target_sell_percentage/ 100:.3f}"
+ f"sell_at:{coin.price * coin.sell_at_percentage / 100} "
+ f"trail_sell:{coin.price * coin.trail_target_sell_percentage/ 100}"
+ f" ({len(self.wallet)}/{self.max_coins})",
ink,
)
Expand Down

0 comments on commit e79a34d

Please sign in to comment.