Update sell_reason to exit_reason
This commit is contained in:
parent
cd78792f48
commit
a27c837d18
@ -182,7 +182,7 @@ from freqtrade.data.btanalysis import load_trades_from_db
|
|||||||
trades = load_trades_from_db("sqlite:///tradesv3.sqlite")
|
trades = load_trades_from_db("sqlite:///tradesv3.sqlite")
|
||||||
|
|
||||||
# Display results
|
# Display results
|
||||||
trades.groupby("pair")["sell_reason"].value_counts()
|
trades.groupby("pair")["exit_reason"].value_counts()
|
||||||
```
|
```
|
||||||
|
|
||||||
## Analyze the loaded trades for trade parallelism
|
## Analyze the loaded trades for trade parallelism
|
||||||
|
@ -1324,7 +1324,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_mix_tag_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
def get_mix_tag_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Returns List of dicts containing all Trades, based on buy_tag + sell_reason performance
|
Returns List of dicts containing all Trades, based on entry_tag + exit_reason performance
|
||||||
Can either be average for all pairs or a specific pair provided
|
Can either be average for all pairs or a specific pair provided
|
||||||
NOTE: Not supported in Backtesting.
|
NOTE: Not supported in Backtesting.
|
||||||
"""
|
"""
|
||||||
@ -1346,12 +1346,12 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
.all()
|
.all()
|
||||||
|
|
||||||
return_list: List[Dict] = []
|
return_list: List[Dict] = []
|
||||||
for id, enter_tag, sell_reason, profit, profit_abs, count in mix_tag_perf:
|
for id, enter_tag, exit_reason, profit, profit_abs, count in mix_tag_perf:
|
||||||
enter_tag = enter_tag if enter_tag is not None else "Other"
|
enter_tag = enter_tag if enter_tag is not None else "Other"
|
||||||
sell_reason = sell_reason if sell_reason is not None else "Other"
|
exit_reason = exit_reason if exit_reason is not None else "Other"
|
||||||
|
|
||||||
if(sell_reason is not None and enter_tag is not None):
|
if(exit_reason is not None and enter_tag is not None):
|
||||||
mix_tag = enter_tag + " " + sell_reason
|
mix_tag = enter_tag + " " + exit_reason
|
||||||
i = 0
|
i = 0
|
||||||
if not any(item["mix_tag"] == mix_tag for item in return_list):
|
if not any(item["mix_tag"] == mix_tag for item in return_list):
|
||||||
return_list.append({'mix_tag': mix_tag,
|
return_list.append({'mix_tag': mix_tag,
|
||||||
|
@ -857,7 +857,7 @@ class RPC:
|
|||||||
|
|
||||||
def _rpc_mix_tag_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
def _rpc_mix_tag_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Handler for mix tag (enter_tag + sell_reason) performance.
|
Handler for mix tag (enter_tag + exit_reason) performance.
|
||||||
Shows a performance statistic from finished trades
|
Shows a performance statistic from finished trades
|
||||||
"""
|
"""
|
||||||
mix_tags = Trade.get_mix_tag_performance(pair)
|
mix_tags = Trade.get_mix_tag_performance(pair)
|
||||||
|
@ -257,7 +257,7 @@
|
|||||||
"trades = load_trades_from_db(\"sqlite:///tradesv3.sqlite\")\n",
|
"trades = load_trades_from_db(\"sqlite:///tradesv3.sqlite\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Display results\n",
|
"# Display results\n",
|
||||||
"trades.groupby(\"pair\")[\"sell_reason\"].value_counts()"
|
"trades.groupby(\"pair\")[\"exit_reason\"].value_counts()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user