mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
flake8
This commit is contained in:
parent
6d91a5ecbd
commit
099a03f190
|
@ -376,7 +376,7 @@ class Telegram(RPCHandler):
|
||||||
"""
|
"""
|
||||||
lines = []
|
lines = []
|
||||||
for x, order in enumerate(filled_orders):
|
for x, order in enumerate(filled_orders):
|
||||||
current_entry_datetime = arrow.get(order["order_filled_date"])
|
cur_entry_datetime = arrow.get(order["order_filled_date"])
|
||||||
cur_entry_amount = order["amount"]
|
cur_entry_amount = order["amount"]
|
||||||
cur_entry_average = order["average"]
|
cur_entry_average = order["average"]
|
||||||
lines.append(" ")
|
lines.append(" ")
|
||||||
|
@ -393,15 +393,15 @@ class Telegram(RPCHandler):
|
||||||
sumB += filled_orders[y]["amount"]
|
sumB += filled_orders[y]["amount"]
|
||||||
prev_avg_price = sumA/sumB
|
prev_avg_price = sumA/sumB
|
||||||
price_to_1st_entry = ((cur_entry_average - filled_orders[0]["average"])
|
price_to_1st_entry = ((cur_entry_average - filled_orders[0]["average"])
|
||||||
/ filled_orders[0]["average"])
|
/ filled_orders[0]["average"])
|
||||||
minus_on_entry = (cur_entry_average - prev_avg_price)/prev_avg_price
|
minus_on_entry = (cur_entry_average - prev_avg_price)/prev_avg_price
|
||||||
dur_entry = current_entry_datetime - arrow.get(filled_orders[x-1]["order_filled_date"])
|
dur_entry = cur_entry_datetime - arrow.get(filled_orders[x-1]["order_filled_date"])
|
||||||
days = dur_entry.days
|
days = dur_entry.days
|
||||||
hours, remainder = divmod(dur_entry.seconds, 3600)
|
hours, remainder = divmod(dur_entry.seconds, 3600)
|
||||||
minutes, seconds = divmod(remainder, 60)
|
minutes, seconds = divmod(remainder, 60)
|
||||||
lines.append("*Entry #{}:* at {:.2%} avg profit".format(x+1, minus_on_entry))
|
lines.append("*Entry #{}:* at {:.2%} avg profit".format(x+1, minus_on_entry))
|
||||||
if is_open:
|
if is_open:
|
||||||
lines.append("({})".format(current_entry_datetime
|
lines.append("({})".format(cur_entry_datetime
|
||||||
.humanize(granularity=["day", "hour", "minute"])))
|
.humanize(granularity=["day", "hour", "minute"])))
|
||||||
lines.append("*Entry Amount:* {} ({:.8f} {})"
|
lines.append("*Entry Amount:* {} ({:.8f} {})"
|
||||||
.format(cur_entry_amount, order["cost"], base_currency))
|
.format(cur_entry_amount, order["cost"], base_currency))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user