show percent instead of ratio (!)

This commit is contained in:
Matthias 2020-01-02 19:36:31 +01:00
parent cac0e37b06
commit 90744ff5ab
2 changed files with 3 additions and 2 deletions

View File

@ -120,8 +120,8 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
)
)
# Create description for sell summarizing the trade
desc = trades.apply(lambda row: f"{round(row['profitperc'], 3)}%, {row['sell_reason']}, "
f"{row['duration']} min",
desc = trades.apply(lambda row: f"{round(row['profitperc'] * 100, 1)}%, "
f"{row['sell_reason']}, {row['duration']} min",
axis=1)
trade_sells = go.Scatter(
x=trades["close_time"],

View File

@ -119,6 +119,7 @@ def test_plot_trades(testdatadir, caplog):
assert trade_sell.yaxis == 'y'
assert len(trades) == len(trade_sell.x)
assert trade_sell.marker.color == 'red'
assert trade_sell.text[0] == "4.0%, roi, 15 min"
def test_generate_candlestick_graph_no_signals_no_trades(default_conf, mocker, testdatadir, caplog):