mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Align mixtag response with other statistic models
This commit is contained in:
parent
da647735b6
commit
7daa06a207
|
@ -1790,7 +1790,7 @@ class Trade(ModelBase, LocalTrade):
|
|||
i = 0
|
||||
if not any(item["mix_tag"] == mix_tag for item in return_list):
|
||||
return_list.append({'mix_tag': mix_tag,
|
||||
'profit': profit,
|
||||
'profit_ratio': profit,
|
||||
'profit_pct': round(profit * 100, 2),
|
||||
'profit_abs': profit_abs,
|
||||
'count': count})
|
||||
|
@ -1799,7 +1799,7 @@ class Trade(ModelBase, LocalTrade):
|
|||
if return_list[i]["mix_tag"] == mix_tag:
|
||||
return_list[i] = {
|
||||
'mix_tag': mix_tag,
|
||||
'profit': profit + return_list[i]["profit"],
|
||||
'profit_ratio': profit + return_list[i]["profit"],
|
||||
'profit_pct': round(profit + return_list[i]["profit"] * 100, 2),
|
||||
'profit_abs': profit_abs + return_list[i]["profit_abs"],
|
||||
'count': 1 + return_list[i]["count"]}
|
||||
|
|
|
@ -113,7 +113,7 @@ class Exit(BaseModel):
|
|||
|
||||
class MixTag(BaseModel):
|
||||
mix_tag: str
|
||||
profit: float
|
||||
profit_ratio: float
|
||||
profit_pct: float
|
||||
profit_abs: float
|
||||
count: int
|
||||
|
|
|
@ -1378,7 +1378,7 @@ class Telegram(RPCHandler):
|
|||
stat_line = (
|
||||
f"{i+1}.\t <code>{trade['mix_tag']}\t"
|
||||
f"{round_coin_value(trade['profit_abs'], self._config['stake_currency'])} "
|
||||
f"({trade['profit']:.2%}) "
|
||||
f"({trade['profit_ratio']:.2%}) "
|
||||
f"({trade['count']})</code>\n")
|
||||
|
||||
if len(output + stat_line) >= MAX_MESSAGE_LENGTH:
|
||||
|
|
Loading…
Reference in New Issue
Block a user