Codes

TransactionCostCollector — Broker Cost Profiling Script for MetaTrader 5

Triple-barrier labeling pipelines frequently use an arbitrary constant (0.5–1.0%) or a legacy spread assumption as the min_ret threshold. A threshold set below the actual round-trip transaction cost causes the pipeline to label cost-driven noise as tradeable signal. The labeled dataset then

Fixed-Width Fractional Differencing (FFD) for MetaTrader 5

MQL5 implementation of the fixed-width fractional differencing (FFD) method from López de Prado's Advances in Financial Machine Learning (Chapter 5). Transforms a non-stationary price series into a stationary one while preserving maximum historical memory; output cross-validates against the Python

Articles

Feature Engineering for ML (Part 13): Trend-Scanning Features in Python for MetaTrader 5

Trend-scanning supports both forward and backward windows, and the labeling default is unsafe for features: it looks ahead and boosts next-bar agreement well above chance on random walks. We provide a dedicated wrapper, get trend scanning features, that forces computational causal and returns only

Feature Engineering for ML (Part 12): Fractal Features in MQL5 for MetaTrader 5

A direct MQL5 port of the fractal detector writes each pattern at its center bar, so a buffer read by an expert advisor holds a value that only existed n bars later. We implement CFractalFeatures.mqh with ProcessBar for bar-by-bar use and Compute for full-series recalculation, covering detection

Feature Engineering for ML (Part 11): Fractal Features in Python for MetaTrader 5

The article examines a Williams five‑bar fractal feature pipeline and shows how a centered rolling window creates a true look‑ahead leak. It identifies two additional silent bugs—a hardcoded shift tied to the default n and a volatility threshold that ignores its input—and consolidates fixes under a

MetaTrader 5 Machine Learning Blueprint (Part 19): Bagging Regimes for MetaTrader 5

We test AFML's claim that the sequential bootstrap decorrelates bagged trees on overlapping triple‑barrier labels by isolating two levers: draw count and draw rule. One decision identical tree is bagged under four row‑sampling regimes and evaluated on EURUSD 2022–2023 for draw uniqueness

Beyond the Clock (Part 4): Efficacy of Bars on Trending and Mean-Reversion Strategies for MetaTrader 5

Does better return conditioning buy strategy performance? We hold bar count fixed across time, tick, tick-imbalance, and tick-runs on 60.5 million EURUSD ticks, then meta-label RSI, Bollinger, and ADX/DI entries and score with purged cross-validation. No family delivers a consistent edge; efficacy

Feature Engineering for ML (Part 10): Structural Break Tests in MQL5 for MetaTrader 5

We port AFML Chapter 17 structural break tests to MQL5 as a single include, CStructuralBreaks, delivering six bar-indexed features for EAs: CSW statistic and critical value, Chow-Type DFC, SADF with a rolling lookback (default 252), SM-Exp, and SM-Power. SADF uses O(L²) rolling windows for real-time

Feature Engineering for ML (Part 9): Structural Break Tests in Python for MetaTrader 5

We present a production‑ready implementation of AFML Chapter 17 structural break tests. The module includes Chu-Stinchcombe-White (one-/two-sided), Chow-type DFC, SADF across six models (linear, quadratic, sm poly 1, sm poly 2, sm exp, sm power), plus QADF (q, v) and CADF (q), returning bar-indexed

Feature Engineering for ML (Part 8): Entropy Features in MQL5 for MetaTrader 5

An MQL5 port of four entropy estimators — Shannon, Plug-In, Lempel-Ziv, and Kontoyiannis — operating on the intrabar tick-rule sequence. CopyTicksRange() limits data to the broker's cached tick window, so features apply to recent bars only. The implementation encodes bid-direction ticks from

MetaTrader 5 Machine Learning Blueprint (Part 18): Sequential Bootstrap, Corrected — Clone, Class Erasure, and the Comparison Toolkit for MetaTrader 5

The article diagnoses two defects that neutralize sequential bootstrap during cross‑validation: type erasure of SequentiallyBootstrappedBaggingClassifier and a fold‑level shape mismatch from cloning full samples info sets. It retains the classifier's identity, adds find seq bagging to re‑inject

Feature Engineering for ML (Part 7): Entropy Features in Python for MetaTrader 5

The article provides production-ready entropy estimators (Shannon, plug-in, Lempel–Ziv, Kontoyiannis) operating on tick-rule–encoded sequences. It resolves three correctness and performance issues in the original code, verifies outputs against chapter references, and extends encoding with quantile

Forum

Article Notifications

Hello, I have been wondering if notifications for article writing could be arranged so that all alerts regarding one article are grouped. It would make it easier to parse when one has multiple articles in progress and reduce unseen messages