Merge pull request #4792 from JoeSchr/add-distribution-graph-to-example-notebook

add distribution graph to example notebook
This commit is contained in:
Matthias 2021-04-24 16:14:48 +02:00 committed by GitHub
commit 8e85b63b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -195,4 +195,18 @@ graph.show(renderer="browser")
```
## Plot average profit per trade as distribution graph
```python
import plotly.figure_factory as ff
hist_data = [trades.profit_ratio]
group_labels = ['profit_ratio'] # name of the dataset
fig = ff.create_distplot(hist_data, group_labels,bin_size=0.01)
fig.show()
```
Feel free to submit an issue or Pull Request enhancing this document if you would like to share ideas on how to best analyze the data.

View File

@ -282,6 +282,28 @@
"graph.show(renderer=\"browser\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot average profit per trade as distribution graph"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import plotly.figure_factory as ff\n",
"\n",
"hist_data = [trades.profit_ratio]\n",
"group_labels = ['profit_ratio'] # name of the dataset\n",
"\n",
"fig = ff.create_distplot(hist_data, group_labels,bin_size=0.01)\n",
"fig.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},