Archimedes Optimization Algorithm (AOA), proposed in 2021, models each candidate as a position plus density, volume, and acceleration. Convergence is framed as reaching a zero-net-force state, with exploration and exploitation emerging from the same update loop.
State is initialized with X in bounds, den/vol in [0,1], and acc in bounds. Each iteration pulls den and vol toward the current best via a shared random convex update, keeping values stable and bounded.
A transfer factor TF grows toward 1, while a decreasing factor d shrinks step scales. Acceleration switches between a random neighbor (collision phase) and the global best (no-collision phase), then gets normalized to [0.1, 1.0] as a per-agent step regulator.
Position updates move toward a random peer early and around the leader later, with a sign switch to reduce premature collapse. Greedy accepta...
👉 Read | AppStore | @mql5dev
State is initialized with X in bounds, den/vol in [0,1], and acc in bounds. Each iteration pulls den and vol toward the current best via a shared random convex update, keeping values stable and bounded.
A transfer factor TF grows toward 1, while a decreasing factor d shrinks step scales. Acceleration switches between a random neighbor (collision phase) and the global best (no-collision phase), then gets normalized to [0.1, 1.0] as a per-agent step regulator.
Position updates move toward a random peer early and around the leader later, with a sign switch to reduce premature collapse. Greedy accepta...
👉 Read | AppStore | @mql5dev
❤9🤩6👍2
Risk metrics in MT5 often hide a modelling choice: a rolling lookback is just a probability vector that weights recent bars equally and older bars as exactly zero. That can underprice regime shifts (e.g., pre‑March 2020 calm), exclude known upcoming risk, and makes old crises impossible to “reconsider” because their weight is forced to zero.
Entropy pooling keeps the full historical scenario set intact and reassigns probabilities by minimizing relative entropy to a prior (typically time‑decay), while enforcing explicit constraints: state conditioning (today’s volatility regime), higher USDJPY volatility, minimum tail risk for CHF shocks, or capped cross‑pair correlation. The solution is an exponential tilt solved in the low‑dimensional dual, so thousands of bars reduce to a handful of multipliers.
The article delivers a pure MQL5 library (solver, view types...
👉 Read | Calendar | @mql5dev
Entropy pooling keeps the full historical scenario set intact and reassigns probabilities by minimizing relative entropy to a prior (typically time‑decay), while enforcing explicit constraints: state conditioning (today’s volatility regime), higher USDJPY volatility, minimum tail risk for CHF shocks, or capped cross‑pair correlation. The solution is an exponential tilt solved in the low‑dimensional dual, so thousands of bars reduce to a handful of multipliers.
The article delivers a pure MQL5 library (solver, view types...
👉 Read | Calendar | @mql5dev
❤12👍6🤩4🔥1
Most MT5 EAs drift because filters get added without knowing how the strategy actually behaves. This article proposes building a non-trading “evidence logger” for a Range Breakout: it follows the original rules, measures every component, and exports a CSV for structured analysis with the MT5 AI Assistant.
The logger separates what’s knowable at entry (range + breakout-candle features) from what’s only knowable later (retests, excursion, outcomes), preventing accidental lookahead. It handles session windows (including midnight wrap), freezes range context (ATR, prior-day/session levels), records accurate entry price for close vs wick triggers, then tracks 24 bars with a state-machine retest model and strict first-touch outcome labels plus ambiguity flags.
A Tokyo M15 run on GBPUSD logged 419 events; a 10% systematic sample showed false breakouts exceeding wi...
👉 Read | Docs | @mql5dev
The logger separates what’s knowable at entry (range + breakout-candle features) from what’s only knowable later (retests, excursion, outcomes), preventing accidental lookahead. It handles session windows (including midnight wrap), freezes range context (ATR, prior-day/session levels), records accurate entry price for close vs wick triggers, then tracks 24 bars with a state-machine retest model and strict first-touch outcome labels plus ambiguity flags.
A Tokyo M15 run on GBPUSD logged 419 events; a 10% systematic sample showed false breakouts exceeding wi...
👉 Read | Docs | @mql5dev
👍11🔥7❤6🤩3
ACA (Andean Condor Algorithm, 2018/2019) was evaluated as a two-phase metaheuristic for rugged, multimodal objective landscapes typical in EA parameter tuning. Reproducibility is a key issue: core control logic is split across papers, requiring reconstruction before benchmarking.
Each iteration ranks the population by fitness. A DP threshold assigns top-ranked agents to intensification and the rest to exploration, then a PC probability can flip statuses to reduce early lock-in. Exploration resets about half the coordinates uniformly within bounds; intensification perturbs one coordinate using one of four step scales. Updates use greedy acceptance with rollback.
Testing targets three benchmarks (Hilly, Forest, Megacity) at 10, 50, and 1,000 dimensions. Population size tuning becomes decisive; recommended defaults do not hold on harder cases. A C_AO_...
👉 Read | AppStore | @mql5dev
Each iteration ranks the population by fitness. A DP threshold assigns top-ranked agents to intensification and the rest to exploration, then a PC probability can flip statuses to reduce early lock-in. Exploration resets about half the coordinates uniformly within bounds; intensification perturbs one coordinate using one of four step scales. Updates use greedy acceptance with rollback.
Testing targets three benchmarks (Hilly, Forest, Megacity) at 10, 50, and 1,000 dimensions. Population size tuning becomes decisive; recommended defaults do not hold on harder cases. A C_AO_...
👉 Read | AppStore | @mql5dev
👍16❤11🤩7🔥5
Polling an EA against an external signal service works until restarts, retries, and ambiguous broker replies appear. Without stable IDs and acknowledgments, “processed” and “never seen” become indistinguishable, invalid records keep resurfacing, and partial fills or margin errors trigger unsafe retries.
A Redis Streams prototype hardens delivery using consumer groups, PEL tracking, and explicit XACK. BLOCK 0 is avoided due to gateway single-threading. Group creation ignores BUSYGROUP only; other errors must surface.
Execution authority remains in MQL5. Python can emit SIGNAL_GENERATED, but order sizing, risk checks, and OrderSend decisions stay in an EA-side guard. Dedup uses event_id; acknowledgments use stream_id. A durable EA journal records ATTEMPTING/ACCEPTED/REJECTED, flushes before ACK, and reconciles on redelivery by matching broker state via magic and...
👉 Read | Calendar | @mql5dev
A Redis Streams prototype hardens delivery using consumer groups, PEL tracking, and explicit XACK. BLOCK 0 is avoided due to gateway single-threading. Group creation ignores BUSYGROUP only; other errors must surface.
Execution authority remains in MQL5. Python can emit SIGNAL_GENERATED, but order sizing, risk checks, and OrderSend decisions stay in an EA-side guard. Dedup uses event_id; acknowledgments use stream_id. A durable EA journal records ATTEMPTING/ACCEPTED/REJECTED, flushes before ACK, and reconciles on redelivery by matching broker state via magic and...
👉 Read | Calendar | @mql5dev
👍16❤14🔥12🤩6😁2👀2
Trading logic often assumes either mean reversion or continuation, but price charts and common indicators do not test the required serial structure in returns.
The Lo–MacKinlay Variance Ratio (1988) checks whether Var(k-period returns) scales proportionally with k under a random-walk or martingale-difference null. VR(k) near 1 aligns with variance scaling; below 1 indicates net negative autocorrelation, above 1 net positive. Z-statistics are required due to sampling noise.
Two statistics matter: a homoskedastic test for iid increments, and a heteroskedasticity-robust test for uncorrelated returns with time-varying volatility. Short timeframes can show VR<1 from microstructure effects.
An MQL5 implementation is split into a zero-dependency CVarianceRatio engine and a script that retrieves data, runs multiple horizons, and logs results for on-demand diag...
👉 Read | Forum | @mql5dev
The Lo–MacKinlay Variance Ratio (1988) checks whether Var(k-period returns) scales proportionally with k under a random-walk or martingale-difference null. VR(k) near 1 aligns with variance scaling; below 1 indicates net negative autocorrelation, above 1 net positive. Z-statistics are required due to sampling noise.
Two statistics matter: a homoskedastic test for iid increments, and a heteroskedasticity-robust test for uncorrelated returns with time-varying volatility. Short timeframes can show VR<1 from microstructure effects.
An MQL5 implementation is split into a zero-dependency CVarianceRatio engine and a script that retrieves data, runs multiple horizons, and logs results for on-demand diag...
👉 Read | Forum | @mql5dev
❤20👍18🤩15🔥8
This article digs into a common MT5 pitfall when building indicators for subwindows: calculation direction inside OnCalculate. A simple moving average can work on volumes, yet “vanish” when applied to another indicator’s buffer because the loop runs from oldest to newest, propagating bad intermediate values and producing invalid output with no terminal errors.
Reversing the iteration to process newest bars first fixes the plot and matches MetaTrader’s built-in MA behavior. The takeaway is that buffer integrity depends on update order, especially when an indicator consumes another indicator’s data.
It also explains MT5’s subwindow “data queue”: FIRST INDICATOR’S DATA reads the oldest indicator in that pane, PREVIOUS INDICATOR’S DATA reads the most recently added one. Chaining indicators becomes a controlled way to smooth or amplify signals, and MT5 au...
👉 Read | Quotes | @mql5dev
Reversing the iteration to process newest bars first fixes the plot and matches MetaTrader’s built-in MA behavior. The takeaway is that buffer integrity depends on update order, especially when an indicator consumes another indicator’s data.
It also explains MT5’s subwindow “data queue”: FIRST INDICATOR’S DATA reads the oldest indicator in that pane, PREVIOUS INDICATOR’S DATA reads the most recently added one. Chaining indicators becomes a controlled way to smooth or amplify signals, and MT5 au...
👉 Read | Quotes | @mql5dev
👍24🤩13❤9🔥9👨💻4🏆1
EV-MGRFlowNet reframes motion estimation as event-stream modeling, which maps cleanly to tick-level market data where each trade and quote update is a micro-event. Its encoder-decoder pipeline builds temporal representations from irregular, high-density sequences without forcing fixed time bars, staying robust across volatility spikes and quiet periods.
A key upgrade is ST-ConvGRU inside the FERE-Net encoder: each layer updates state using both its own past and feedback from the higher layer, preserving cross-scale context that classic ConvGRU drops. The decoder then reconstructs fine-grained “motion” signals from coarse structure, supported by a hybrid loss designed to enforce temporal consistency.
The implementation focus is practical: an MT5/OpenCL ST-ConvGRU class organizes concatenation, multi-window convolutions, gating, normalization, and optional sp...
👉 Read | Calendar | @mql5dev
A key upgrade is ST-ConvGRU inside the FERE-Net encoder: each layer updates state using both its own past and feedback from the higher layer, preserving cross-scale context that classic ConvGRU drops. The decoder then reconstructs fine-grained “motion” signals from coarse structure, supported by a hybrid loss designed to enforce temporal consistency.
The implementation focus is practical: an MT5/OpenCL ST-ConvGRU class organizes concatenation, multi-window convolutions, gating, normalization, and optional sp...
👉 Read | Calendar | @mql5dev
❤14👍14🤩12🔥9
An MQL5 basket EA applies Markowitz weights rather than single-symbol signals. Core logic stays native: Gauss-Jordan inversion, covariance estimation, and closed-form frontier solvers, with Strategy Tester results reported even when mixed.
CMatrixOps inverts Σ once and reuses it across GMV, tangency, and target-return solvers. The inversion exits on singular pivots; fixed 10x10 buffers avoid MQL5 dynamic 2D allocation issues. A constant epsilon remains a stability risk across volatility regimes.
CMarkowitzEngine builds μ and Σ from bar closes, computes only the upper triangle, and currently samples the forming bar. GMV/tangency/target-return outputs are clipped to long-only via floor-and-renormalize, which is not a constrained QP solution.
Execution converts weights to lots, trims via partial close, and rebalances on timer or drift. Limitations include cur...
👉 Read | Calendar | @mql5dev
CMatrixOps inverts Σ once and reuses it across GMV, tangency, and target-return solvers. The inversion exits on singular pivots; fixed 10x10 buffers avoid MQL5 dynamic 2D allocation issues. A constant epsilon remains a stability risk across volatility regimes.
CMarkowitzEngine builds μ and Σ from bar closes, computes only the upper triangle, and currently samples the forming bar. GMV/tangency/target-return outputs are clipped to long-only via floor-and-renormalize, which is not a constrained QP solution.
Execution converts weights to lots, trims via partial close, and rebalances on timer or drift. Limitations include cur...
👉 Read | Calendar | @mql5dev
❤15👍13🤩11🔥8✍2
Classic grid EAs often look stable until a strong trend turns averaging into runaway exposure. The article quantifies how Martingale-style sizing compounds drawdown fast, leading to margin calls long before any “eventual” retracement.
GridSurvivor improves survivability with three constraints: start grids only on regular RSI divergence (pivot-based, confirmation via left/right lookback, plus oversold/overbought gating), cap grid depth to a fixed level count to make worst-case loss measurable, and enforce an equity-based risk manager that can lock trading and force-close positions.
Implementation stays beginner-friendly (pure MQL5, CTrade, single file) while keeping components modular: isolated CRiskManager, separated entry filter, and clear grid helpers (level counting, average price, outermost order). Backtests show the full stack surviving 2020–2...
👉 Read | AppStore | @mql5dev
GridSurvivor improves survivability with three constraints: start grids only on regular RSI divergence (pivot-based, confirmation via left/right lookback, plus oversold/overbought gating), cap grid depth to a fixed level count to make worst-case loss measurable, and enforce an equity-based risk manager that can lock trading and force-close positions.
Implementation stays beginner-friendly (pure MQL5, CTrade, single file) while keeping components modular: isolated CRiskManager, separated entry filter, and clear grid helpers (level counting, average price, outermost order). Backtests show the full stack surviving 2020–2...
👉 Read | AppStore | @mql5dev
❤21👍12🔥10🤩7👨💻2⚡1
Daily Loss Guard enforces an account-level daily loss cap by closing exposure when the configured limit is reached. It can be attached to any single chart, on any symbol and timeframe, and operates independently from trade entry logic. A timer is used, so tick activity on the host chart is not required.
Daily P/L is computed from today’s closed trades plus the change in open positions since the defined day start. Deposits and withdrawals are excluded. On limit hit, all positions are closed, pending orders are removed, and any newly opened trade is closed until the next trading day.
The trading day start is set by server hour. Start balance and limit-hit state are stored in terminal global variables to survive restarts and re-attaches, then reset automatically on the next day.
Configuration supports percent or fixed-currency limits, symbol filtering, magic ...
👉 Read | Signals | @mql5dev
Daily P/L is computed from today’s closed trades plus the change in open positions since the defined day start. Deposits and withdrawals are excluded. On limit hit, all positions are closed, pending orders are removed, and any newly opened trade is closed until the next trading day.
The trading day start is set by server hour. Start balance and limit-hit state are stored in terminal global variables to survive restarts and re-attaches, then reset automatically on the next day.
Configuration supports percent or fixed-currency limits, symbol filtering, magic ...
👉 Read | Signals | @mql5dev
❤19👍8🔥8🤩4⚡2🤯1
Session Range and Spread is a chart annotation tool that marks the Asia, London, and New York sessions. Each day it draws a box from the session high to low and prints the range on the box. A compact panel shows current spread and which sessions are currently open.
Session times are entered in UTC. On live charts, the broker UTC offset is detected from server time versus GMT, with an option to set it manually. Sessions crossing midnight are supported. Range labels can be Auto, Price, Points, or Pips; forex pairs use pips by default, while metals and indices use price units.
The active session updates on every tick and is marked with an asterisk. Labels are positioned to reduce overlap. Boxes render on H1 and lower; higher timeframes show only the panel. The indicator draws objects only and provides no trading signals.
👉 Read | Freelance | @mql5dev
Session times are entered in UTC. On live charts, the broker UTC offset is detected from server time versus GMT, with an option to set it manually. Sessions crossing midnight are supported. Range labels can be Auto, Price, Points, or Pips; forex pairs use pips by default, while metals and indices use price units.
The active session updates on every tick and is marked with an asterisk. Labels are positioned to reduce overlap. Boxes render on H1 and lower; higher timeframes show only the panel. The indicator draws objects only and provides no trading signals.
👉 Read | Freelance | @mql5dev
❤16👍13🔥5🤩5👌2
Currency Exposure and Leverage Monitor aggregates every open position into currency legs and reports net exposure per currency in account currency. It highlights when several trades that look unrelated are effectively the same directional risk, such as multiple USD shorts created via EURUSD, GBPUSD, and XAUUSD.
The panel ranks currencies by gross contribution and visualizes long vs short exposure around a zero axis. It also calculates effective leverage as gross notional divided by equity, compared with broker leverage, with configurable warning thresholds and concentration flags when a single currency exceeds a set share of total exposure.
For the three largest exposures, a sensitivity section estimates equity impact for a configurable currency move (default 1%), in money and as a percentage of equity. Opposing legs are netted to expose hidden offse...
👉 Read | Quotes | @mql5dev
The panel ranks currencies by gross contribution and visualizes long vs short exposure around a zero axis. It also calculates effective leverage as gross notional divided by equity, compared with broker leverage, with configurable warning thresholds and concentration flags when a single currency exceeds a set share of total exposure.
For the three largest exposures, a sensitivity section estimates equity impact for a configurable currency move (default 1%), in money and as a percentage of equity. Opposing legs are netted to expose hidden offse...
👉 Read | Quotes | @mql5dev
❤18🔥8🤩8👍7
RSI extremes label momentum, not direction. A 70+ reading can align with bullish continuation; a 30- reading can persist during bearish continuation. Directional intent requires market structure.
A closed-bar analytical EA can separate “threshold crossing detected” from “trade bias validated.” It detects RSI crossings on completed candles, reconstructs the last two confirmed swing highs and lows, and classifies structure as bullish, bearish, or range.
Signals are validated only when structure and a break of structure (BOS) agree. BOS is confirmed by a completed close beyond the latest swing level, with a configurable buffer and a prior close that was not already beyond.
Mixed structure arms a time-limited candidate. Opposite BOS within the confirmation window validates reversal; otherwise the candidate expires. Output stays diagnostic: comments, uni...
👉 Read | Forum | @mql5dev
A closed-bar analytical EA can separate “threshold crossing detected” from “trade bias validated.” It detects RSI crossings on completed candles, reconstructs the last two confirmed swing highs and lows, and classifies structure as bullish, bearish, or range.
Signals are validated only when structure and a break of structure (BOS) agree. BOS is confirmed by a completed close beyond the latest swing level, with a configurable buffer and a prior close that was not already beyond.
Mixed structure arms a time-limited candidate. Opposite BOS within the confirmation window validates reversal; otherwise the candidate expires. Output stays diagnostic: comments, uni...
👉 Read | Forum | @mql5dev
❤24👍12🤩8🔥5👀3
MT5 alerts can only beep or play fixed WAV files, so key events stay trapped on-screen. The article builds a single MQL5 include that enables runtime text-to-speech from EAs and scripts via a Speak() function, while deliberately blocking indicators and refusing unsafe contexts like Strategy Tester.
Instead of a COM wrapper DLL, MQL5 launches a hidden PowerShell process through WinAPI CreateProcessW. PowerShell uses Windows SAPI to select an installed voice, set rate (-10..10) and volume (0..100), and speak synchronously.
Safety and robustness come from UTF-16 Base64 (-EncodedCommand) to prevent command-line injection, XML-aware handling (plain vs tagged text), strict length limits, timeouts with forced termination, and exit codes to report missing voices, malformed markup, or execution errors.
👉 Read | AppStore | @mql5dev
Instead of a COM wrapper DLL, MQL5 launches a hidden PowerShell process through WinAPI CreateProcessW. PowerShell uses Windows SAPI to select an installed voice, set rate (-10..10) and volume (0..100), and speak synchronously.
Safety and robustness come from UTF-16 Base64 (-EncodedCommand) to prevent command-line injection, XML-aware handling (plain vs tagged text), strict length limits, timeouts with forced termination, and exit codes to report missing voices, malformed markup, or execution errors.
👉 Read | AppStore | @mql5dev
❤12👍8🤩8🔥6
EV-MGRFlowNet is being ported to MQL5 with OpenCL to handle market microstructure as an event stream rather than fixed time windows. Core blocks remain FERE-Net (ConvGRU/ST-ConvGRU) for long temporal context, FGD-Net for multi-scale reconstruction of a motion vector, and HMC-Loss for self-supervised training without labels.
Current work shifts from event encoding to reconstruction via the FGD-Net decoder. Decoder inputs are built from concatenated signals: prior decoder output plus the matching encoder level, enabling continuous correction against the original event structure.
A CNeuronFGDModule is implemented as a standalone decoder unit: batch norm, cD conv with TANH, flow projection, strict concatenation, and cXH multi-window conv producing GRU gates in one OpenCL pass. Forward pass follows deterministic sequencing, explicit state handling, and gradient...
👉 Read | AlgoBook | @mql5dev
Current work shifts from event encoding to reconstruction via the FGD-Net decoder. Decoder inputs are built from concatenated signals: prior decoder output plus the matching encoder level, enabling continuous correction against the original event structure.
A CNeuronFGDModule is implemented as a standalone decoder unit: batch norm, cD conv with TANH, flow projection, strict concatenation, and cXH multi-window conv producing GRU gates in one OpenCL pass. Forward pass follows deterministic sequencing, explicit state handling, and gradient...
👉 Read | AlgoBook | @mql5dev
❤18👍9🤩7🔥4⚡1🎉1
LearnedStrategy exposes signal generation and metadata, but no interface for post-trade outcomes. After deployment, evidence arrives one trade at a time, and retirement rules become sequential tests with repeated looks.
A fixed 0.95 Beta-posterior trigger is statistically valid per look, but not per stream. Simulated at a 48.5% win rate, checking after every trade retired healthy runs 33.4% of the time over 300 trades; a single look at trade 300 was 5.2%. Raising the trigger to 0.9956 restored ~5% false alarms but reduced sensitivity.
WinRateSPRT adds two modes: Wald terminating SPRT for fixed batches, and Page reflecting CUSUM for continuous monitoring. CUSUM requires a planned horizon; calibrating the boundary to 5% false alarms over 300 trades raised detection delay (ARL1 ~99 to ~173 trades) but materially improved break detection versus posteri...
👉 Read | Forum | @mql5dev
A fixed 0.95 Beta-posterior trigger is statistically valid per look, but not per stream. Simulated at a 48.5% win rate, checking after every trade retired healthy runs 33.4% of the time over 300 trades; a single look at trade 300 was 5.2%. Raising the trigger to 0.9956 restored ~5% false alarms but reduced sensitivity.
WinRateSPRT adds two modes: Wald terminating SPRT for fixed batches, and Page reflecting CUSUM for continuous monitoring. CUSUM requires a planned horizon; calibrating the boundary to 5% false alarms over 300 trades raised detection delay (ARL1 ~99 to ~173 trades) but materially improved break detection versus posteri...
👉 Read | Forum | @mql5dev
❤14👍7🔥7🤩3
This MQL5 article builds a trend stop that adapts to market regime instead of trailing at a fixed distance. On each flip, the stop is reseeded a configurable number of slow-ATR multiples beyond the flip bar’s high/low, then accelerates toward price bar-by-bar with a capped speed so early noise is tolerated and stalled trends are exited sooner.
Acceleration is boosted by how far price is from a reference VWAP (session/week/month, or combinations). That same VWAP relationship grades flips as confirmed or filtered, publishes the stop/trend/grade via buffers, and optionally alerts only on live bars.
Visualization is treated as a first-class feature: persistent flip levels remain until invalidated by a close, while a blended canvas draws an anti-aliased stop line, a non-obscuring cloud, and precise labels without performance-heavy floating point work.
👉 Read | Docs | @mql5dev
Acceleration is boosted by how far price is from a reference VWAP (session/week/month, or combinations). That same VWAP relationship grades flips as confirmed or filtered, publishes the stop/trend/grade via buffers, and optionally alerts only on live bars.
Visualization is treated as a first-class feature: persistent flip levels remain until invalidated by a close, while a blended canvas draws an anti-aliased stop line, a non-obscuring cloud, and precise labels without performance-heavy floating point work.
👉 Read | Docs | @mql5dev
❤11👍11🤩8🔥1
This article tackles two common failure modes in ML trading: noisy price-derived features that overfit, and equity curves dominated by a single instrument’s regime.
It builds a Python+MT5 pipeline around a causal L1 Trend Filter solved with ADMM (banded O(N) iterations, adaptive rho, correct residual tracking). A sliding window makes the filter usable live, producing a piecewise-linear trend and explicit breakpoints.
Features come from trend geometry and indicators computed on the filtered series, with targets defined over a structural horizon (3 L1 segments) rather than fixed time. Models are trained per symbol with CatBoost and strict walk-forward (purge/embargo, internal early stopping).
Portfolio stability is improved by trading 29 instruments and sizing lots via 95% parametric VaR, allocating inversely to volatility and backtesting the weight...
👉 Read | VPS | @mql5dev
It builds a Python+MT5 pipeline around a causal L1 Trend Filter solved with ADMM (banded O(N) iterations, adaptive rho, correct residual tracking). A sliding window makes the filter usable live, producing a piecewise-linear trend and explicit breakpoints.
Features come from trend geometry and indicators computed on the filtered series, with targets defined over a structural horizon (3 L1 segments) rather than fixed time. Models are trained per symbol with CatBoost and strict walk-forward (purge/embargo, internal early stopping).
Portfolio stability is improved by trading 29 instruments and sizing lots via 95% parametric VaR, allocating inversely to volatility and backtesting the weight...
👉 Read | VPS | @mql5dev
❤8👍7🔥4🤩1
Volatility tools built on close-to-close returns discard intrabar dispersion. OHLC-based estimators reduce that loss and react faster to regime shifts, with direct impact on sizing, stops, and breakout timing.
The Garman–Klass (1980) variance estimator uses ln(H/L)^2 plus a corrected ln(C/O)^2 term. It is theoretically more efficient than close-to-close under zero drift, but it ignores prior-close to current-open gaps, which can understate risk in instruments with frequent jumps.
Testing on synthetic GBM in Python showed materially lower MSE for GK, but also exposed a failure mode: GK-to-MA crossovers do not classify regimes. Percentile rank over a lookback window produced stable squeeze (<30th) to expansion (>60th) signals, filtered by a directional SMA.
In MQL5, correct series indexing, incremental recalculation, and storing recursive squeeze s...
👉 Read | Signals | @mql5dev
The Garman–Klass (1980) variance estimator uses ln(H/L)^2 plus a corrected ln(C/O)^2 term. It is theoretically more efficient than close-to-close under zero drift, but it ignores prior-close to current-open gaps, which can understate risk in instruments with frequent jumps.
Testing on synthetic GBM in Python showed materially lower MSE for GK, but also exposed a failure mode: GK-to-MA crossovers do not classify regimes. Percentile rank over a lookback window produced stable squeeze (<30th) to expansion (>60th) signals, filtered by a directional SMA.
In MQL5, correct series indexing, incremental recalculation, and storing recursive squeeze s...
👉 Read | Signals | @mql5dev
❤8🔥2🤩2👍1
This article builds an MT5 “signal router” that mimics discretionary filtering: a lightweight online classifier scores direction, Shannon entropy converts the score into uncertainty, then signals are auto-traded, skipped, or sent to a human review step. In Strategy Tester, the human step is replaced with deterministic proxies (always confirm/reject) or seeded randomness.
Key engineering choices: rolling online logistic regression with warm-start refits on a 300-bar window, careful no-leak label indexing, and a P² streaming quantile to keep a fixed review budget under distribution drift without storing all history. Execution code enforces broker constraints (stops/freeze, min lot, fill modes) and attributes PnL per decision tag.
Validation is treated as the core problem: thresholds are tuned on one window and judged on a held-out window against mult...
👉 Read | AppStore | @mql5dev
Key engineering choices: rolling online logistic regression with warm-start refits on a 300-bar window, careful no-leak label indexing, and a P² streaming quantile to keep a fixed review budget under distribution drift without storing all history. Execution code enforces broker constraints (stops/freeze, min lot, fill modes) and attributes PnL per decision tag.
Validation is treated as the core problem: thresholds are tuned on one window and judged on a held-out window against mult...
👉 Read | AppStore | @mql5dev