MQL5 Algo Trading
494K subscribers
3.17K photos
1 video
3.17K 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
A common rule-based approach in indicator-driven trading uses arrow signals for entries and a central reference line for exits on an existing position.

An arrow is treated as a directional trigger to open a long or short trade. The middle line is then used as the close condition, typically when price crosses it or when the indicator state returns to neutral.

This setup separates entry logic from exit logic and can reduce churn from frequent signal flips. Practical use still requires clear definitions for confirmation, stop-loss placement, and behavior during ranging markets, since both arrows and midline crosses can lag or repaint depending on implementation.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Strategy
❀23✍3πŸ‘Œ3πŸ‘2
XANDER Pulse Candles colors price bars using an internal RSI-based momentum oscillator (period 14 by default), removing the need for a separate oscillator pane and keeping bias visible on the main chart.

Color states map momentum and candle direction: Spring Green signals strong bullish bias (momentum above threshold with a bullish close). Deep Sky Blue marks weak bullish bias (momentum bullish with a bearish close). Orange Red signals strong bearish bias (momentum below threshold with a bearish close). Orchid marks weak bearish bias (momentum bearish with a bullish close). Dim Gray indicates neutral conditions.

Three modes are provided: center-line (above/below 50), extreme zones (overbought/oversold activation), and direction (rising/falling momentum). Usage notes include tracking consecutive strong-bias candles, treating mixed colors as fade warnings, ...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀30πŸ‘3πŸ‘Œ3
DoEasy library update adds two blocks: a DOM snapshot series collection and initial support for MQL5.com Signals objects.

DOM work is consolidated via CMBookSeriesCollection, storing per-symbol CMBookSeries lists with bounded history, auto refresh on BookEvent, lookup by symbol, and access to snapshots by index or millisecond timestamp. Engine.mqh is extended with the new collection, helpers, and an OnBookEvent handler that routes updates to the correct symbol series.

A new β€œother library classes” section starts with CMQLSignal, modeling a single signal source. It defines integer/double/string property enums, sorting criteria, and wrappers over SignalBaseGet* and SignalInfoGet* for retrieval, comparison, and selection workflows.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀39πŸ‘Œ6πŸ‘5🀑3✍2
Directional retail systems often concentrate on forecasting price moves, leaving exposure to macro surprises. A common workaround is using correlation between pairs, but correlation is not tradeable by itself. Assets can remain highly correlated while the spread keeps widening, producing persistent drawdowns.

Institutional stat-arb focuses on cointegration and market-neutral positioning, where the spread between linked assets is expected to mean-revert. A practical implementation is tracking a spread Z-score rather than predicting direction.

Key mechanics: logarithmic spread via ln(A) minus ln(B) to normalize scale and volatility differences, rolling Z-score to quantify deviation in standard deviations, and time-series synchronization to align both instruments even with gaps in broker data.

Execution: select a cointegrated pair, wait for Z-score extr...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #StatArb
❀21⚑7πŸŽ‰1πŸ‘Œ1
PrecisionSniper is an MT5 indicator that generates long/short signals from a weighted, multi-condition scoring model. Up to eight checks run per bar, and a signal prints only when the total meets a configurable minimum. Outputs are graded A+, A, B, or C, with filters to suppress lower grades and a cooldown to reduce clustering.

Core inputs combine three EMAs (fast/slow/trend) with RSI momentum, MACD histogram expansion, ADX strength with DI alignment, VWAP position, tick-volume surge, and an optional higher-timeframe EMA bias. HTF bias carries the highest single weight and can be used to force alignment with the larger trend.

Trade visualization is built in: entry, structure-based or ATR-based stop, three risk-reward targets, and a ratcheting trailing stop that advances at TP milestones. An on-chart dashboard shows current regime and a historical sig...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀27✍6πŸ‘3πŸ‘Œ2
This article extends the DoEasy MQL5 DOM toolkit by introducing two core abstractions: a Depth of Market snapshot object and a per-symbol snapshot series. Each OnBookEvent() call pulls MqlBookInfo via MarketBookGet(), converts entries into typed order objects, and stores them inside a snapshot container built on CArrayObj.

