better defaults
This commit is contained in:
parent
b3bc9fff5d
commit
e9d4bfadb7
@ -89,8 +89,8 @@
|
||||
"# Specify values for use in this script\n",
|
||||
"############### Customize to match your needs. ##################\n",
|
||||
"config_files = [\n",
|
||||
" Path('user_data', 'user_repo', 'config.json'),\n",
|
||||
" Path(Path.home(), '.freqtrade', 'exchange-config.json')\n",
|
||||
" Path('user_data', 'config.json'),\n",
|
||||
" Path(Path.home(), '.freqtrade', 'config.json')\n",
|
||||
"]\n",
|
||||
"# Create config object\n",
|
||||
"config = Configuration.from_files(config_files)\n",
|
||||
@ -103,15 +103,15 @@
|
||||
"# Location of the ticker data\n",
|
||||
"datadir = Path(user_data_dir, 'data/binance')\n",
|
||||
"# Name of the strategy class\n",
|
||||
"strategy_name = 'NewStrategy'\n",
|
||||
"strategy_name = 'DefaultStrategy'\n",
|
||||
"# Location of the strategy\n",
|
||||
"strategy_path = Path(user_data_dir, 'user_repo/strategies')\n",
|
||||
"strategy_path = Path(user_data_dir, 'strategies')\n",
|
||||
"# Specify backtest results to load\n",
|
||||
"trade_source = 'file'\n",
|
||||
"exportfilename = Path(user_data_dir, 'backtest_results/backtest-result.json')\n",
|
||||
"db_url = 'sqlite://'\n",
|
||||
"# Specify timerange to test\n",
|
||||
"timerange = '-1000'\n",
|
||||
"timerange = '-100'\n",
|
||||
"# Pair to analyze - Only use one pair here\n",
|
||||
"pair = \"ETH/BTC\""
|
||||
]
|
||||
@ -232,8 +232,7 @@
|
||||
"try:\n",
|
||||
" trades = load_trades(source=trade_source,\n",
|
||||
" db_url=db_url,\n",
|
||||
" exportfilename=exportfilename\n",
|
||||
" )\n",
|
||||
" exportfilename=exportfilename)\n",
|
||||
" trades = trades.loc[trades['pair'] == pair]\n",
|
||||
" trades = extract_trades_of_period(data, trades)\n",
|
||||
"except:\n",
|
||||
@ -243,11 +242,12 @@
|
||||
"# Specify the indicators to plot as lists\n",
|
||||
"# indicators1 is a list of indicators to overlay on the price chart\n",
|
||||
"# indicators2 is a list of indicators to plot below the price chart\n",
|
||||
"fig = generate_candlestick_graph(pair=pair,\n",
|
||||
"fig = generate_candlestick_graph(\n",
|
||||
" pair=pair,\n",
|
||||
" data=data,\n",
|
||||
" trades=trades,\n",
|
||||
" indicators1=['ema20', 'ema50', 'ema100', 'ha_open', 'ha_close'],\n",
|
||||
" indicators2=['macd', 'macdsignal','ao'])\n",
|
||||
" indicators1=['ema20', 'ema50', 'ema100'],\n",
|
||||
" indicators2=['macd', 'macdsignal'])\n",
|
||||
"\n",
|
||||
"fig.show()\n",
|
||||
"display(data.tail())"
|
||||
@ -258,7 +258,7 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Run Backtest\n",
|
||||
"Once you are happy with your strategy signals, run a backtest."
|
||||
"Once you are happy with your strategy signals, run a backtest then plot again."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user