This commit is contained in:
dceoy
2026-06-18 16:03:06 +00:00
parent e7c6c0b25f
commit a70021a72e
6 changed files with 1940 additions and 1226 deletions
+8
View File
@@ -271,6 +271,10 @@ timestamp normalization in downstream apps.</p>
<td>Single connected client: fetch <code>count + 1</code>, drop forming bar</td>
</tr>
<tr>
<td><code>fetch_latest_closed_rates_for_trading_client</code></td>
<td>Closed bars from an active <code>Mt5TradingClient</code> session</td>
</tr>
<tr>
<td><code>collect_latest_closed_rates_for_accounts</code></td>
<td>Multi-account closed bars with optional retry wrapper</td>
</tr>
@@ -364,6 +368,10 @@ strategy entries, exits, Kelly sizing, or signal logic.</p>
<td>Margin budget and volume sizing</td>
</tr>
<tr>
<td><code>normalize_order_volume</code>, <code>estimate_order_margin</code>, <code>calculate_positions_margin</code></td>
<td>Broker volume normalization and margin totals</td>
</tr>
<tr>
<td><code>determine_order_limits</code></td>
<td>SL/TP price levels from ratios</td>
</tr>
+4 -3
View File
@@ -8217,9 +8217,10 @@ failure is re-raised once <code>retry_count</code> is exhausted.</p>
</code></pre></div>
<h3 id="latest-closed-rate-bars">Latest closed rate bars<a class="headerlink" href="#latest-closed-rate-bars" title="Permanent link">&para;</a></h3>
<p>MetaTrader 5 <code>start_pos=0</code> includes the still-forming current bar as the last
row. <code>fetch_latest_closed_rates()</code> handles one connected client; multi-account
helpers fetch <code>count + 1</code> bars, drop that row with <code>drop_forming_rate_bar()</code>,
and validate each series is non-empty. Returned frames are ordered
row. <code>fetch_latest_closed_rates()</code> handles one connected <code>Mt5CliClient</code>; use
<code>fetch_latest_closed_rates_for_trading_client()</code> from an active
<code>Mt5TradingClient</code> session. Multi-account helpers fetch <code>count + 1</code> bars, drop
that row with <code>drop_forming_rate_bar()</code>, and validate each series is non-empty. Returned frames are ordered
oldest-to-newest and may contain fewer than <code>count</code> rows only when MT5 returns
fewer closed bars.</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">mt5cli</span><span class="w"> </span><span class="kn">import</span> <span class="p">(</span>
+1926 -1221
View File
File diff suppressed because it is too large Load Diff