A dynamic Single-Timeframe liquidity sweep indicator is built in MQL5 to detect stop-hunt style moves without relying on fixed time windows or simple wick checks. It targets buy-side and sell-side liquidity around swing highs/lows and ranges, where clustered orders often sit.
Detection combines wick-sweep rejection with a dual-candle model: a breach followed by a reclaim candle that must form an engulfing pattern. Wick-ratio validation filters weak probes, while βone sweep per levelβ plus post-violation invalidation reduces duplicates and stale signals.
Implementation focuses on robust state management: a struct for sweep candidates, arrays for swept/violated levels, swing scanning via configurable left-right bars, new-candle execution to cut load, and chart objects for clear visualization.
π Read | NeuroBook | @mql5dev
Detection combines wick-sweep rejection with a dual-candle model: a breach followed by a reclaim candle that must form an engulfing pattern. Wick-ratio validation filters weak probes, while βone sweep per levelβ plus post-violation invalidation reduces duplicates and stale signals.
Implementation focuses on robust state management: a struct for sweep candidates, arrays for swept/violated levels, swing scanning via configurable left-right bars, new-candle execution to cut load, and chart objects for clear visualization.
π Read | NeuroBook | @mql5dev
β€19π4π2
CMA-ES remains a practical choice for tuning trading robot parameters on ill-conditioned objective functions. Core sampling follows x_k ~ N(m, ΟΒ²C), where m is the current mean, Ο is global step size, and C captures local geometry via covariance adaptation.
A variant replaces the Gaussian with a power distribution: x_k ~ PowerDist(m, ΟΒ²C). This increases tail probability for larger jumps while keeping covariance learning and step-size control.
Key mechanics include two evolutionary paths (pc for covariance, ps for step size), plus rank-one and rank-ΞΌ covariance updates driven by maximum-likelihood estimation. A Heaviside-style hsig gate reduces rank-one influence during stagnation.
Implementation notes: O(nΒ²) memory for C and O(nΒ³) eigendecomposition for B,D, with periodic eigen updates. Class design separates Init, Moving (offspring generation via B*D*z), an...
π Read | Signals | @mql5dev
A variant replaces the Gaussian with a power distribution: x_k ~ PowerDist(m, ΟΒ²C). This increases tail probability for larger jumps while keeping covariance learning and step-size control.
Key mechanics include two evolutionary paths (pc for covariance, ps for step size), plus rank-one and rank-ΞΌ covariance updates driven by maximum-likelihood estimation. A Heaviside-style hsig gate reduces rank-one influence during stagnation.
Implementation notes: O(nΒ²) memory for C and O(nΒ³) eigendecomposition for B,D, with periodic eigen updates. Class design separates Init, Moving (offspring generation via B*D*z), an...
π Read | Signals | @mql5dev
β€22π5β‘2π2
Media is too big
VIEW IN TELEGRAM
Chart trading in MetaTrader 5 for iOS has been completely redesigned. You now have access to a full-featured trading dialog that combines quick operations, detailed order configuration, and position management.
The trading panel opens directly over the chart and supports multiple modes. In compact mode, it provides quick actions such as switching trade operation types, managing volume, and setting stop levels. The expanded view offers advanced trading parameters and a tick chart for precise price control.
The new chart trading experience in MetaTrader 5 for iOS makes order management faster, more intuitive, and more precise β from instant operations to advanced risk management.
Discuss the video:
π MQL5.community for traders
π MetaQuotes official YouTube channel
The trading panel opens directly over the chart and supports multiple modes. In compact mode, it provides quick actions such as switching trade operation types, managing volume, and setting stop levels. The expanded view offers advanced trading parameters and a tick chart for precise price control.
The new chart trading experience in MetaTrader 5 for iOS makes order management faster, more intuitive, and more precise β from instant operations to advanced risk management.
Discuss the video:
π MQL5.community for traders
π MetaQuotes official YouTube channel
β€31π10π2π2β‘1
Triple-barrier labeling often hard-codes min_ret (0.5β1.0%) or assumes a legacy spread. If min_ret is below true round-trip cost, the pipeline labels cost-driven noise as signal. The resulting dataset inflates apparent edge, and models fit the labeling artifact instead of market structure.
TransactionCostCollector.mq5 automates transaction-cost collection per symbol. It samples historical spread via CopySpread() over a configurable bar window, reads swap rates and swap mode (plus triple-swap weekday), and captures commission diagnostics where direct per-lot commission is not available. Output is a structured CSV with sections for symbol properties, swap, commission notes, spread summary percentiles, and spread-by-hour means (UTC) to surface session effects.
A companion Python class TransactionCostModel converts costs to fractional returns and compu...
π Read | Signals | @mql5dev
TransactionCostCollector.mq5 automates transaction-cost collection per symbol. It samples historical spread via CopySpread() over a configurable bar window, reads swap rates and swap mode (plus triple-swap weekday), and captures commission diagnostics where direct per-lot commission is not available. Output is a structured CSV with sections for symbol properties, swap, commission notes, spread summary percentiles, and spread-by-hour means (UTC) to surface session effects.
A companion Python class TransactionCostModel converts costs to fractional returns and compu...
π Read | Signals | @mql5dev
β€19π5π2
RSI breaks down in strong trends because it keeps firing mean-reversion entries when βoversoldβ is structural, not temporary. On EURUSD H1, the 2022 downtrend turned repeated oversold crossovers into compounding losses and deep drawdown.
The article applies LΓ³pez de Pradoβs meta-labeling: RSI stays as the side selector, while a Random Forest judges each signal using 27 context features at the signal bar. Trades are labeled with triple-barrier outcomes, filtered by a probability threshold, then sized proportionally to model confidence.
Key engineering details: trend/volatility context (ADX, ATR, stretch vs EMA50, distance to recent highs/lows) plus robust time encoding (sin/cos cycles and session volatility). Walk-forward is strict MT5 data with real spread costs.
Even with below-chance classifier accuracy, filtering slashes exposure and drawdown; co...
π Read | Docs | @mql5dev
The article applies LΓ³pez de Pradoβs meta-labeling: RSI stays as the side selector, while a Random Forest judges each signal using 27 context features at the signal bar. Trades are labeled with triple-barrier outcomes, filtered by a probability threshold, then sized proportionally to model confidence.
Key engineering details: trend/volatility context (ADX, ATR, stretch vs EMA50, distance to recent highs/lows) plus robust time encoding (sin/cos cycles and session volatility). Walk-forward is strict MT5 data with real spread costs.
Even with below-chance classifier accuracy, filtering slashes exposure and drawdown; co...
π Read | Docs | @mql5dev
π13β€8π3
Joint Recurrence Quantification Analysis (JRQA) extends RQA/CRQA by measuring synchronized recurrence. A joint recurrence at (i,j) requires X(i) close to X(j) and Y(i) close to Y(j) with aligned indices, producing a square symmetric matrix with a defined main diagonal.
The implementation adds CJRQAMatrix, CJRQAMetrics, and CJRQAWindow plus a CJRQA facade. CJRQAWindow runs rolling JRQA with OpenCL GPU acceleration and CPU fallback, and an indicator plots JRR, JDET, JLAM, JENTR, and JTREND in real time.
JRQA uses separate epsilons per series, or a shared epsilon after normalization. Key signals are JRR for simultaneous recurrence density, JDET for structured coupling, and JTREND for changes in synchronization over time.
π Read | Signals | @mql5dev
The implementation adds CJRQAMatrix, CJRQAMetrics, and CJRQAWindow plus a CJRQA facade. CJRQAWindow runs rolling JRQA with OpenCL GPU acceleration and CPU fallback, and an indicator plots JRR, JDET, JLAM, JENTR, and JTREND in real time.
JRQA uses separate epsilons per series, or a shared epsilon after normalization. Key signals are JRR for simultaneous recurrence density, JDET for structured coupling, and JTREND for changes in synchronization over time.
π Read | Signals | @mql5dev
β€16π4π2π1
MetaTrader 5 EAs often keep critical trade logic only in runtime memory, so a VPS restart or terminal crash can erase virtual SL/TP, breakeven, trailing progress, and sync context while the broker-side position remains open.
The solution is a persistent trade-state architecture: continuously serialize the EAβs operational state into a local SQLite database, then rebuild the in-memory model on startup to restore continuity.
This part designs the foundation: an STradeState recovery model, EA lifecycle states (starting, recovering, running, safe mode), timer-driven background checks independent of ticks, and a database layer that opens/creates the DB, ensures a TradeState table exists, and safely closes the connection.
π Read | Quotes | @mql5dev
The solution is a persistent trade-state architecture: continuously serialize the EAβs operational state into a local SQLite database, then rebuild the in-memory model on startup to restore continuity.
This part designs the foundation: an STradeState recovery model, EA lifecycle states (starting, recovering, running, safe mode), timer-driven background checks independent of ticks, and a database layer that opens/creates the DB, ensures a TradeState table exists, and safely closes the connection.
π Read | Quotes | @mql5dev
β€16π6
This article builds a practical pipeline for detecting self-similar (fractal/multifractal) structures in price series and turning them into tradable ML signals, using Python with deployment to MetaTrader 5 via ONNX.
Patterns are found by sliding a window across history and measuring Pearson correlation between the left half and a mirrored, sign-inverted right half to capture symmetry. Numba JIT accelerates the heavy loop, returning the best correlation and its window size per bar, with plotting tools to sanity-check top matches across multiple scales.
Trades are labeled from future outcomes only when correlation exceeds a threshold: high-symmetry segments get averaged buy/sell labels, while low-symmetry areas default to βno tradeβ. Two classifiers are trained: one for direction (buy vs sell) and a meta-model for participation. Tests on EURUSD H1 show str...
π Read | AppStore | @mql5dev
Patterns are found by sliding a window across history and measuring Pearson correlation between the left half and a mirrored, sign-inverted right half to capture symmetry. Numba JIT accelerates the heavy loop, returning the best correlation and its window size per bar, with plotting tools to sanity-check top matches across multiple scales.
Trades are labeled from future outcomes only when correlation exceeds a threshold: high-symmetry segments get averaged buy/sell labels, while low-symmetry areas default to βno tradeβ. Two classifiers are trained: one for direction (buy vs sell) and a meta-model for participation. Tests on EURUSD H1 show str...
π Read | AppStore | @mql5dev
π11β€8β‘3
Grey modeling (Deng Julong, 1982) is a time-series method designed for incomplete or noisy data. In trading use-cases it applies cumulative summation to convert non-stationary prices into a strictly increasing βgrey seriesβ, reducing short-term noise as the window grows.
A common setup is GM(1,1): fit a linear relationship on the grey series, often with a TheilβSen slope. Unlike SMA, results depend on price order, so trend direction impacts the estimate. Extensions include quadratic and power-law fits, enabling alternative moving averages and fast-reacting signals.
Derived indicators include Grey MA, Grey CCI (using a GM-based dispersion proxy), and Grey Bands. Example EAs use price-vs-indicator divergence, dual-Grey MA comparisons, and Grey CCI level/zero-cross rules, with parameter tuning required under volatility and regime shifts.
π Read | Quotes | @mql5dev
A common setup is GM(1,1): fit a linear relationship on the grey series, often with a TheilβSen slope. Unlike SMA, results depend on price order, so trend direction impacts the estimate. Extensions include quadratic and power-law fits, enabling alternative moving averages and fast-reacting signals.
Derived indicators include Grey MA, Grey CCI (using a GM-based dispersion proxy), and Grey Bands. Example EAs use price-vs-indicator divergence, dual-Grey MA comparisons, and Grey CCI level/zero-cross rules, with parameter tuning required under volatility and regime shifts.
π Read | Quotes | @mql5dev
β€24π11πΎ4
Runs bars complete the AFML Chapter 1 bar set by capturing dominant-side activity rather than net order-flow. Unlike imbalance bars that close on a signed cumulative threshold, runs bars track buy and sell contributions separately and close when the larger side exceeds its target, making them robust to choppy, alternating flow where net imbalance stays near zero.
Python extends make_bars() with tick/volume/dollar runs bars using the same tick rule and aggregation pipeline; only the boundary detector changes, expanding state to buy/sell accumulators plus per-side EWM expectations. Calibration also splits into separate buy and sell initial estimates to avoid biased thresholds.
MQL5 adds CRunsBar with tick-by-tick logic, parity-checked against Python on identical tick streams. Persistence is tightened by storing extra accumulators and the tick-ruleβs ...
π Read | Docs | @mql5dev
Python extends make_bars() with tick/volume/dollar runs bars using the same tick rule and aggregation pipeline; only the boundary detector changes, expanding state to buy/sell accumulators plus per-side EWM expectations. Calibration also splits into separate buy and sell initial estimates to avoid biased thresholds.
MQL5 adds CRunsBar with tick-by-tick logic, parity-checked against Python on identical tick streams. Persistence is tightened by storing extra accumulators and the tick-ruleβs ...
π Read | Docs | @mql5dev
β€20π11π2
MetaTrader 5 chart panels can host self-contained documentation rendered directly in-terminal, without external files. A canvas-based engine built on CCanvas supports tabs, scrollable rich text, inline images, theming, and supersampled anti-aliased UI elements.
Implementation details include embedding bitmaps via #resource, defining paragraph types, and parsing inline markup into styled runs. Rendering uses a two-pass alpha reconstruction method to preserve glyph transparency on any background, then blends via Porter-Duff over.
Images are loaded from resources, scaled with bicubic interpolation, and cached per panel width. Paragraphs are wrapped into encoded display lines with helpers to decode type, indent, and image slots during paint and scroll.
π Read | Quotes | @mql5dev
Implementation details include embedding bitmaps via #resource, defining paragraph types, and parsing inline markup into styled runs. Rendering uses a two-pass alpha reconstruction method to preserve glyph transparency on any background, then blends via Porter-Duff over.
Images are loaded from resources, scaled with bicubic interpolation, and cached per panel width. Paragraphs are wrapped into encoded display lines with helpers to decode type, indent, and image slots during paint and scroll.
π Read | Quotes | @mql5dev
π13β€10π2
A script for MT5 audits tick-value properties across every symbol in Market Watch: SYMBOL_TRADE_TICK_VALUE, SYMBOL_TRADE_TICK_VALUE_LOSS, and SYMBOL_TRADE_TICK_VALUE_PROFIT.
This matters for EAs that size positions from tick value. On many brokers, especially with cross-currency pairs, LOSS and PROFIT can differ. Using LOSS yields a conservative risk estimate and smaller lots. Using the generic tick value often matches PROFIT, producing slightly larger positions than intended.
Workflow: add symbols to Market Watch, run the script on any chart, and read the summary in the Experts tab. Optional CSV export writes full per-symbol results to MQL5/Files/ to avoid log line limits.
Symbols are classified as ALL_EQUAL, TV_MATCHES_PROFIT, TV_MATCHES_LOSS, or ALL_DIFFER, followed by an aggregate count per category.
π Read | Quotes | @mql5dev
This matters for EAs that size positions from tick value. On many brokers, especially with cross-currency pairs, LOSS and PROFIT can differ. Using LOSS yields a conservative risk estimate and smaller lots. Using the generic tick value often matches PROFIT, producing slightly larger positions than intended.
Workflow: add symbols to Market Watch, run the script on any chart, and read the summary in the Experts tab. Optional CSV export writes full per-symbol results to MQL5/Files/ to avoid log line limits.
Symbols are classified as ALL_EQUAL, TV_MATCHES_PROFIT, TV_MATCHES_LOSS, or ALL_DIFFER, followed by an aggregate count per category.
π Read | Quotes | @mql5dev
β€21π4
Utility script sets Stop Loss on all open positions using a per-position maximum loss defined in the account deposit currency (for example, 50 units). The calculation works across any forex symbol and deposit currency by using SYMBOL_TRADE_TICK_VALUE_LOSS for automatic conversion.
For each position, the script derives an SL price that targets the configured loss if hit, then validates broker stop and freeze levels before sending a modification request. Positions are skipped when the existing SL is already within one tick of the target.
If market movement makes the computed SL invalid under broker constraints, the script leaves the position unchanged and logs a specific reason for the rejection, enabling quick diagnosis of unmodifiable trades.
π Read | CodeBase | @mql5dev
For each position, the script derives an SL price that targets the configured loss if hit, then validates broker stop and freeze levels before sending a modification request. Positions are skipped when the existing SL is already within one tick of the target.
If market movement makes the computed SL invalid under broker constraints, the script leaves the position unchanged and logs a specific reason for the rejection, enabling quick diagnosis of unmodifiable trades.
π Read | CodeBase | @mql5dev
β€15π9π1
This installment tackles a recurring issue in an MQL5 volatility library ported from Pythonβs ARCH: identical data and starting values produced noticeably different GARCH-family parameters in MetaTrader 5. Log-likelihood verification with fixed Python parameters showed the MQL5 objective was correct, narrowing the mismatch to the optimizerβs behavior rather than model math.
To improve cross-platform parity, the library replaces ALGLIBβs minNLC (penalty/interior-point style) with SLSQP, matching ARCHβs approach. SLSQP solves a sequence of quadratic subproblems, enforces constraints via an active-set method, and targets KKT satisfactionβuseful for variance non-negativity and stationarity constraints that must be respected tightly.
An MQL5-native SLSQP (Fortran Kraft port) is integrated via CSLSQP, adding constraint abstractions, optional variable clippi...
π Read | VPS | @mql5dev
To improve cross-platform parity, the library replaces ALGLIBβs minNLC (penalty/interior-point style) with SLSQP, matching ARCHβs approach. SLSQP solves a sequence of quadratic subproblems, enforces constraints via an active-set method, and targets KKT satisfactionβuseful for variance non-negativity and stationarity constraints that must be respected tightly.
An MQL5-native SLSQP (Fortran Kraft port) is integrated via CSLSQP, adding constraint abstractions, optional variable clippi...
π Read | VPS | @mql5dev
β€14π11
MMAR research in Python has covered data loading, partition scaling, Hurst extraction, spectrum fitting, cascade construction, fBM generation, Monte Carlo tests, and benchmarking versus GARCH, with MMAR showing stronger results.
Operational use in MetaTrader 5 requires a native MQL5 implementation. The current focus is a dependency-free library that reacts per tick and integrates with Strategy Tester without bridge processes or IPC latency.
Work starts with the Partition Analysis engine in MQL5. It computes S_q(dt) across log-spaced time scales and a q-grid, runs OLS on log-log fits to obtain tau(q), estimates H via tau(q)=0 with GHE as fallback, and applies diagnostics to confirm multifractality from scaling quality and curve shape.
π Read | Quotes | @mql5dev
Operational use in MetaTrader 5 requires a native MQL5 implementation. The current focus is a dependency-free library that reacts per tick and integrates with Strategy Tester without bridge processes or IPC latency.
Work starts with the Partition Analysis engine in MQL5. It computes S_q(dt) across log-spaced time scales and a q-grid, runs OLS on log-log fits to obtain tau(q), estimates H via tau(q)=0 with GHE as fallback, and applies diagnostics to confirm multifractality from scaling quality and curve shape.
π Read | Quotes | @mql5dev
β€15π10π₯4
Candlestick patterns can be treated as ordered strings once each candle is encoded into a finite alphabet (e.g., bullish βAHEGDβ, bearish βahegdβ). This converts price-action pattern search into a permutation problem that can be exhaustively counted and generated in MQL5.
Two cases are covered: permutations without repetition, computed as P(n,r)=n!/(n-r)! (or efficiently via a descending product), and permutations with repetition, computed as n^r. The article shows how quickly the search space grows as r increases, making manual pattern discovery unrealistic.
An MQL5 utility is built in two parts: a calculator that validates inputs and reports counts, and generators that output all sequences as string arrays. The generators use recursive backtracking, with a βusedβ mask for no-repetition and free reuse for repetition, enabling systematic backtests ...
π Read | AppStore | @mql5dev
Two cases are covered: permutations without repetition, computed as P(n,r)=n!/(n-r)! (or efficiently via a descending product), and permutations with repetition, computed as n^r. The article shows how quickly the search space grows as r increases, making manual pattern discovery unrealistic.
An MQL5 utility is built in two parts: a calculator that validates inputs and reports counts, and generators that output all sequences as string arrays. The generators use recursive backtracking, with a βusedβ mask for no-repetition and free reuse for repetition, enabling systematic backtests ...
π Read | AppStore | @mql5dev
β€25π15π3
Two recent TASC articles (July and August 2021) described Moving Average Bands and Band Width as trend-following tools. The method tracks a shorter-term moving average relative to a longer-term moving average, rendering bands that help quantify directional bias and consolidation versus expansion.
An updated implementation keeps the original logic but adds one practical parameter: the input price can be selected instead of being fixed to Close. This allows testing against Open, High, Low, Median, Typical, or Weighted prices depending on the market and timeframe.
Operationally, the bands can be interpreted in a similar manner to Bollinger Bands, with band expansion and contraction used to gauge volatility regime changes while maintaining a moving-average trend framework.
π Read | Forum | @mql5dev
An updated implementation keeps the original logic but adds one practical parameter: the input price can be selected instead of being fixed to Close. This allows testing against Open, High, Low, Median, Typical, or Weighted prices depending on the market and timeframe.
Operationally, the bands can be interpreted in a similar manner to Bollinger Bands, with band expansion and contraction used to gauge volatility regime changes while maintaining a moving-average trend framework.
π Read | Forum | @mql5dev
β€13π12
A two-part MQL5 series outlines a framework for portable, reusable, maintainable indicators, starting from a minimal applied-price line and refactoring into a template.
The first section formalizes incremental recalculation using rates_total and prev_calculated, then hardens OnCalculate for Strategy Tester batching via tester_everytick_calculate and edge cases like rates_total=1.
The next steps move logic into .mqh headers and OOP modules. Applied price becomes a CAppliedPrice sub-indicator with its own buffer and onCalculate, reducing coupling.
Global state is removed by introducing a root CIndicator object. Input handling is isolated using a params object pattern with a base class in headers and a derived class near the input variables to avoid leaking inputs into core modules.
π Read | Signals | @mql5dev
The first section formalizes incremental recalculation using rates_total and prev_calculated, then hardens OnCalculate for Strategy Tester batching via tester_everytick_calculate and edge cases like rates_total=1.
The next steps move logic into .mqh headers and OOP modules. Applied price becomes a CAppliedPrice sub-indicator with its own buffer and onCalculate, reducing coupling.
Global state is removed by introducing a root CIndicator object. Input handling is isolated using a params object pattern with a base class in headers and a derived class near the input variables to avoid leaking inputs into core modules.
π Read | Signals | @mql5dev
β€22π5π4π₯1
Repeated trade utilities remain a common source of bugs and inconsistent behavior across MQL5 EAs. Centralizing them into include modules reduces duplication and makes maintenance and reviews more predictable.
A reusable positions layer typically covers position existence checks and counters with optional filters (symbol, magic, type, ticket), plus bulk close helpers including profitable/losing filters. Additional utilities return the newest or oldest position by open time for grid, pyramiding, and time-based logic.
A companion orders module mirrors the same patterns for pending orders: exists, count, recent/oldest selection, and cancel routines. Positions and orders stay separate to match MT5βs object model and execution differences.
A minimal SMA(10/20) crossover reversal EA demonstrates cleaner strategy code by delegating selection, counting, and clo...
π Read | CodeBase | @mql5dev
A reusable positions layer typically covers position existence checks and counters with optional filters (symbol, magic, type, ticket), plus bulk close helpers including profitable/losing filters. Additional utilities return the newest or oldest position by open time for grid, pyramiding, and time-based logic.
A companion orders module mirrors the same patterns for pending orders: exists, count, recent/oldest selection, and cancel routines. Positions and orders stay separate to match MT5βs object model and execution differences.
A minimal SMA(10/20) crossover reversal EA demonstrates cleaner strategy code by delegating selection, counting, and clo...
π Read | CodeBase | @mql5dev
β€23π6π3π2π2
Multi-symbol entry logic in MQL5 often ends up in hard-coded multidimensional arrays, with limited relational state management and increasing maintenance risk as strategies scale.
A proposed alternative is a Wizard-integrated signal class, CSignalBTreeBayesian, combining SQLite-style B-Tree indexing with a Bayesian neural network uncertainty filter. Parameters exposed to Wizard: BTreeMode (1β4), UseBayesian, MaxUncertainty.
BTreeMode supports direct lookup, range scan, depth discrepancy search, or a hybrid. The BNN runs repeatable Monte Carlo passes per bar (seeded by timestamp) to produce mean and variance, rejecting trades when variance exceeds MaxUncertainty. This shifts signals from deterministic execution toward confidence-gated execution in noisy regimes.
π Read | Quotes | @mql5dev
A proposed alternative is a Wizard-integrated signal class, CSignalBTreeBayesian, combining SQLite-style B-Tree indexing with a Bayesian neural network uncertainty filter. Parameters exposed to Wizard: BTreeMode (1β4), UseBayesian, MaxUncertainty.
BTreeMode supports direct lookup, range scan, depth discrepancy search, or a hybrid. The BNN runs repeatable Monte Carlo passes per bar (seeded by timestamp) to produce mean and variance, rejecting trades when variance exceeds MaxUncertainty. This shifts signals from deterministic execution toward confidence-gated execution in noisy regimes.
π Read | Quotes | @mql5dev
β€24π11π2
This article connects AFML-style bet sizing to a safe pyramiding engine in MetaTrader 5 by inserting a small adapter layer, CPyramidBridge. The sizing module decides risk as a signed bet_size in [-1, 1]; the pyramid engine decides how to express that risk as multiple entries with strictly decreasing lots and a single stop that advances so total risk drops after each add-on.
Five integration points replace hardcoded engine parameters with live sizing outputs: probability-calibrated initial/add-on lots (with floor-to-step logic and trade skipping when ratios collapse), a budget-based entry gate using concurrent signal occupancy, a forecast-driven add-on trigger using BetSizeDynamic, a reserve-based adaptive trailing stop using EF3M CDF, and synchronization of the sizing signal arrays when the pyramid closes to prevent concurrency overcounts.
Implementation...
π Read | AlgoBook | @mql5dev
Five integration points replace hardcoded engine parameters with live sizing outputs: probability-calibrated initial/add-on lots (with floor-to-step logic and trade skipping when ratios collapse), a budget-based entry gate using concurrent signal occupancy, a forecast-driven add-on trigger using BetSizeDynamic, a reserve-based adaptive trailing stop using EF3M CDF, and synchronization of the sizing signal arrays when the pyramid closes to prevent concurrency overcounts.
Implementation...
π Read | AlgoBook | @mql5dev
β€28π7