Deployed 7e7e475 to develop in en with MkDocs 1.6.1 and mike 2.1.4
This commit is contained in:
@@ -399,6 +399,178 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Docker quick start">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#adding-a-custom-strategy" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Adding a custom strategy
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#accessing-the-ui" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Accessing the UI
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#monitoring-the-bot" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Monitoring the bot
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#docker-compose-logs" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Docker compose logs
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#database" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Database
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#updating-freqtrade-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Updating freqtrade with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#editing-the-docker-compose-file" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Editing the docker-compose file
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Editing the docker-compose file">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#example-download-data-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Example: Download data with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#example-backtest-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Example: Backtest with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#additional-dependencies-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Additional dependencies with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#plotting-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Plotting with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#data-analysis-using-docker-compose" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Data analysis using docker compose
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#troubleshooting" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Troubleshooting
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Troubleshooting">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#docker-on-windows" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Docker on Windows
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1901,6 +2073,178 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Docker quick start">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#adding-a-custom-strategy" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Adding a custom strategy
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#accessing-the-ui" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Accessing the UI
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#monitoring-the-bot" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Monitoring the bot
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#docker-compose-logs" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Docker compose logs
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#database" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Database
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#updating-freqtrade-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Updating freqtrade with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#editing-the-docker-compose-file" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Editing the docker-compose file
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Editing the docker-compose file">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#example-download-data-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Example: Download data with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#example-backtest-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Example: Backtest with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#additional-dependencies-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Additional dependencies with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#plotting-with-docker" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Plotting with docker
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#data-analysis-using-docker-compose" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Data analysis using docker compose
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#troubleshooting" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Troubleshooting
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Troubleshooting">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#docker-on-windows" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Docker on Windows
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1962,18 +2306,20 @@ While the docker-compose standalone installation still works, it will require ch
|
||||
</div>
|
||||
<h3 id="docker-quick-start">Docker quick start<a class="headerlink" href="#docker-quick-start" title="Permanent link">¶</a></h3>
|
||||
<p>Create a new directory and place the <a href="https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml">docker-compose file</a> in this directory.</p>
|
||||
<p>``` bash
|
||||
mkdir ft_userdata
|
||||
cd ft_userdata/</p>
|
||||
<h1 id="download-the-docker-compose-file-from-the-repository">Download the docker-compose file from the repository<a class="headerlink" href="#download-the-docker-compose-file-from-the-repository" title="Permanent link">¶</a></h1>
|
||||
<p>curl <a href="https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml">https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml</a> -o docker-compose.yml</p>
|
||||
<h1 id="pull-the-freqtrade-image">Pull the freqtrade image<a class="headerlink" href="#pull-the-freqtrade-image" title="Permanent link">¶</a></h1>
|
||||
<p>docker compose pull</p>
|
||||
<h1 id="create-user-directory-structure">Create user directory structure<a class="headerlink" href="#create-user-directory-structure" title="Permanent link">¶</a></h1>
|
||||
<p>docker compose run --rm freqtrade create-userdir --userdir user_data</p>
|
||||
<h1 id="create-configuration-requires-answering-interactive-questions">Create configuration - Requires answering interactive questions<a class="headerlink" href="#create-configuration-requires-answering-interactive-questions" title="Permanent link">¶</a></h1>
|
||||
<p>docker compose run --rm freqtrade new-config --config user_data/config.json
|
||||
```</p>
|
||||
<div class="highlight"><pre><span></span><code>mkdir<span class="w"> </span>ft_userdata
|
||||
<span class="nb">cd</span><span class="w"> </span>ft_userdata/
|
||||
<span class="c1"># Download the docker-compose file from the repository</span>
|
||||
curl<span class="w"> </span>https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml<span class="w"> </span>-o<span class="w"> </span>docker-compose.yml
|
||||
|
||||
<span class="c1"># Pull the freqtrade image</span>
|
||||
docker<span class="w"> </span>compose<span class="w"> </span>pull
|
||||
|
||||
<span class="c1"># Create user directory structure</span>
|
||||
docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>freqtrade<span class="w"> </span>create-userdir<span class="w"> </span>--userdir<span class="w"> </span>user_data
|
||||
|
||||
<span class="c1"># Create configuration - Requires answering interactive questions</span>
|
||||
docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>freqtrade<span class="w"> </span>new-config<span class="w"> </span>--config<span class="w"> </span>user_data/config.json
|
||||
</code></pre></div>
|
||||
<p>The above snippet creates a new directory called <code>ft_userdata</code>, downloads the latest compose file and pulls the freqtrade image.
|
||||
The last 2 steps in the snippet create the directory with <code>user_data</code>, as well as (interactively) the default configuration based on your selections.</p>
|
||||
<div class="admonition question">
|
||||
@@ -1995,8 +2341,8 @@ Please always backtest your strategy and use dry-run for some time before riskin
|
||||
You will find more information about Strategy development in the <a href="../strategy-customization/">Strategy documentation</a>.</p>
|
||||
</div>
|
||||
<p>Once this is done, you're ready to launch the bot in trading mode (Dry-run or Live-trading, depending on your answer to the corresponding question you made above).</p>
|
||||
<p><code>bash
|
||||
docker compose up -d</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>up<span class="w"> </span>-d
|
||||
</code></pre></div>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Default configuration</p>
|
||||
<p>While the configuration generated will be mostly functional, you will still need to verify that all options correspond to what you want (like Pricing, pairlist, ...) before starting the bot.</p>
|
||||
@@ -2021,12 +2367,11 @@ You can also check the latest log with the command <code>docker compose logs -f<
|
||||
<p>The database will be located at: <code>user_data/tradesv3.sqlite</code></p>
|
||||
<h4 id="updating-freqtrade-with-docker">Updating freqtrade with docker<a class="headerlink" href="#updating-freqtrade-with-docker" title="Permanent link">¶</a></h4>
|
||||
<p>Updating freqtrade when using <code>docker</code> is as simple as running the following 2 commands:</p>
|
||||
<p>``` bash</p>
|
||||
<h1 id="download-the-latest-image">Download the latest image<a class="headerlink" href="#download-the-latest-image" title="Permanent link">¶</a></h1>
|
||||
<p>docker compose pull</p>
|
||||
<h1 id="restart-the-image">Restart the image<a class="headerlink" href="#restart-the-image" title="Permanent link">¶</a></h1>
|
||||
<p>docker compose up -d
|
||||
```</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># Download the latest image</span>
|
||||
docker<span class="w"> </span>compose<span class="w"> </span>pull
|
||||
<span class="c1"># Restart the image</span>
|
||||
docker<span class="w"> </span>compose<span class="w"> </span>up<span class="w"> </span>-d
|
||||
</code></pre></div>
|
||||
<p>This will first pull the latest image, and will then restart the container with the just pulled version.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Check the Changelog</p>
|
||||
@@ -2054,40 +2399,40 @@ This can be useful for fetching exchange information to add to your <code>config
|
||||
</details>
|
||||
<h4 id="example-download-data-with-docker">Example: Download data with docker<a class="headerlink" href="#example-download-data-with-docker" title="Permanent link">¶</a></h4>
|
||||
<p>Download backtesting data for 5 days for the pair ETH/BTC and 1h timeframe from Binance. The data will be stored in the directory <code>user_data/data/</code> on the host.</p>
|
||||
<p><code>bash
|
||||
docker compose run --rm freqtrade download-data --pairs ETH/BTC --exchange binance --days 5 -t 1h</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>freqtrade<span class="w"> </span>download-data<span class="w"> </span>--pairs<span class="w"> </span>ETH/BTC<span class="w"> </span>--exchange<span class="w"> </span>binance<span class="w"> </span>--days<span class="w"> </span><span class="m">5</span><span class="w"> </span>-t<span class="w"> </span>1h
|
||||
</code></pre></div>
|
||||
<p>Head over to the <a href="../data-download/">Data Downloading Documentation</a> for more details on downloading data.</p>
|
||||
<h4 id="example-backtest-with-docker">Example: Backtest with docker<a class="headerlink" href="#example-backtest-with-docker" title="Permanent link">¶</a></h4>
|
||||
<p>Run backtesting in docker-containers for SampleStrategy and specified timerange of historical data, on 5m timeframe:</p>
|
||||
<p><code>bash
|
||||
docker compose run --rm freqtrade backtesting --config user_data/config.json --strategy SampleStrategy --timerange 20190801-20191001 -i 5m</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>freqtrade<span class="w"> </span>backtesting<span class="w"> </span>--config<span class="w"> </span>user_data/config.json<span class="w"> </span>--strategy<span class="w"> </span>SampleStrategy<span class="w"> </span>--timerange<span class="w"> </span><span class="m">20190801</span>-20191001<span class="w"> </span>-i<span class="w"> </span>5m
|
||||
</code></pre></div>
|
||||
<p>Head over to the <a href="../backtesting/">Backtesting Documentation</a> to learn more.</p>
|
||||
<h3 id="additional-dependencies-with-docker">Additional dependencies with docker<a class="headerlink" href="#additional-dependencies-with-docker" title="Permanent link">¶</a></h3>
|
||||
<p>If your strategy requires dependencies not included in the default image - it will be necessary to build the image on your host.
|
||||
For this, please create a Dockerfile containing installation steps for the additional dependencies (have a look at <a href="https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.custom">docker/Dockerfile.custom</a> for an example).</p>
|
||||
<p>You'll then also need to modify the <code>docker-compose.yml</code> file and uncomment the build step, as well as rename the image to avoid naming collisions.</p>
|
||||
<p><code>yaml
|
||||
image: freqtrade_custom
|
||||
build:
|
||||
context: .
|
||||
dockerfile: "./Dockerfile.<yourextension>"</code></p>
|
||||
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">freqtrade_custom</span>
|
||||
<span class="w"> </span><span class="nt">build</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="nt">context</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">.</span>
|
||||
<span class="w"> </span><span class="nt">dockerfile</span><span class="p">:</span><span class="w"> </span><span class="s">"./Dockerfile.<yourextension>"</span>
|
||||
</code></pre></div>
|
||||
<p>You can then run <code>docker compose build --pull</code> to build the docker image, and run it using the commands described above.</p>
|
||||
<h3 id="plotting-with-docker">Plotting with docker<a class="headerlink" href="#plotting-with-docker" title="Permanent link">¶</a></h3>
|
||||
<p>Commands <code>freqtrade plot-profit</code> and <code>freqtrade plot-dataframe</code> (<a href="../plotting/">Documentation</a>) are available by changing the image to <code>*_plot</code> in your <code>docker-compose.yml</code> file.
|
||||
You can then use these commands as follows:</p>
|
||||
<p><code>bash
|
||||
docker compose run --rm freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH --timerange=20180801-20180805</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>freqtrade<span class="w"> </span>plot-dataframe<span class="w"> </span>--strategy<span class="w"> </span>AwesomeStrategy<span class="w"> </span>-p<span class="w"> </span>BTC/ETH<span class="w"> </span>--timerange<span class="o">=</span><span class="m">20180801</span>-20180805
|
||||
</code></pre></div>
|
||||
<p>The output will be stored in the <code>user_data/plot</code> directory, and can be opened with any modern browser.</p>
|
||||
<h3 id="data-analysis-using-docker-compose">Data analysis using docker compose<a class="headerlink" href="#data-analysis-using-docker-compose" title="Permanent link">¶</a></h3>
|
||||
<p>Freqtrade provides a docker-compose file which starts up a jupyter lab server.
|
||||
You can run this server using the following command:</p>
|
||||
<p><code>bash
|
||||
docker compose -f docker/docker-compose-jupyter.yml up</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>-f<span class="w"> </span>docker/docker-compose-jupyter.yml<span class="w"> </span>up
|
||||
</code></pre></div>
|
||||
<p>This will create a docker-container running jupyter lab, which will be accessible using <code>https://127.0.0.1:8888/lab</code>.
|
||||
Please use the link that's printed in the console after startup for simplified login.</p>
|
||||
<p>Since part of this image is built on your machine, it is recommended to rebuild the image from time to time to keep freqtrade (and dependencies) up-to-date.</p>
|
||||
<p><code>bash
|
||||
docker compose -f docker/docker-compose-jupyter.yml build --no-cache</code></p>
|
||||
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>-f<span class="w"> </span>docker/docker-compose-jupyter.yml<span class="w"> </span>build<span class="w"> </span>--no-cache
|
||||
</code></pre></div>
|
||||
<h2 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">¶</a></h2>
|
||||
<h3 id="docker-on-windows">Docker on Windows<a class="headerlink" href="#docker-on-windows" title="Permanent link">¶</a></h3>
|
||||
<ul>
|
||||
@@ -2096,10 +2441,10 @@ docker compose -f docker/docker-compose-jupyter.yml build --no-cache</code></p>
|
||||
The market api requests require a synchronized clock but the time in the docker container shifts a bit over time into the past.
|
||||
To fix this issue temporarily you need to run <code>wsl --shutdown</code> and restart docker again (a popup on windows 10 will ask you to do so).
|
||||
A permanent solution is either to host the docker container on a linux host or restart the wsl from time to time with the scheduler.</p>
|
||||
<p><code>bash
|
||||
taskkill /IM "Docker Desktop.exe" /F
|
||||
wsl --shutdown
|
||||
start "" "C:\Program Files\Docker\Docker\Docker Desktop.exe"</code></p>
|
||||
<div class="highlight"><pre><span></span><code>taskkill<span class="w"> </span>/IM<span class="w"> </span><span class="s2">"Docker Desktop.exe"</span><span class="w"> </span>/F
|
||||
wsl<span class="w"> </span>--shutdown
|
||||
start<span class="w"> </span><span class="s2">""</span><span class="w"> </span><span class="s2">"C:\Program Files\Docker\Docker\Docker Desktop.exe"</span>
|
||||
</code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user