Merge pull request #2451 from freqtrade/bt_analysis_maxopen

Bt analysis maxopen at any time
This commit is contained in:
hroff-1902
2019-11-01 00:13:31 +03:00
committed by GitHub
5 changed files with 83 additions and 16 deletions

View File

@@ -107,6 +107,22 @@ trades = load_trades_from_db("sqlite:///tradesv3.sqlite")
trades.groupby("pair")["sell_reason"].value_counts()
```
## Analyze the loaded trades for trade parallelism
This can be useful to find the best `max_open_trades` parameter, when used with backtesting in conjunction with `--disable-max-market-positions`.
`analyze_trade_parallelism()` returns a timeseries dataframe with an "open_trades" column, specifying the number of open trades for each candle.
```python
from freqtrade.data.btanalysis import analyze_trade_parallelism
# Analyze the above
parallel_trades = analyze_trade_parallelism(trades, '5m')
parallel_trades.plot()
```
## Plot results
Freqtrade offers interactive plotting capabilities based on plotly.