MQL5 Algo Trading
540K subscribers
3.86K photos
6 videos
3.87K links
The best publications of the largest community of algotraders.

Subscribe to stay up-to-date with modern technologies and trading programs development.
Download Telegram
Channel Breakout Dashboard is a chart-side informational panel for MetaTrader 5, built to consolidate conditions that typically require multiple indicators. It shows current and higher-timeframe trend, RSI momentum with OB/OS states, volatility via current ATR vs average ATR, an N-bar high/low price channel with breakout status, ADR used vs remaining, live spread classified by thresholds, and a combined bias label: BUY SETUP, SELL SETUP, or WAIT. Updates run on a configurable timer.

Operational impact focuses on faster validation and fewer low-quality entries. Breakouts can be filtered by higher-timeframe alignment, RSI extremes, and volatility regime, while ADR context helps avoid late-day trend entries and supports realistic TP/SL placement. Spread state adds an execution gate during illiquid hours or event spikes.

Multiple instances are supported ...

πŸ‘‰ Read | Freelance | @mql5dev
❀6πŸ‘6
News Trading Dashboard is an on-chart informational panel focused on real-time volatility monitoring. It flags β€œnews spike” conditions by comparing the current bar range (High–Low) to ATR multiplied by a configurable threshold, highlighting abnormal movement typically seen on scheduled macro releases.

Key controls include ATR period as the baseline, spike multiplier as the trigger level, and a UI refresh timer for the footer clock. Panel options cover visibility, theme, font-based scaling, auto-width to prevent clipping, minimum width, and screen anchoring with X/Y offsets.

Multi-instance support uses an InstanceID to run parallel configurations per chart or symbol, with automatic deconfliction if IDs collide.

Common usage patterns include a no-trade filter during red status, momentum entries after the first spike candle closes, mean-reversion on extreme...

πŸ‘‰ Read | Calendar | @mql5dev
❀8πŸ‘4πŸ‘€1
Financial forecasting exposes the limits of β€œone task, one model” pipelines, especially under regime shifts, volatility changes, and mixed sampling rates. Large TS foundation models add scale, but often trade deployment cost for marginal accuracy.

LightGTS proposes period-aware tokenization. Instead of fixed-length patches, sequences are split into full-cycle segments derived from known frequency or FFT-based period detection, keeping token semantics stable across timeframes.

A flex projection layer adapts weights to variable patch sizes via pseudoinverse-based resizing, avoiding destructive interpolation. Forecasting uses non-autoregressive parallel decoding from the final encoder token, reducing error accumulation while keeping the parameter count under 5M.

πŸ‘‰ Read | Freelance | @mql5dev
❀12πŸ‘5
A range panel automates session High/Low calculation from a configurable lookback, removing manual level drawing. It provides a clear status for consolidation versus confirmed breakout using a point buffer, with optional chart lines and floating price tags for on-chart verification.

Multiple instances can run in parallel with separate IDs and lookbacks to add multi-timeframe confirmation without changing charts. Updates run on a timer rather than every tick to reduce terminal load during long sessions. Display controls include theme, text sizing, auto-scaling, corner anchoring, and pixel offsets, plus line style and width.

Common usage includes fading range extremes when price remains within bounds, breakout entries after buffered confirmation with stops back inside the range, opening-range breakout using a short lookback at session start, and conflu...

πŸ‘‰ Read | Signals | @mql5dev
πŸ‘7❀6
In 2001, MetaQuotes was only beginning to introduce algorithmic trading. The first version of MQL was remarkably simple: its entire description fit on a single small HTML page, and the language didn't even have loops or arrays.

Today, MetaTrader 5 is a full-fledged platform for trading and development:

βœ“ MQL5 with Python, ONNX, OpenBLAS, and Git-based Algo Forge storage.
βœ“ A powerful Strategy Tester and cloud computing network.
βœ“ An integrated AI Assistant that can write code, analyze markets, and execute multi-step tasks.

We dug through MetaQuotes archives, old forums, release notes, and algorithmic trading championship materials to reconstruct the journey β€” how, over 25 years, a trading terminal evolved into a powerful platform for algorithmic trading, application development, data analysis, and machine learning.

Read the full story of how MetaTrader and MQL evolved...
πŸ‘13πŸ”₯7❀3πŸ‘1
Rademacher functions are being evaluated as a practical tool for noisy, nonlinear market series where common filters and regressions can lose signal. Key limitations remain: the basis is incomplete and periods are constrained to powers of two, but linear trend components can still be captured with high accuracy.

A period-scaling tweak (order P with multiplier M) reduces sensitivity of higher-order terms, improving robustness to outliers. Using the resulting multi-level smoothing, price is partitioned into discrete levels that behave like support/resistance, with strength derived from the distribution of prices around each level.

Forecasting can be built from empirical PDFs/CDFs of Rademacher coefficients, including SMA range projection by treating SMA deltas as a first-order Rademacher series. A higher-level model pairs a Rademacher-based oscillato...

πŸ‘‰ Read | CodeBase | @mql5dev
❀18πŸ‘6πŸ‘¨β€πŸ’»4
A compact trading panel aggregates trend, momentum, volatility, carry, and upcoming macro events in one view. Sentiment is a technical proxy built from EMA, MACD, and Stochastic. Trend Riding reports direction plus stage (nascent, established, aging, reversal risk). Volatility/Breakout combines ATR, Bollinger squeeze percentile, and Donchian breakout state (testing, confirmed, false). Carry displays long/short swap, while News shows the next relevant calendar event.

Chart overlays include EMA fast/mid/slow, Bollinger Bands, and Donchian channels. Typical usage focuses on filtering: avoid ranges when SIDEWAYS or FALSE BREAK – FADE appears, avoid entries near high-impact events, and prefer positive-swap direction on H4/D1 when aligned with an established trend.