A key enhancement is adding a millisecond timestamp property to every DOM order, enabling consistent time-based search and sorting across snapshots even though MqlBookInfo has no native time field. The Select service is updated to support these new criteria, and order descriptions gain optional symbol output to avoid redundancy inside snapshot logs.

The snapshot series class acts like a real-time timeseries: it only accumulates live data, enforces a configurable max size (default 200k), and supports retrieving snapshots by times...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀46πŸ‘Œ3πŸ‘2
The December 2021 TASC article β€œThe DMH: An Improved Directional Movement Indicator” outlines John Ehlers’ update to classic directional movement by applying Hann windowing.

Directional movement has been used in technical analysis for decades. The original formulation by J. Welles Wilder was constrained by the compute limits of its era, which favored simpler calculations. Ehlers argues that current tooling makes a more modern implementation practical.

DMH typically defaults to Wilder’s 14-bar setting, but the period is treated as a parameter that can be selected by the trader or optimized when embedded in a systematic strategy.

This version adds optional visual states: color shifts on slope change, on zero-line crossover, or no color changes to match the classic presentation. Period sensitivity testing is recommended before using DMH-derived signals.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Indicator
❀25✍3πŸ‘Œ3πŸ”₯2πŸ‘1
L1 trend filtering targets trend extraction while suppressing noise and automatically detecting slope breakpoints. The output is piecewise linear, which avoids the lag and slope blurring typical for moving averages and the Hodrick–Prescott filter.

The method is formulated as convex optimization with an L1 penalty on second differences. Sparsity in Dx forces most curvatures to zero, leaving a small set of structural breakpoints. The regularization parameter Ξ» controls segment count; at Ξ»β‰₯Ξ»max the result becomes strictly linear.

Practical MQL5 implementation includes Ξ»max computation, relative tuning via Ξ»=coefΒ·Ξ»max, and linear-time filtering. Delivered components cover trend and slope indicators, multiple residual-volatility variants, and testing hooks for MA, MACD, ADX, and EMA signal filtering.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀23πŸ‘Œ3πŸ‘1
Local voice control for MetaTrader 5 can be built without cloud APIs or fragile file polling by combining offline speech recognition with localhost HTTP.

The design splits into three simple processes: a Python listener using Vosk with a restricted grammar and wake-word gating, an MQL5 EA that polls GET /command via WebRequest and executes BUY/SELL/CLOSE actions, and a separate Flask TTS server that speaks confirmations through Windows System.Speech.

Key engineering choices improve reliability: command delivery is one-shot (served then cleared), wake phrase + next-utterance prevents accidental trades, and TTS uses a queued worker so the EA never blocks. Result: low-latency, bidirectional β€œspeak-trade-confirm” interaction suitable for hands-free trading and rapid setup execution.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #AITrading
❀24πŸ‘Œ3πŸ‘1
Manual account audits in MT5 often mean jumping between history tabs and spreadsheets, with no persistent view on the chart. This article treats the problem as UI engineering: building an Account Audit dashboard as a custom MQL5 indicator that stays compact, readable, and non-intrusive.

The indicator is structured for maintainability: named constants, a single metrics struct (balances, net profit, trades, wins/losses, win rate, withdrawals, composite rating), and small UI helpers to assemble rect-label blocks, text labels, and a star-based rating.

A key design fix is workflow safety. The dashboard can be shown/hidden via a button handled in OnChartEvent, restoring one-click trading when hidden to avoid terminal interaction conflicts. The calculation engine is intentionally deferred; OnCalculate remains empty, leaving a clean plug-in surface for later...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀24πŸ€“3πŸŽ‰2πŸ‘Œ2πŸ‘1
The December 2021 TASC article β€œThe DMH: An Improved Directional Movement Indicator” by John Ehlers outlines an updated approach to directional movement using Hann windowing. Directional movement has been widely used for decades, and the original formulation by J. Welles Wilder was constrained by the practical computing limits of its time.

