Controlled test on 60.5M EURUSD quote ticks (2022–2023) checked whether AFML alternative bars improve strategy and ML efficacy, not just return conditioning. On spot FX, volume and dollar bars collapse to tick-based equivalents because quotes have no true volume. The comparison reduces to four families: time, tick, tick-imbalance, tick-runs, calibrated to a common bar count to avoid sample-size confounds. Activity bars improved distributional stats (lower autocorr, lower kurtosis), but this did not transfer to RSI, Bollinger, or properly-sided ADX/DI with triple-barrier meta-labeling. Under purged CV with uniqueness-corrected random forests, out-of-sample AUC stayed 0.42–0.55 and the best cell failed a permutation test (p=0.10). #MQL5 #MT5 #AlgoTrading #Strategy https://lnkd.in/eCGQJv6v
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
External link for MQL5 Algo Trading
- Industry
- Software Development
- Company size
- 201-500 employees
- Type
- Privately Held
Employees at MQL5 Algo Trading
Updates
-
MetaTrader 5 replication/simulation stack moves to component integration: Expert Advisor, Mouse Study, Chart Trade, and a dedicated position indicator. The position indicator is no longer user-attached. The EA dynamically adds and removes one indicator instance per open position, while keeping the indicator decoupled from EA code to allow shared updates without recompiling multiple EAs. Indicator changes include parameters supplied by the EA and additional validation: confirm the position exists and prevent duplicate instances via object-name checks. EA changes are minimal but highlight a common defect: attaching indicators for all open positions without filtering by the chart’s effective symbol. In multi-symbol setups, this can surface only in live trading. A safe fix should leverage existing terminal symbol resolution without breaking encapsulation in C... #MQL5 #MT5 #EA #Indicator https://lnkd.in/er-7dDSH
-
-
MetaTrader 5 file handling in MQL5 is constrained by the sandbox and by function choice. FileSave/FileLoad operate on whole-file buffers, which is safe for small data but unsuitable for random access and partial updates. A common symptom is unexpected overwrite: two consecutive FileSave calls to the same name keep only the second payload. Another issue is unwanted NUL bytes when treating binary-style strings as plain text. A practical pattern is read-modify-write: load the existing file into a buffer, append new lines, then save once. For repeated runs, either delete the file in a synchronized sandbox context, or use a static flag to clear on first write while appending afterward. #MQL5 #MT5 #script #Strategy https://lnkd.in/eyAuv9Mg
-
-
TimeGPT is a Transformer-based time-series model designed for MetaTrader 5 to forecast price direction over 24 bars. It converts OHLC close data into normalized 24-hour returns, then tokenizes changes into a 256-size vocabulary to keep inputs bounded across instruments. Core components include TGMatrix for in-terminal matrix ops, an ImprovedTokenizer, multi-head causal attention (6 heads), and a 6-layer Transformer with residual paths and an FFN (256). Tokens are embedded to 256-d vectors, then projected to next-token probabilities. Training uses ~2000 bars, 3 epochs, context length 64, MSE loss, and a decaying learning rate. Runtime targets are ~15 minutes training, ~200 MB RAM; limits include smaller capacity and no external signals (news/sentiment). #MQL5 #MT5 #AITrading #AlgoTrade https://lnkd.in/eysiMchn
-
-
Part 4 moves from UT Bot Alerts signals to an MQL5 Expert Advisor that can execute trades reliably. Execution is gated by new-bar detection. Signals are read only from buffer index 1 (last closed candle), using CopyBuffer() with timeseries arrays to avoid acting on unstable values from the forming bar and to prevent repeated triggers inside one candle. Position control is single-direction. Opposite positions are closed before opening a new one, filtered by a magic number. Trade direction is configurable (buy, sell, both). Optional risk controls use ATR from the last closed bar for stop-loss, and take-profit is computed from risk via a reward-to-risk ratio. Trade actions are isolated into buy/sell functions for testable, modular logic. #MQL5 #MT5 #EA #Strategy https://lnkd.in/eE-mZEVS
-
-
Kronos brings foundation-model ideas to candlesticks: a tokenizer compresses each 6-field bar into two discrete tokens, and a decoder-only transformer predicts future tokens autoregressively, then decodes them back to OHLCV(+amount). The key engineering focus is running inference entirely inside MetaTrader 5. Weights are exported once from PyTorch into flat float32 .bin tensors with a manifest, then loaded in MQL5 and executed with native matrix/vector ops—no Python at runtime. This part implements the front pipeline: exact z-score normalization per window (with correct ddof=0), careful timestamp features (pandas weekday remap), and Binary Spherical Quantization where tokens depend only on latent sign bits, avoiding unnecessary normalization. Correctness is established via golden-reference, bit-for-bit verification against the original model, making later ... #MQL5 #MT5 #AI #Strategy https://lnkd.in/e6Rrc5F9
-
-
Multi-strategy MT5 accounts can hide strategy-level risk behind aggregate account metrics. Terminal reports remain account-wide and do not provide attribution, date filtering, or cross-strategy correlation. A standalone EA, Portfolio Analyzer, reads deal history, reconstructs closed positions, attributes them by magic number or normalized comment, and renders a dashboard without modifying any trading EA. Architecture centers on a self-contained CPortfolioAnalyzer class with explicit setters instead of direct access to global inputs. Closed positions are paired from DEAL_POSITION_ID, sorted by exit time for equity and drawdown, and filtered via tokenized comment normalization. UI uses CCanvas with manual ARGB blending and DPI scaling. Analytics include portfolio stats, an equity curve, and a Pearson correlation matrix based on daily strategy returns. #MQL5 #MT5 #EA #Strategy https://lnkd.in/e8TARFy7
-
-
Trend and breakout EAs often assume returns are always predictable. When the series is near-random, signals become noise and performance degrades through spreads and commissions. Standard MQL5 indicators track price, momentum, volatility, or volume, but do not quantify predictability of returns. Approximate Entropy (ApEn) is presented as a native MQL5 measure of short-term serial structure on closed-bar log-returns. It is implemented as a standalone CApEnCalculator class, plus a subwindow indicator that marks regime zones via configurable thresholds, and a test script for synthetic validation. ApEn is positioned as a gating filter, not a trade trigger. EAs can read it via iCustom/CopyBuffer with shift=1 and disable directional entries when ApEn exceeds an upper threshold. Parameters m=2, r=0.2·SD, and window sizes around 50–200 balance stability a... #MQL5 #MT5 #AlgoTrading #Indicator https://lnkd.in/e37tx4VE
-
-
Fixed-window correlation matrices in multi-symbol EAs lag regime shifts. With a 60-bar window, pre-shift data contaminates estimates for the full 60 bars, degrading hedges and risk budgets when covariance changes fastest. Exponentially weighted covariance updates every bar, overweights recent returns, and uses constant memory. Each cell updates recursively with decay factor lambda and current return products, avoiding history buffers and re-scans. MQL5 runtime sizing limits require storing an N×N matrix as a flat 1D array. Production code needs warm-up gating, near-zero variance guards for correlation normalization, and clamping to [-1, 1]. A live heatmap renderer must pack colors as 0x00BBGGRR and skip correlation calls during cold start to avoid log storms. #MQL5 #MT5 #AlgoTrading #EA https://lnkd.in/e5XjcDAq
-
-
MetaTrader 5 charts remain symbol-centric, which limits visibility into correlated moves across related instruments. A practical workaround is a synthetic custom symbol built from multiple markets by averaging aligned OHLC bars. An MQL5 Expert Advisor can load OHLCV for selected source symbols, match candles by timestamp, and compute per-bar averages for open, high, low, close, and optionally volume. Only bars present across all sources are included to avoid skew from missing sessions. The EA then creates or reuses a custom symbol, copies formatting from a template symbol, disables trading mode, clears prior history, and writes the reconstructed series. Live synchronization is handled via a timer that recalculates only the most recent bars to keep updates lightweight. #MQL5 #MT5 #AlgoTrading #Indicator https://lnkd.in/ezaCSXbT
-