Merge pull request #3000 from freqtrade/fix/jupyter_example

[minor] Fix jupyter notebook example
This commit is contained in:
hroff-1902 2020-03-02 00:49:21 +03:00 committed by GitHub
commit e20b06408c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -121,7 +121,6 @@ from freqtrade.data.btanalysis import analyze_trade_parallelism
# Analyze the above # Analyze the above
parallel_trades = analyze_trade_parallelism(trades, '5m') parallel_trades = analyze_trade_parallelism(trades, '5m')
parallel_trades.plot() parallel_trades.plot()
``` ```
@ -134,11 +133,14 @@ Freqtrade offers interactive plotting capabilities based on plotly.
from freqtrade.plot.plotting import generate_candlestick_graph from freqtrade.plot.plotting import generate_candlestick_graph
# Limit graph period to keep plotly quick and reactive # Limit graph period to keep plotly quick and reactive
# Filter trades to one pair
trades_red = trades.loc[trades['pair'] == pair]
data_red = data['2019-06-01':'2019-06-10'] data_red = data['2019-06-01':'2019-06-10']
# Generate candlestick graph # Generate candlestick graph
graph = generate_candlestick_graph(pair=pair, graph = generate_candlestick_graph(pair=pair,
data=data_red, data=data_red,
trades=trades, trades=trades_red,
indicators1=['sma20', 'ema50', 'ema55'], indicators1=['sma20', 'ema50', 'ema55'],
indicators2=['rsi', 'macd', 'macdsignal', 'macdhist'] indicators2=['rsi', 'macd', 'macdsignal', 'macdhist']
) )

View File

@ -190,7 +190,6 @@
"# Analyze the above\n", "# Analyze the above\n",
"parallel_trades = analyze_trade_parallelism(trades, '5m')\n", "parallel_trades = analyze_trade_parallelism(trades, '5m')\n",
"\n", "\n",
"\n",
"parallel_trades.plot()" "parallel_trades.plot()"
] ]
}, },
@ -212,11 +211,14 @@
"from freqtrade.plot.plotting import generate_candlestick_graph\n", "from freqtrade.plot.plotting import generate_candlestick_graph\n",
"# Limit graph period to keep plotly quick and reactive\n", "# Limit graph period to keep plotly quick and reactive\n",
"\n", "\n",
"# Filter trades to one pair\n",
"trades_red = trades.loc[trades['pair'] == pair]\n",
"\n",
"data_red = data['2019-06-01':'2019-06-10']\n", "data_red = data['2019-06-01':'2019-06-10']\n",
"# Generate candlestick graph\n", "# Generate candlestick graph\n",
"graph = generate_candlestick_graph(pair=pair,\n", "graph = generate_candlestick_graph(pair=pair,\n",
" data=data_red,\n", " data=data_red,\n",
" trades=trades,\n", " trades=trades_red,\n",
" indicators1=['sma20', 'ema50', 'ema55'],\n", " indicators1=['sma20', 'ema50', 'ema55'],\n",
" indicators2=['rsi', 'macd', 'macdsignal', 'macdhist']\n", " indicators2=['rsi', 'macd', 'macdsignal', 'macdhist']\n",
" )\n", " )\n",