DMH keeps a default length of 14 bars to mirror Wilder’s common setting, but the article argues for making period length configurable. When used inside a rule-based strategy, parameter selection can be handled via optimization rather than convention.

This implementation adds optional visualization behavior beyond the original: color changes on slope shifts, color changes on zero-line crosses, or no color changes for a classic presentation. Period testing is recommended before relying on any signal behavior.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Indicator
❀21πŸ‘1πŸ‘Œ1πŸ’”1
Google Research’s TimesFM, accepted at ICML 2024, applies the foundation-model workflow to forecasting. It is a 200M-parameter decoder-only transformer pretrained on 100B real-world time points, with strong zero-shot results across domains.

A practical setup targets trading: fine-tune TimesFM 2.5 on OHLCV using PEFT/LoRA, keeping trainable weights near 100K by adapting only the last 2 of 20 layers. This reduces overfitting risk on non-stationary series.

An end-to-end MT5 pipeline exports 14 instruments, builds covariates (sessions, economic events, moon phase, technical proxies), fine-tunes, then produces probabilistic forecasts (q10/q50/q90). Results are exported back to MT5 as CSV and rendered via an MQL5 indicator with confidence bands.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #TimesFM
❀23πŸ‘2πŸ‘Œ2
Media is too big
VIEW IN TELEGRAM
We've released a new video demonstrating how to significantly speed up Expert Advisor optimization in MetaTrader 5.

The Strategy Tester lets you run multiple optimization passes in parallel by utilizing all available CPU cores. Instead of testing parameters sequentially, you can distribute the workload and discover the most profitable settings much faster. For even greater performance, connect to the MQL5 Cloud Network. Tens of thousands of cores can reduce optimization time from hours to just minutes.

In this three-minute video, you'll learn how to:

βœ“ Configure optimization modes (full search and genetic algorithm)
βœ“ Define testing parameters and input ranges for your Expert Advisor
βœ“ Connect to the MQL5 Cloud Network and run optimizations in the cloud
βœ“ Monitor progress, costs, and results in real time
βœ“ Analyze results and identify the best-performing parameters
βœ“ Earn by contributing your own computing resources

Comment the video:
πŸ‘‰ MQL5.community for traders
πŸ‘‰ MetaQuotes official YouTube channel
❀14πŸ‘Œ2πŸ‘1
This article demonstrates how to turn MetaTrader 5 into a lightweight visualization runtime using the MQL5 canvas, not indicator buffers. The focus is rendering a parametric butterfly curve with a clean math-style presentation inside a draggable, resizable floating panel.

Key techniques include supersampling via an offscreen high-resolution canvas and manual downsampling with per-pixel ARGB averaging for smooth anti-aliased curves. The plot adds a gradient background, axis grid with readable tick generation, rotated labels, and a four-segment color legend to show how the curve builds over 0..12Ο€.

The implementation also covers practical UI mechanics: hit-testing header and resize zones, clamped resizing to chart bounds, synchronized layer updates across multiple canvases, and redraw orchestration for responsive in-terminal tools.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #AITrading
❀15πŸ‘Œ2πŸ‘1
Market Entropy Indicator logic has been formalized into an MQL5 Expert Advisor to remove manual monitoring issues such as inconsistent interpretation and late capture of compression-to-expansion transitions.

The EA computes fast/slow/base Shannon entropy from up/down/flat bar states on every tick, then derives divergence, momentum, regime (trend/transition/chaotic), and compression/decompression states. Signals come from entropy crossovers with momentum and regime filters, plus compression breakout and decompression-end triggers.

