MQL5 Algo Trading’s cover photo
MQL5 Algo Trading

MQL5 Algo Trading

Software Development

The best publications of the largest community of algotraders.

About us

The best publications of the largest community of algotraders. Subscribe to stay up-to-date with modern technologies and trading programs development.

Website
https://www.mql5.com
Industry
Software Development
Company size
201-500 employees
Type
Privately Held

Employees at MQL5 Algo Trading

Updates

  • MetaTrader 5 generates rich tester logs and optimization data, but its built-in reports can’t answer portfolio-grade questions like cross-symbol robustness, drawdown recovery behavior, or session-based edge. The workaround is straightforward: log normalized trade and optimization fields to CSV from MQL5, then analyze in Python with pandas plus matplotlib/seaborn. The article defines a reusable pipeline and five charts that fill key gaps: a multi-asset parameter match matrix for consistency checks, a lag-vs-whipsaw scatter to quantify filter efficiency, a walk-forward paired-slope view to expose overfitting, KDE distributions for drawdown depth and duration, and an hour-by-day heatmap to reveal intraday/intraweek alpha clusters. A deployment wrapper runs the full suite against new exports, reading directly from the terminal’s MQL5\Files directory to a... #MQL5 #MT5 #AlgoTrading #Python https://lnkd.in/dKFnKu2y

    • No alternative text description for this image
  • MQL5 custom signals shift from multi-asset arbitrage to single-asset breakout handling under macro volatility. The earlier B-Tree plus Bayesian model fits cross-sectional lookup and uncertainty scoring, but is less suitable for localized, sequential shock detection. The proposed stack pairs Disjoint Set Union (DSU) with a Deep Belief Network (DBN). DSU partitions adjacent bars into connected volatility components using MakeSet/Find/Union, driven by ATR expansion and Bollinger bandwidth change to avoid smoothing lag. DBN (stacked RBMs) validates each DSU cluster via an energy score and a tanh-bounded output in [-1, 1]. Trades pass only when the DBN output exceeds a tuned threshold, targeting regime shifts while filtering stop-hunt noise. #MQL5 #MT5 #AlgoTrading #Strategy https://lnkd.in/dzaYsvme

    • No alternative text description for this image
  • MQL5 order submission starts with MqlTradeRequest, a 21-field struct with tight semantic coupling. The compiler checks types, not intent, so invalid combinations often pass build and fail at runtime, sometimes after broker-side normalization. A fluent COrderBuilder shifts correctness from caller discipline to validated configuration. It keeps shadow fields plus validity flags and a single error string. Send() acts as a dispatch gate: mandatory flags, cross-field stop logic, OrderCheck(), then OrderSend(), returning one boolean and a diagnostic message. Pointer-return chaining is the practical mechanism in MQL5 because method references are unsupported. Buy/Sell and pending variants set action and type as a pair, removing a common class of mismatches. Stop-loss and take-profit checks are directional, deferred, and enforce SYMBOL_TRADE_STOPS_LEVEL befor... #MQL5 #MT5 #AlgoTrading #MQL5 https://lnkd.in/dY7WjZeN

    • No alternative text description for this image
  • Part 2 extends MT5 EA restart recovery beyond SQLite persistence by handling virtual stop-loss and take-profit. When protection exists only in runtime memory, a terminal shutdown can leave positions unprotected and still open after price already crossed the intended exit. The recovery flow adds broker-side position discovery using symbol and magic number, then restores virtual levels from SQLite and validates them against current price before resuming management. If a position exists without saved state, the EA switches to safe mode. Testing uses controlled trades opened without broker SL/TP, builds initial virtual protection immediately, stores state, and recovers it on startup. A controlled close path updates SQLite from ACTIVE to CLOSED after the position is exited. #MQL5 #MT5 #EA #Strategy https://lnkd.in/dR9sK3aq

    • No alternative text description for this image
  • Growing EAs often devolve into hidden coupling via global state. Replacing globals with a publish/subscribe event bus makes dependencies explicit: modules publish typed events and subscribe to what they need, turning an N-to-N mesh into a star centered on the bus. The design uses an enum for event routing (compile-time safety, O(1) lookup), a fixed-size payload passed by const reference to avoid copies, and an abstract listener interface for polymorphic dispatch. An MQL5 pointer-array limitation is handled with a slot wrapper struct per event type. Dispatch is synchronous and validated with CheckPointer(), so handler cost impacts tick time and listener lifetimes must be managed carefully. In practice, signal, execution, and risk components stay independent while still coordinating reliably. #MQL5 #MT5 #AlgoTrading #Strategy https://lnkd.in/d4AWBt6R

    • No alternative text description for this image
  • Extremal Optimization (EO) targets hard trading-style objective landscapes where gradients fail: discontinuities, multiple local optima, and non-differentiable regions. Inspired by the Bak–Sneppen model, it updates the worst parts of a solution rather than refining the best, using punctuated changes to escape stagnation. The MT5-oriented implementation builds a population, ranks agents and their parameter “components,” then selects an agent and a component via a power-law (tau). The chosen component is replaced with a bounded random value, keeping step discretization, while Revision tracks the best global candidate. Bench tests showed weak convergence (~25% overall score), leading to a revised variant: explicitly mutate selected components, tune selection/mutation distributions, and manage epochs to stabilize search and improve practical performance for pa... #MQL5 #MT5 #algorithm #EA https://lnkd.in/dS2vQbfF

    • No alternative text description for this image
  • Deep RL in trading remains constrained by sample inefficiency. Uninformative actions translate into transaction costs and drawdowns, while early Critic errors can push Actor–Critic agents into consistently losing regions of the action space. Actor–Director–Critic (ADC) adds a Director as a binary classifier that filters actions before they are used for policy updates. The Director is trained on high- and low-performing state–action–reward tuples, then its influence decays as Critic accuracy improves, reducing wasted exploration. ADC also targets overestimation bias. Two Critics are kept, each with two alternately updated target networks; targets use averaged estimates, while Actor updates use the minimum across Critics. The approach is positioned for portfolio and HFT settings where value-function error directly impacts risk. An MQL5 implementation ... #MQL5 #MT5 #AITrading #Strategy https://lnkd.in/d_W4qe9K

    • No alternative text description for this image
  • Partial position closing in MQL5 is a position management method that closes a defined percentage of volume at intermediate Take Profit levels. It can lock profit earlier than breakeven or trailing stop logic, while keeping exposure for further movement. Key constraints include extra commissions per partial close and missed execution if price never reaches the defined levels. Suitability depends on strategy horizon, with wider swing targets generally fitting better than tight scalping targets. Implementation focuses on predefined TP percentages between entry and final TP, paired with volume percentages. A CPartials class can track positions by magic number, calculate TP1/TP2/TP3 prices, and call CTrade::PositionClosePartial. Recent architecture changes include shared logging (CLoggerBase), a Utils library, risk management split into modules, Accou... #MQL5 #MT5 #AlgoTrading #Strategy https://lnkd.in/dy5wtKTk

    • No alternative text description for this image
  • Part III adds a regression gate on top of the Part II artifacts without changing their contracts. The profiler CSV and deterministic TestLite report stay stable, while the gate compares current evidence to an accepted baseline and emits PASS, WARN, SKIP, or FAIL. The workflow stays file-based and sequential: run UnitTestRunner.mq5, run ProfilerExampleEA.mq5 in Strategy Tester, promote a clean profile to ProfilerExampleEA_Baseline.csv, then run DiagnosticGateRunner.mq5 after changes. Outputs include delta and failure CSVs plus a final machine-readable status. RegressionGate.mqh matches profiler rows by section name, computes call-count and timing deltas, and classifies movement using combined absolute and percentage thresholds to avoid microsecond noise. New or missing sections warn by default. TradeAssertions.mqh reuses TestLite to add symbol-awar... #MQL5 #MT5 #AlgoTrading #Strategy https://lnkd.in/d4pCN8hp

    • No alternative text description for this image
  • Quantum-inspired neural architectures are being prototyped directly in MQL5 for MetaTrader 5, combining state-space dynamics, transformer attention, context aggregation, and an explicit verification layer. Core design uses five memory bands: short-, medium-, long-term, episodic, and pattern memory. ContextAnalyzer adjusts weights by volatility and regime, while transformer attention selects signal-bearing fragments and suppresses noise. A quantum-style interaction stage models superposition/interference/resonance between memory outputs to amplify consistent patterns and damp contradictions. MetaVerificationModel tracks error history and current metrics to reduce overconfidence. Implementation benefits from native MQL5 matrix/vector types and matrix.mqh: faster MatMul/@ operations, fewer indexing faults, tighter code, and available ML primitives (Sig... #MQL5 #MT5 #AITrading #Strategy https://lnkd.in/dQTN8kSP

    • No alternative text description for this image

Similar pages

Browse jobs