chore: format according to 2026 styleguide
This commit is contained in:
@@ -223,7 +223,7 @@ def start_list_trades_data(args: dict[str, Any]) -> None:
|
|||||||
end.strftime(DATETIME_PRINT_FORMAT),
|
end.strftime(DATETIME_PRINT_FORMAT),
|
||||||
str(length),
|
str(length),
|
||||||
)
|
)
|
||||||
for pair, start, end, length in sorted(paircombs1, key=lambda x: (x[0]))
|
for pair, start, end, length in sorted(paircombs1, key=lambda x: x[0])
|
||||||
],
|
],
|
||||||
("Pair", "Type", "From", "To", "Trades"),
|
("Pair", "Type", "From", "To", "Trades"),
|
||||||
summary=title,
|
summary=title,
|
||||||
|
|||||||
@@ -261,10 +261,12 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
|
|||||||
if trades is not None and len(trades) > 0:
|
if trades is not None and len(trades) > 0:
|
||||||
# Create description for exit summarizing the trade
|
# Create description for exit summarizing the trade
|
||||||
trades["desc"] = trades.apply(
|
trades["desc"] = trades.apply(
|
||||||
lambda row: f"{row['profit_ratio']:.2%}, "
|
lambda row: (
|
||||||
|
f"{row['profit_ratio']:.2%}, "
|
||||||
+ (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "")
|
+ (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "")
|
||||||
+ f"{row['exit_reason']}, "
|
+ f"{row['exit_reason']}, "
|
||||||
+ f"{row['trade_duration']} min",
|
+ f"{row['trade_duration']} min"
|
||||||
|
),
|
||||||
axis=1,
|
axis=1,
|
||||||
)
|
)
|
||||||
trade_entries = go.Scatter(
|
trade_entries = go.Scatter(
|
||||||
|
|||||||
Reference in New Issue
Block a user