Execution is deterministic and parameterized: LotSize, SL/TP, MagicNumber, MinSignalGap, optional reverse-on-opposite-signal, and retry logic. It renders arrows and regime labels, enforces one trade per bar, supports daily resets, and logs all actions for Strategy Tester and live validation.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #EA
❀14⚑2πŸ‘2πŸ‘Œ2
HSIC (Hilbert-Schmidt Independence Criterion) answers a core algo-trading question: do features truly relate to the target, beyond out-of-sample hope. Unlike Pearson correlation, HSIC detects both linear and non-linear dependence using kernel similarity matrices, working with scalars or high-dimensional vectors without explicit joint distribution modeling.

The article implements HSIC in MQL5 with an RBF (Gaussian) kernel, including practical sigma selection via a median-distance heuristic and efficient distance computation in matrix form. Significance is handled two ways: an exact permutation test (accurate but costly) and a gamma approximation (much faster, best for large datasets).

A synthetic trading-style example shows HSIC recovering a non-linear dependency where correlations are near zero, making it useful for feature screening and subgroup testing before...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #HSIC
❀39✍2πŸ‘2πŸ‘Œ2⚑1🀯1πŸ‘€1
An experimental CCI-style indicator modifies the original CCI calculation, producing substantially different absolute values. As a result, fixed threshold usage typical for classical CCI becomes unreliable.

To address this, dynamic levels are added using a Donchian-channel-like approach, allowing context-aware bounds that adapt to recent ranges.

Multiple average types are supported for the core computation and for optional price smoothing. The smoothing layer can act as a signal filter without adding material lag.

Operational guidance centers on using color-state changes as signal events. Side-by-side comparisons with classical CCI show that while numeric outputs differ, relative behavior such as slopes and turning points remains broadly consistent.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀15πŸ‘3πŸ†2πŸ‘Œ1
Camel Algorithm (CA) is a bio-inspired optimizer proposed in 2016 by Mohammed Khalid Ibrahim and Ramzy Salim Ali. It models temperature as stochastic pressure, supply depletion, endurance decay, oasis-based resource reset, and population-level information sharing.

A reference C_AO_CAm implementation keeps per-agent temperature, supply, endurance, and step counters. Iterations update factors, move agents via random-walk dynamics biased by the current best, revise the best candidate, and optionally apply an oasis effect when fitness improves.

A modified variant changes β€œdeath” handling to per-dimension resets and replaces uniform reinitialization with Gaussian sampling around the best solution to focus sampling near promising regions.

In reported tests, the original CA reached a maximum score of 32.56% in the benchmark table.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #algorithm
❀14πŸ‘Œ2πŸ‘1
This article shifts from 1D quote series to image-based market representation, encoding price, indicators, oscillators, and candlestick anatomy into 128x128 multi-channel frames. The goal is to let CNNs detect chart structures as visual textures rather than isolated numbers.

The model uses three parallel convolution paths (short-term moves, longer trends, volatility/momentum), then applies attention to suppress noise and emphasize decisive regions. A bidirectional LSTM adds temporal context, and multi-task training predicts both direction and move magnitude.

A key contribution is interpretability: attention heatmaps and neuron activation analysis expose what drove a signal (reversal zones, RSI/price divergences). RobustScaler, Gaussian blur, and training callbacks improve stability, with a roadmap toward multimodal news+macro inputs, multi-timefra...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AITrading
❀26🀣2πŸ‘Œ1
In MetaTrader 5 build 5830, we've significantly improved the built-in help system:

β€’ Optimized colors in the dark theme for better readability.
β€’ Improved the size of the navigation sidebar.
β€’ Added the ability to undock the help window in MetaEditor.
β€’ Added support for copying text via the context menu and Ctrl+C.
β€’ Added the ability to adjust text zoom: hold Ctrl and scroll the mouse wheel, or use the context menu.
β€’ Added navigation between previously viewed sections using Alt + Left/Right Arrow.
β€’ Added the ability to print pages using Ctrl+P.

In addition, the update improves the display of certain interface elements in the dark and fixes an issue to ensure the "Use system colors" option in Market Watch is correctly applied after restart.

Discuss the update...
❀37πŸ‘4