mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Code style improvements
This commit is contained in:
parent
6aa4de4d29
commit
0077f3c9a5
|
@ -255,7 +255,7 @@ class FreqaiDataKitchen:
|
|||
if (1 - len(filtered_df) / len(unfiltered_df)) > 0.1 and self.live:
|
||||
worst_indicator = str(unfiltered_df.count().idxmin())
|
||||
logger.warning(
|
||||
f" {(1 - len(filtered_df)/len(unfiltered_df)) * 100:.0f} percent "
|
||||
f" {(1 - len(filtered_df) / len(unfiltered_df)) * 100:.0f} percent "
|
||||
" of training data dropped due to NaNs, model may perform inconsistent "
|
||||
f"with expectations. Verify {worst_indicator}"
|
||||
)
|
||||
|
|
|
@ -1346,7 +1346,7 @@ class Telegram(RPCHandler):
|
|||
output = "<b>Performance:</b>\n"
|
||||
for i, trade in enumerate(trades):
|
||||
stat_line = (
|
||||
f"{i+1}.\t <code>{trade['pair']}\t"
|
||||
f"{i + 1}.\t <code>{trade['pair']}\t"
|
||||
f"{fmt_coin(trade['profit_abs'], self._config['stake_currency'])} "
|
||||
f"({trade['profit_ratio']:.2%}) "
|
||||
f"({trade['count']})</code>\n")
|
||||
|
@ -1378,7 +1378,7 @@ class Telegram(RPCHandler):
|
|||
output = "<b>Entry Tag Performance:</b>\n"
|
||||
for i, trade in enumerate(trades):
|
||||
stat_line = (
|
||||
f"{i+1}.\t <code>{trade['enter_tag']}\t"
|
||||
f"{i + 1}.\t <code>{trade['enter_tag']}\t"
|
||||
f"{fmt_coin(trade['profit_abs'], self._config['stake_currency'])} "
|
||||
f"({trade['profit_ratio']:.2%}) "
|
||||
f"({trade['count']})</code>\n")
|
||||
|
@ -1410,7 +1410,7 @@ class Telegram(RPCHandler):
|
|||
output = "<b>Exit Reason Performance:</b>\n"
|
||||
for i, trade in enumerate(trades):
|
||||
stat_line = (
|
||||
f"{i+1}.\t <code>{trade['exit_reason']}\t"
|
||||
f"{i + 1}.\t <code>{trade['exit_reason']}\t"
|
||||
f"{fmt_coin(trade['profit_abs'], self._config['stake_currency'])} "
|
||||
f"({trade['profit_ratio']:.2%}) "
|
||||
f"({trade['count']})</code>\n")
|
||||
|
@ -1442,7 +1442,7 @@ class Telegram(RPCHandler):
|
|||
output = "<b>Mix Tag Performance:</b>\n"
|
||||
for i, trade in enumerate(trades):
|
||||
stat_line = (
|
||||
f"{i+1}.\t <code>{trade['mix_tag']}\t"
|
||||
f"{i + 1}.\t <code>{trade['mix_tag']}\t"
|
||||
f"{fmt_coin(trade['profit_abs'], self._config['stake_currency'])} "
|
||||
f"({trade['profit_ratio']:.2%}) "
|
||||
f"({trade['count']})</code>\n")
|
||||
|
|
|
@ -118,7 +118,10 @@ def generate_trades_history(n_rows, start_date: Optional[datetime] = None, days=
|
|||
random_timestamps_in_seconds = np.random.uniform(_start_timestamp, _end_timestamp, n_rows)
|
||||
timestamp = pd.to_datetime(random_timestamps_in_seconds, unit='s')
|
||||
|
||||
id = [f'a{np.random.randint(1e6, 1e7-1)}cd{np.random.randint(100, 999)}' for _ in range(n_rows)]
|
||||
id = [
|
||||
f'a{np.random.randint(1e6, 1e7 - 1)}cd{np.random.randint(100, 999)}'
|
||||
for _ in range(n_rows)
|
||||
]
|
||||
|
||||
side = np.random.choice(['buy', 'sell'], n_rows)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user