Skip to content

Commit

Permalink
Deployed 6287e68 to main with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 6, 2025
1 parent 8693e31 commit 1a8d74a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions main/general-usage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
<h1 id="general-usage">General Usage<a class="headerlink" href="#general-usage" title="Permanent link">&para;</a></h1>
<p>After installation, technical can be imported and used in your code.</p>
<p>We recommend to import freqtrade.indicators as ftt to avoid conflicts with other libraries, and to help determining where indicator calculations came from.</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">technical.indicators</span> <span class="k">as</span> <span class="nn">ftt</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">technical.indicators</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">ftt</span>

<span class="c1"># The indicator calculations can now be used as follows:</span>

Expand All @@ -483,13 +483,13 @@ <h3 id="return-type">Return type<a class="headerlink" href="#return-type" title=
<h2 id="resample-to-interval">Resample to interval<a class="headerlink" href="#resample-to-interval" title="Permanent link">&para;</a></h2>
<p>The helper methods <code>resample_to_interval</code> and <code>resampled_merge</code> are used to resample a dataframe to a higher timeframe and merge the resampled dataframe back into the original dataframe.
This is an alternative approach to using informative pairs and reduces the amount of data needed from the exchange (you don't need to download 4h candles in the below example).</p>
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">pandas</span> <span class="kn">import</span> <span class="n">DataFrame</span>
<span class="kn">from</span> <span class="nn">technical.util</span> <span class="kn">import</span> <span class="n">resample_to_interval</span><span class="p">,</span> <span class="n">resampled_merge</span>
<span class="kn">import</span> <span class="nn">technical.indicators</span> <span class="k">as</span> <span class="nn">ftt</span>
<div class="highlight"><pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">pandas</span><span class="w"> </span><span class="kn">import</span> <span class="n">DataFrame</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">technical.util</span><span class="w"> </span><span class="kn">import</span> <span class="n">resample_to_interval</span><span class="p">,</span> <span class="n">resampled_merge</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">technical.indicators</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">ftt</span>

<span class="n">timeframe</span> <span class="o">=</span> <span class="s1">&#39;1h&#39;</span>

<span class="k">def</span> <span class="nf">populate_indicators</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataframe</span><span class="p">:</span> <span class="n">DataFrame</span><span class="p">,</span> <span class="n">metadata</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">DataFrame</span><span class="p">:</span>
<span class="k">def</span><span class="w"> </span><span class="nf">populate_indicators</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataframe</span><span class="p">:</span> <span class="n">DataFrame</span><span class="p">,</span> <span class="n">metadata</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">DataFrame</span><span class="p">:</span>

<span class="c1"># Resampling to 4h:</span>
<span class="n">dataframe_long</span> <span class="o">=</span> <span class="n">resample_to_interval</span><span class="p">(</span><span class="n">dataframe</span><span class="p">,</span> <span class="mi">240</span><span class="p">)</span> <span class="c1"># 240 = 4 * 60 = 4h</span>
Expand Down
4 changes: 2 additions & 2 deletions main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ <h3 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">&
<div class="highlight"><pre><span></span><code>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/freqtrade/technical
</code></pre></div>
<p>and then import the required packages</p>
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">technical.indicators</span> <span class="kn">import</span> <span class="n">accumulation_distribution</span><span class="p">,</span> <span class="o">...</span>
<span class="kn">from</span> <span class="nn">technical.util</span> <span class="kn">import</span> <span class="n">resample_to_interval</span><span class="p">,</span> <span class="n">resampled_merge</span>
<div class="highlight"><pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">technical.indicators</span><span class="w"> </span><span class="kn">import</span> <span class="n">accumulation_distribution</span><span class="p">,</span> <span class="o">...</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">technical.util</span><span class="w"> </span><span class="kn">import</span> <span class="n">resample_to_interval</span><span class="p">,</span> <span class="n">resampled_merge</span>

<span class="c1"># Assuming 1h dataframe -resampling to 4h:</span>
<span class="n">dataframe_long</span> <span class="o">=</span> <span class="n">resample_to_interval</span><span class="p">(</span><span class="n">dataframe</span><span class="p">,</span> <span class="mi">240</span><span class="p">)</span> <span class="c1"># 240 = 4 * 60 = 4h</span>
Expand Down
6 changes: 3 additions & 3 deletions main/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://technical.freqtrade.io/main/</loc>
<lastmod>2025-01-02</lastmod>
<lastmod>2025-01-06</lastmod>
</url>
<url>
<loc>https://technical.freqtrade.io/main/developer/</loc>
<lastmod>2025-01-02</lastmod>
<lastmod>2025-01-06</lastmod>
</url>
<url>
<loc>https://technical.freqtrade.io/main/general-usage/</loc>
<lastmod>2025-01-02</lastmod>
<lastmod>2025-01-06</lastmod>
</url>
</urlset>
Binary file modified main/sitemap.xml.gz
Binary file not shown.

0 comments on commit 1a8d74a

Please sign in to comment.