From 381967bfb8c0dbd483df7d013e17dc1971660424 Mon Sep 17 00:00:00 2001 From: seansan Date: Thu, 21 Dec 2017 15:26:38 +0100 Subject: [PATCH] Add loss instead of profit --- freqtrade/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index 941d6870a..4665f8885 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -119,11 +119,15 @@ def execute_sell(trade: Trade, limit: float) -> None: trade.open_order_id = order_id fmt_exp_profit = round(trade.calc_profit(limit) * 100, 2) - rpc.send_msg('*{}:* Selling [{}]({}) with limit `{:.8f} (profit: ~{:.2f}%)`'.format( + _txtprofit = 'profit' + if fmt_exp_profit < 0: + _txtprofit = 'loss' + rpc.send_msg('*{}:* Selling [{}]({}) with limit `{:.8f} ({}: ~{:.2f}%)`'.format( trade.exchange, trade.pair.replace('_', '/'), exchange.get_pair_detail_url(trade.pair), limit, + _txtprofit, fmt_exp_profit )) Trade.session.flush()