Skip to content

Commit

Permalink
added imports to doc code blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jraviotta committed Aug 9, 2019
1 parent 3cc772c commit dd35ba5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions docs/data-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ You can analyze the results of backtests and trading history easily using Jupyte
### Load backtest results into a pandas dataframe

```python
from freqtrade.data.btanalysis import load_backtest_data
# Load backtest results
df = load_backtest_data("user_data/backtest_data/backtest-result.json")

Expand All @@ -19,6 +20,8 @@ df.groupby("pair")["sell_reason"].value_counts()
### Load live trading results into a pandas dataframe

``` python
from freqtrade.data.btanalysis import load_trades_from_db

# Fetch trades from database
df = load_trades_from_db("sqlite:///tradesv3.sqlite")

Expand All @@ -38,13 +41,11 @@ from pathlib import Path
import os
from freqtrade.data.history import load_pair_history
from freqtrade.resolvers import StrategyResolver
from freqtrade.data.btanalysis import load_backtest_data
from freqtrade.data.btanalysis import load_trades_from_db

# Define some constants
ticker_interval = "1m"
ticker_interval = "5m"
# Name of the strategy class
strategy_name = 'NewStrategy'
strategy_name = 'AwesomeStrategy'
# Path to user data
user_data_dir = 'user_data'
# Location of the strategy
Expand Down
2 changes: 1 addition & 1 deletion user_data/notebooks/analysis_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"# Define some constants\n",
"ticker_interval = \"5m\"\n",
"# Name of the strategy class\n",
"strategy_name = 'NewStrategy'\n",
"strategy_name = 'AwesomeStrategy'\n",
"# Path to user data\n",
"user_data_dir = 'user_data'\n",
"# Location of the strategy\n",
Expand Down

0 comments on commit dd35ba5

Please sign in to comment.