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