Ushana Kevin Iorkumbul / Профиль
- Информация
|
нет
опыт работы
|
0
продуктов
|
0
демо-версий
|
|
0
работ
|
0
сигналов
|
0
подписчиков
|
Cross-cutting concerns like logging, timing, and threshold filtering should not live inside indicator classes. We show how to apply the decorator pattern in MQL5 with a shared IIndicator interface, an owning CBaseDecorator, and concrete CLoggingDecorator, CTimingDecorator, and CThresholdFilterDecorator layers. You can stack behaviors per EA, keep computation code closed to modification, and get deterministic cleanup by deleting only the outermost decorator.
This article implements the NLMS-based Self-Adaptive Moving Average as a working MQL5 indicator. It provides the complete source code and explains the key design choices, including inline execution, uniform weight seeding, closed‑bar updates, and stability bounds, along with installation, usage, and limitations. The result is a compiled, chart‑ready SAMA_NLMS indicator and a clear basis for subsequent EA benchmarking.
Direct calls to the MQL5 History API inside analytics components create hidden terminal dependencies that make isolated testing structurally impossible. This article constructs an ITradeRepository abstraction layer with CLiveTradeRepository and CMockTradeRepository implementations, enabling the same analytics engine and equity curve panel to operate identically against live account data or a deterministic in-memory dataset. Repository injection eliminates direct API coupling, supports offline validation, and confines data source changes to a single implementation class.
В статье представлен воспроизводимый пайплайн передачи данных из MetaTrader 5 в Python для масштабного исследования индикаторов. Схема экспорта MQL5 фиксирует обязательные столбцы, включая пользовательские счётчики задержки и ложных срабатываний. Базовый модуль выполняет сопоставление результатов с одинаковыми параметрами по инструментам и таймфреймам, а модуль walk-forward-валидации жёстко фиксирует оптимум, найденный на окне InSample, и оценивает его на ранее не виденных данных OutSample OutSample. В результате читатель получает несмещённые метрики устойчивости и автоматизацию, устраняющую смещение из-за ручного отбора.
This article introduces the Self-Adaptive Moving Average (SAMA), an adaptive filter leveraging the Normalized Least Mean Squares (NLMS) algorithm. It explores why fixed-period averages fail, how NLMS adapts bar by bar, and the engineering protections required for production. This conceptual and mathematical foundation prepares you for the MQL5 code implementation in Part 2.
High-frequency MQL5 indicators that instantiate objects on every tick accumulate allocation overhead and timing jitter in OnCalculate(). This article constructs a generic templated object pool using a free-list index array, delivering O(1) Acquire() and Release() operations. The design includes double-release protection, strict separation of payload state from pool metadata in Reset(), and a fixed-capacity free list with no heap fallback. A dual-path custom indicator benchmark measures per-tick overhead difference using GetMicrosecondCount().
MetaTrader 5 предоставляет обширные данные о результатах, но ограниченные возможности структурного анализа. В статье показано, как экспортировать результаты из MQL5 в CSV и построить пять визуализаций на Python, раскрывающих согласованность параметров между активами, компромисс между задержкой и шумом, деградацию результатов при walk-forward-валидации, распределение глубины и длительности просадок, а также внутридневные кластеры по часам и дням недели. Единый модуль автоматизации запускает полный пайплайн для каждого нового файла экспорта и обеспечивает воспроизводимую диагностику.
Manual population of MqlTradeRequest leaves cross-field rules unchecked, creating silent misconfigurations at execution time. A fluent COrderBuilder for MQL5 adds pointer-based method chaining, per-field validation, and directional SL/TP checks against broker stop‑level constraints. Its Send() method runs a four-stage gate—flag completeness, cross-field consistency, OrderCheck(), then OrderSend()—so configuration errors are caught early and order code stays clear and reusable.
A typed publish-subscribe event bus in MQL5 replaces global variables and direct cross-references. Using an abstract listener interface and an enum-indexed subscription table, a signal engine, order manager, and drawdown monitor communicate only through the bus, with no shared state. The article analyzes dispatch overhead, pointer validation, and recursive publish risks, helping you design decoupled, testable EAs.
Файловая система MQL5 работает в строгой песочнице. Понимание флагов доступа и правил разрешения путей лежит в основе любого надёжного пайплайна экспорта. В статье создаётся класс CCSVExporter, который отвечает за создание файлов, безопасное дописывание и механизмы восстановления при ошибках. Также рассматриваются разбор CSV-файлов, токенизация полей, конфликты параллельного доступа и стратегии буферизации записи при интенсивных сериях оптимизации.
При многоядерной оптимизации в MetaTrader 5 результаты могут незаметно теряться, когда параллельные агенты одновременно обращаются к одному CSV-файлу. Повторно используемый механизм экспорта MQL5 применяет итерационную спин-блокировку, чтобы надёжно открыть файл и добавлять строки без потерь. Он сохраняет пользовательские метрики, включая коэффициент Сортино, среднюю продолжительность сделки и показатели качества сигналов — запаздывание и частота ложных разворотов (whipsaws) — в сводном CSV-файле для последующей аналитической обработки.
Most retail traders ignore overnight swap rates, but for long-term positions, these interest payments can make or break your strategy. This article shows you how to build a dynamic MQL5 module that retrieves real-time swap data and converts it into actual profit or loss in your account currency. You will learn how to program an Expert Advisor that automatically calculates if a trade is worth holding based on carry income and adjusts your position size to account for expected interest. It is a practical guide to turning a hidden cost into a mathematical advantage for your trading systems.
This article provides a structured MQL5 framework for serializing an Expert Advisor's internal state into local binary files. It prevents data resets during platform restarts by safely storing volatile tracking metrics, such as trade counts and multipliers, directly to disk. This architecture offers a more robust state continuity alternative to terminal Global Variables.
This article presents a self-contained news filter module for MetaTrader 5 built on the platform's economic calendar API. It implements symbol-to-currency mapping, pre- and post-event trading pauses, and optional position size reduction on high-impact days, with a CSV-based fallback for the Strategy Tester. A demo EA and live chart dashboard show integration and verification in both live and backtest environments.
The article presents two systematic pitfalls in MQL5 multi‑timeframe work: indicator handle leaks that exhausted resources and repainting from reading the forming bar (index 0). It introduces MTFEngine.mqh, a unified include that creates and tracks handles in one place and defaults all reads to closed bars (index 1). A D1–H4–H1 example shows how this approach keeps signals technically correct and consistent with charts.