From 2efa1c164fa4c1b0f5bab1775fba7b0c496ef299 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 12 Feb 2020 21:43:43 +0100 Subject: [PATCH] Revert data-location section --- docs/strategy_analysis_example.md | 6 ++++-- freqtrade/templates/strategy_analysis_example.ipynb | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/strategy_analysis_example.md b/docs/strategy_analysis_example.md index 97a555e9e..93e84122b 100644 --- a/docs/strategy_analysis_example.md +++ b/docs/strategy_analysis_example.md @@ -20,6 +20,8 @@ config = Configuration.from_files([]) config["ticker_interval"] = "5m" # Name of the strategy class config["strategy"] = "SampleStrategy" +# Location of the data +data_location = Path(config['user_data_dir'], 'data', 'binance') # Pair to analyze - Only use one pair here pair = "BTC_USDT" ``` @@ -29,12 +31,12 @@ pair = "BTC_USDT" # Load data using values set above from freqtrade.data.history import load_pair_history -candles = load_pair_history(datadir=config["datadir"], +candles = load_pair_history(datadir=data_location, timeframe=config["ticker_interval"], pair=pair) # Confirm success -print("Loaded " + str(len(candles)) + f" rows of data for {pair} from {config['datadir']}") +print("Loaded " + str(len(candles)) + f" rows of data for {pair} from {data_location}") candles.head() ``` diff --git a/freqtrade/templates/strategy_analysis_example.ipynb b/freqtrade/templates/strategy_analysis_example.ipynb index 4b904e100..91e132380 100644 --- a/freqtrade/templates/strategy_analysis_example.ipynb +++ b/freqtrade/templates/strategy_analysis_example.ipynb @@ -36,6 +36,8 @@ "config[\"ticker_interval\"] = \"5m\"\n", "# Name of the strategy class\n", "config[\"strategy\"] = \"SampleStrategy\"\n", + "# Location of the data\n", + "data_location = Path(config['user_data_dir'], 'data', 'binance')\n", "# Pair to analyze - Only use one pair here\n", "pair = \"BTC_USDT\"" ] @@ -49,12 +51,12 @@ "# Load data using values set above\n", "from freqtrade.data.history import load_pair_history\n", "\n", - "candles = load_pair_history(datadir=config[\"datadir\"],\n", + "candles = load_pair_history(datadir=data_location,\n", " timeframe=config[\"ticker_interval\"],\n", " pair=pair)\n", "\n", "# Confirm success\n", - "print(\"Loaded \" + str(len(candles)) + f\" rows of data for {pair} from {config['datadir']}\")\n", + "print(\"Loaded \" + str(len(candles)) + f\" rows of data for {pair} from {data_location}\")\n", "candles.head()" ] },