stoploss precentage in telegram msg removed
This commit is contained in:
parent
0e5b0ebda6
commit
e11eb4775e
@ -101,8 +101,6 @@ class RPC(object):
|
||||
current_profit = trade.calc_profit_percent(current_rate)
|
||||
fmt_close_profit = (f'{round(trade.close_profit * 100, 2):.2f}%'
|
||||
if trade.close_profit else None)
|
||||
sl_percentage = round(((trade.stop_loss - current_rate) / current_rate) * 100, 2)
|
||||
txt_sl_percentage = f'{sl_percentage}%'
|
||||
|
||||
results.append(dict(
|
||||
trade_id=trade.id,
|
||||
@ -115,7 +113,6 @@ class RPC(object):
|
||||
close_profit=fmt_close_profit,
|
||||
current_profit=round(current_profit * 100, 2),
|
||||
stop_loss=trade.stop_loss,
|
||||
stop_loss_percentage=txt_sl_percentage,
|
||||
open_order='({} {} rem={:.8f})'.format(
|
||||
order['type'], order['side'], order['remaining']
|
||||
) if order else None,
|
||||
|
@ -204,7 +204,7 @@ class Telegram(RPC):
|
||||
"*Current Rate:* `{current_rate:.8f}`",
|
||||
"*Close Profit:* `{close_profit}`" if r['close_profit'] else "",
|
||||
"*Current Profit:* `{current_profit:.2f}%`",
|
||||
"*Stoploss:* `{stop_loss:.8f}` ({stop_loss_percentage})",
|
||||
"*Stoploss:* `{stop_loss:.8f}`",
|
||||
"*Open Order:* `{open_order}`" if r['open_order'] else "",
|
||||
]
|
||||
messages.append("\n".join(filter(None, lines)).format(**r))
|
||||
|
@ -58,8 +58,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, markets, mocker) -> None:
|
||||
'amount': 90.99181074,
|
||||
'close_profit': None,
|
||||
'current_profit': -0.59,
|
||||
'initial_stoploss': 0.0,
|
||||
'stoploss': 0.0,
|
||||
'stop_loss': 0.0,
|
||||
'open_order': '(limit buy rem=0.00000000)'
|
||||
} == results[0]
|
||||
|
||||
@ -80,8 +79,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, markets, mocker) -> None:
|
||||
'amount': 90.99181074,
|
||||
'close_profit': None,
|
||||
'current_profit': ANY,
|
||||
'initial_stoploss': 0.0,
|
||||
'stoploss': 0.0,
|
||||
'stop_loss': 0.0,
|
||||
'open_order': '(limit buy rem=0.00000000)'
|
||||
} == results[0]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user