Update jupyter notebook slightly
This commit is contained in:
@@ -154,7 +154,8 @@ If the day shows the same day, then the last candle can be assumed as incomplete
|
||||
To keep the jupyter notebooks aligned with the documentation, the following should be ran after updating a example notebook.
|
||||
|
||||
``` bash
|
||||
jupyter nbconvert --to markdown user_data/notebooks/strategy_analysis_example.ipynb --stdout > docs/strategy_analysis_example.md
|
||||
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace user_data/notebooks/strategy_analysis_example.ipynb
|
||||
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to markdown user_data/notebooks/strategy_analysis_example.ipynb --stdout > docs/strategy_analysis_example.md
|
||||
```
|
||||
|
||||
## Creating a release
|
||||
|
@@ -1,31 +1,12 @@
|
||||
## Strategy debugging example
|
||||
# Strategy analysis example
|
||||
|
||||
Debugging a strategy can be time-consuming. FreqTrade offers helper functions to visualize raw data.
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
```python
|
||||
# Change directory
|
||||
# Modify this cell to insure that the output shows the correct path.
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Define all paths relative to the project root shown in the cell output
|
||||
project_root = "somedir/freqtrade"
|
||||
i=0
|
||||
try:
|
||||
os.chdirdir(project_root)
|
||||
assert Path('LICENSE').is_file()
|
||||
except:
|
||||
while i<4 and (not Path('LICENSE').is_file()):
|
||||
os.chdir(Path(Path.cwd(), '../'))
|
||||
i+=1
|
||||
project_root = Path.cwd()
|
||||
print(Path.cwd())
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
# Customize these according to your needs.
|
||||
|
||||
# Define some constants
|
||||
@@ -33,9 +14,9 @@ ticker_interval = "5m"
|
||||
# Name of the strategy class
|
||||
strategy_name = 'SampleStrategy'
|
||||
# Path to user data
|
||||
user_data_dir = 'user_data'
|
||||
user_data_dir = Path('user_data')
|
||||
# Location of the strategy
|
||||
strategy_location = Path(user_data_dir, 'strategies')
|
||||
strategy_location = user_data_dir / 'strategies'
|
||||
# Location of the data
|
||||
data_location = Path(user_data_dir, 'data', 'binance')
|
||||
# Pair to analyze - Only use one pair here
|
||||
@@ -45,7 +26,6 @@ pair = "BTC_USDT"
|
||||
|
||||
```python
|
||||
# Load data using values set above
|
||||
from pathlib import Path
|
||||
from freqtrade.data.history import load_pair_history
|
||||
|
||||
candles = load_pair_history(datadir=data_location,
|
||||
|
Reference in New Issue
Block a user