Deployed 7e7e475 to develop in en with MkDocs 1.6.1 and mike 2.1.4

This commit is contained in:
github-actions[bot]
2026-03-31 05:20:03 +00:00
parent df495f4472
commit 970aa93176
44 changed files with 13314 additions and 6959 deletions
+161 -38
View File
@@ -1328,6 +1328,67 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#recommended-workflow" class="md-nav__link">
<span class="md-ellipsis">
Recommended workflow
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#example-utility-snippets" class="md-nav__link">
<span class="md-ellipsis">
Example utility snippets
</span>
</a>
<nav class="md-nav" aria-label="Example utility snippets">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#change-directory-to-root" class="md-nav__link">
<span class="md-ellipsis">
Change directory to root
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#load-multiple-configuration-files" class="md-nav__link">
<span class="md-ellipsis">
Load multiple configuration files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#further-data-analysis-documentation" class="md-nav__link">
<span class="md-ellipsis">
Further Data analysis documentation
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -1908,6 +1969,67 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#recommended-workflow" class="md-nav__link">
<span class="md-ellipsis">
Recommended workflow
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#example-utility-snippets" class="md-nav__link">
<span class="md-ellipsis">
Example utility snippets
</span>
</a>
<nav class="md-nav" aria-label="Example utility snippets">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#change-directory-to-root" class="md-nav__link">
<span class="md-ellipsis">
Change directory to root
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#load-multiple-configuration-files" class="md-nav__link">
<span class="md-ellipsis">
Load multiple configuration files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#further-data-analysis-documentation" class="md-nav__link">
<span class="md-ellipsis">
Further Data analysis documentation
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -1953,14 +2075,14 @@ Please use the link that's printed in the console after startup for simplified l
<p>Sometimes it can be desired to use a system-wide installation of Jupyter notebook, and use a jupyter kernel from the virtual environment.
This prevents you from installing the full jupyter suite multiple times per system, and provides an easy way to switch between tasks (freqtrade / other analytics tasks).</p>
<p>For this to work, first activate your virtual environment and run the following commands:</p>
<p>``` bash</p>
<h1 id="activate-virtual-environment">Activate virtual environment<a class="headerlink" href="#activate-virtual-environment" title="Permanent link">&para;</a></h1>
<p>source .venv/bin/activate</p>
<p>pip install ipykernel
ipython kernel install --user --name=freqtrade</p>
<h1 id="restart-jupyter-lab-notebook">Restart jupyter (lab / notebook)<a class="headerlink" href="#restart-jupyter-lab-notebook" title="Permanent link">&para;</a></h1>
<h1 id="select-kernel-freqtrade-in-the-notebook">select kernel "freqtrade" in the notebook<a class="headerlink" href="#select-kernel-freqtrade-in-the-notebook" title="Permanent link">&para;</a></h1>
<p>```</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Activate virtual environment</span>
<span class="nb">source</span><span class="w"> </span>.venv/bin/activate
pip<span class="w"> </span>install<span class="w"> </span>ipykernel
ipython<span class="w"> </span>kernel<span class="w"> </span>install<span class="w"> </span>--user<span class="w"> </span>--name<span class="o">=</span>freqtrade
<span class="c1"># Restart jupyter (lab / notebook)</span>
<span class="c1"># select kernel &quot;freqtrade&quot; in the notebook</span>
</code></pre></div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This section is provided for completeness, the Freqtrade Team won't provide full support for problems with this setup and will recommend to install Jupyter in the virtual environment directly, as that is the easiest way to get jupyter notebooks up and running. For help with this setup please refer to the <a href="https://jupyter.org/">Project Jupyter</a> <a href="https://jupyter.org/documentation">documentation</a> or <a href="https://jupyter.org/community">help channels</a>.</p>
@@ -2015,41 +2137,42 @@ ipython kernel install --user --name=freqtrade</p>
<h2 id="example-utility-snippets">Example utility snippets<a class="headerlink" href="#example-utility-snippets" title="Permanent link">&para;</a></h2>
<h3 id="change-directory-to-root">Change directory to root<a class="headerlink" href="#change-directory-to-root" title="Permanent link">&para;</a></h3>
<p>Jupyter notebooks execute from the notebook directory. The following snippet searches for the project root, so relative paths remain consistent.</p>
<p>```python
import os
from pathlib import Path</p>
<h1 id="change-directory">Change directory<a class="headerlink" href="#change-directory" title="Permanent link">&para;</a></h1>
<h1 id="modify-this-cell-to-insure-that-the-output-shows-the-correct-path">Modify this cell to insure that the output shows the correct path.<a class="headerlink" href="#modify-this-cell-to-insure-that-the-output-shows-the-correct-path" title="Permanent link">&para;</a></h1>
<h1 id="define-all-paths-relative-to-the-project-root-shown-in-the-cell-output">Define all paths relative to the project root shown in the cell output<a class="headerlink" href="#define-all-paths-relative-to-the-project-root-shown-in-the-cell-output" title="Permanent link">&para;</a></h1>
<p>project_root = "somedir/freqtrade"
i=0
try:
os.chdir(project_root)
assert Path('LICENSE').is_file()
except:
while i&lt;4 and (not Path('LICENSE').is_file()):
os.chdir(Path(Path.cwd(), '../'))
i+=1
project_root = Path.cwd()
print(Path.cwd())
```</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">pathlib</span><span class="w"> </span><span class="kn">import</span> <span class="n">Path</span>
<span class="c1"># Change directory</span>
<span class="c1"># Modify this cell to insure that the output shows the correct path.</span>
<span class="c1"># Define all paths relative to the project root shown in the cell output</span>
<span class="n">project_root</span> <span class="o">=</span> <span class="s2">&quot;somedir/freqtrade&quot;</span>
<span class="n">i</span><span class="o">=</span><span class="mi">0</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">project_root</span><span class="p">)</span>
<span class="k">assert</span> <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;LICENSE&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">is_file</span><span class="p">()</span>
<span class="k">except</span><span class="p">:</span>
<span class="k">while</span> <span class="n">i</span><span class="o">&lt;</span><span class="mi">4</span> <span class="ow">and</span> <span class="p">(</span><span class="ow">not</span> <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;LICENSE&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">is_file</span><span class="p">()):</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">Path</span><span class="p">(</span><span class="n">Path</span><span class="o">.</span><span class="n">cwd</span><span class="p">(),</span> <span class="s1">&#39;../&#39;</span><span class="p">))</span>
<span class="n">i</span><span class="o">+=</span><span class="mi">1</span>
<span class="n">project_root</span> <span class="o">=</span> <span class="n">Path</span><span class="o">.</span><span class="n">cwd</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="n">Path</span><span class="o">.</span><span class="n">cwd</span><span class="p">())</span>
</code></pre></div>
<h3 id="load-multiple-configuration-files">Load multiple configuration files<a class="headerlink" href="#load-multiple-configuration-files" title="Permanent link">&para;</a></h3>
<p>This option can be useful to inspect the results of passing in multiple configs.
This will also run through the whole Configuration initialization, so the configuration is completely initialized to be passed to other methods.</p>
<p>``` python
import json
from freqtrade.configuration import Configuration</p>
<h1 id="load-config-from-multiple-files">Load config from multiple files<a class="headerlink" href="#load-config-from-multiple-files" title="Permanent link">&para;</a></h1>
<p>config = Configuration.from_files(["config1.json", "config2.json"])</p>
<h1 id="show-the-config-in-memory">Show the config in memory<a class="headerlink" href="#show-the-config-in-memory" title="Permanent link">&para;</a></h1>
<p>print(json.dumps(config['original_config'], indent=2))
```</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">json</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">freqtrade.configuration</span><span class="w"> </span><span class="kn">import</span> <span class="n">Configuration</span>
<span class="c1"># Load config from multiple files</span>
<span class="n">config</span> <span class="o">=</span> <span class="n">Configuration</span><span class="o">.</span><span class="n">from_files</span><span class="p">([</span><span class="s2">&quot;config1.json&quot;</span><span class="p">,</span> <span class="s2">&quot;config2.json&quot;</span><span class="p">])</span>
<span class="c1"># Show the config in memory</span>
<span class="nb">print</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">config</span><span class="p">[</span><span class="s1">&#39;original_config&#39;</span><span class="p">],</span> <span class="n">indent</span><span class="o">=</span><span class="mi">2</span><span class="p">))</span>
</code></pre></div>
<p>For Interactive environments, have an additional configuration specifying <code>user_data_dir</code> and pass this in last, so you don't have to change directories while running the bot.
Best avoid relative paths, since this starts at the storage location of the jupyter notebook, unless the directory is changed.</p>
<p><code>json
{
"user_data_dir": "~/.freqtrade/"
}</code></p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;user_data_dir&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;~/.freqtrade/&quot;</span>
<span class="p">}</span>
</code></pre></div>
<h3 id="further-data-analysis-documentation">Further Data analysis documentation<a class="headerlink" href="#further-data-analysis-documentation" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="../strategy_analysis_example/">Strategy debugging</a> - also available as Jupyter notebook (<code>user_data/notebooks/strategy_analysis_example.ipynb</code>)</li>