Limitations remain: no automatic entries/exits, sentiment is not COT/fundamentals, and calen...

πŸ‘‰ Read | VPS | @mql5dev
πŸ‘7❀5
Classical moving averages compress a window into one value and miss where the latest close sits within its own recent distribution. Bloch’s RMA ranks the current price inside a sliding window and outputs a fractile on a consistent [0,1] scale across instruments. This differs from Wilder-style β€œRMA” smoothing despite the shared acronym.

An MT5 port is structured as an engine indicator publishing multi-buffer outputs under a strict buffer-index contract, plus read-only panels and an EA. Core code computes SMA as local equilibrium, normalized deviations for window landmarks, then empirical fractiles for the current close and extremes.

A regime detector uses the window’s normalized-return range to classify expansion, contraction, and transition, feeding four cross-strategies implemented in the EA and validated in Strategy Tester.

πŸ‘‰ Read | Docs | @mql5dev
❀15πŸ‘9⚑1
MT5 EA Acceptance Harness is an MQL5 script that validates a bounded entry-state contract using deterministic synthetic fixtures. Eight scenarios are executed: valid closed-bar entry, duplicate signal bar, open-bar rejection, cooldown rejection, cooldown elapsed, no signal, daily lock, and new-day reset.

The report compares expected versus actual decisions and outputs a final pass/fail count. Optional outputs include writing a text report to the terminal Common\Files folder and printing results to the Experts log. The report file name is configurable.

The harness is isolated by design. It uses only synthetic case data, does not read market or account state, and never sends, modifies, or closes orders. Coverage is limited to the included state-transition examples and does not assess strategy quality, execution, profitability, or live-account behavior. Source...

πŸ‘‰ Read | Forum | @mql5dev
❀10πŸ‘4
A Kolmogorov-Arnold Network (KAN) is implemented in MQL5 as an interpretable next-bar predictor: instead of scalar weights and fixed activations, each connection learns a univariate curve. Those edge functions are modeled with cubic B-splines (De Boor–Cox recursion), making each edge linear in its coefficients.

Training becomes a deterministic ridge-regularized least-squares solve via Cholesky factorization, avoiding learning-rate tuning and gradient failures. The library is validated with unit tests (partition of unity, exact linear reproduction, fitting known functions, save/load roundtrip).

A shared feature pipeline converts bars into four normalized inputs (return, RSI, ATR/price, MA slope). The trained model runs as an indicator that plots both predictions and the learned curves, and as an EA tested out-of-sample with modest profit and contro...

πŸ‘‰ Read | AlgoBook | @mql5dev
❀14πŸ‘4πŸ‘¨β€πŸ’»2
Black–Scholes assumptions remain a weak fit for real markets: returns show fat tails, self-similarity across timeframes, and volatility clustering. These effects break independence assumptions and distort historical volatility estimates when news-driven outliers are included.

EA changes for long-option structures: add level-based expiration with a switch and an integer target level. When the rebalancing level reaches the specified number, positions are closed and trading pauses until the next day, subject to liquidity constraints in live venues.

Historical volatility is recalculated adaptively by selecting a window (3–40 days) that minimizes median absolute error versus realized daily ranges, using medians to suppress tail impact.

Written-option risk is capped by adding long wings, forming Short Straddle/Strangle Butterfly variants. Extra strikes and norma...

πŸ‘‰ Read | Signals | @mql5dev
❀20πŸ‘8
LightGTS forecasting is extended into a practical MT5/OpenCL pipeline by turning periodic patching into GPU-generated tokens. Dominant periods are detected via FFT, then each series is split into a fixed token count; patch length follows the current cycle while overlap preserves full coverage without dynamic allocation.

Instead of recomputing projection weights with a pseudoinverse when window sizes shift, a maximum-size weight matrix is kept and unused taps are masked via zero padding. This keeps memory layout stable while adapting to drifting market periodicity.

Three OpenCL kernels complete training: forward adaptive convolution per token, input-gradient accumulation that handles overlapping patches, and an Adam-based weight update over window/filter/channel dimensions. Result: frequency-aware embeddings suitable for Transformer blocks with predic...

πŸ‘‰ Read | Freelance | @mql5dev
❀14πŸ‘11⚑2
False breakouts often hit stops placed at obvious support or resistance. This is amplified by crowding: many traders see the same levels, and liquidity is concentrated around them.

A proposed approach overlays a prime-number density heat map onto price. Prices are converted to integers via a multiplier, then prime counts are computed within a radius using a cached Sieve of Eratosthenes. High density zones are marked blue, low density zones red.

Backtests over five months across FX, crypto, and commodities reported 55–58% alignment between blue zones and reversals versus a ~35% random baseline, with similar behavior across instruments. The tool is positioned as a context filter, not a standalone signal generator.

πŸ‘‰ Read | VPS | @mql5dev
❀22πŸ‘5
CPortfolioAnalyzer is extended beyond basic equity and correlation views to address multi-EA risk visibility and operational controls. Key additions include a strategy-level Drawdown Timeline Heatmap that logs peak-to-exit drawdowns per trade, plus a monitoring loop that enforces user thresholds without blocking the terminal UI.

A mitigation engine adds escalating actions: close positions and delete pending orders, persist strategy blocks via terminal Global Variables, or disable terminal AutoTrading through Windows API messaging. Export is upgraded with detailed CSV plus a styled multi-worksheet Excel XML workbook written directly from MQL5.

A hybrid MQL5-Python pipeline bypasses WebRequest sandbox limits by generating a temp CSV and a standard-library Python script, executing asynchronously via ShellExecuteW, and polling results on OnTimer. Retur...

πŸ‘‰ Read | AlgoBook | @mql5dev
❀10πŸ‘3