MQL5 Algo Trading
488K subscribers
3.08K photos
3.09K 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
An indicator module that auto-plots Fibonacci retracement and extension levels from the latest ZigZag swing high/low. Levels refresh automatically when new swing points are confirmed, keeping the grid aligned with current structure.

Supported ratios include 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%, 127.2%, and 161.8%. Each level can be enabled or disabled independently, with optional price labels per level. A ZigZag connector line can also be shown for context.

ZigZag parameters are configurable via depth, deviation, and backstep. Computation is optimized to process only on new bars, reducing redundant recalculation. Fibonacci ratios remain a core reference set for harmonic-pattern workflows.

πŸ‘‰ Read | VPS | @mql5dev

#MQL4 #MT4 #Indicator
❀36πŸ‘3πŸ‘Œ3πŸ’―2🀩1
Swap carry is often treated as background noise in intraday systems, but it can represent a sizable hidden cost, including triple charges midweek. On some symbols, a positive swap can offset spread and commission over time, making outcomes more predictable than direction-only trading.

Classic swap locking uses two accounts with different swap tables on the same instrument, holding opposing positions. Best cases have positive swap on both sides; profit remains forecastable but still requires balance management between accounts.

A more technical extension uses synthetic positions derived from correlated pairs (for example, EURJPY as EURUSD plus USDJPY) to replicate exposure while targeting different swap profiles. A utility concept is outlined: parse Market Watch symbols, normalize naming, build currency graphs, and search bounded-length β€œswap polygo...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀59✍8πŸ‘Œ3😁1
During optimisation in the Strategy Tester, some passes may crash due to insufficient memory. A practical approach is to identify β€œemergency” passes and correlate them with input parameter combinations, but manual analysis becomes unreliable when an Expert Advisor has many variants and non-linear allocation patterns.

A lightweight helper library can record memory consumption over time during a pass, making it easier to spot configurations that trigger abnormal growth. In a minimal example, an EA that repeatedly grows an array produces a clear, repeatable memory profile, and the top parameter set can be reproduced in a single run.

This enables targeted debugging of parameter sets with excessive allocations. Lower memory usage also increases optimisation capacity by allowing more testing agents to run in parallel, improving overall throughput.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #EA
❀29πŸ‘1
DoEasy chart object collection received a maintenance update after issues were found when adding indicator windows to the main chart window. The model remains: each chart maps to a chart object, containing window objects and indicator objects, with at least the main window present.

Library support files were extended with new message indices and configuration for screenshot/template storage. Screenshots target Terminal\MQL5\Files\DoEasy\ScreenShots\ with default .gif/.png/.bmp handling, while templates target Terminal\MQL5\Profiles\Templates\DoEasy\. A helper generates stable, time-based filenames with optional extra data for uniqueness.

Chart/window navigation and coordinate conversion were added using ChartXYToTimePrice and ChartTimePriceToXY, including per-window cursor coordinate storage and relative Y calculations. Indicator list refresh now compare...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Indicator
❀57πŸ‘12
A digital filter variant based on Hann windowing is available with an adjustable β€œspeed up” factor that changes responsiveness without altering the selected period.

With the speed up factor set to 0, output matches the baseline filter. Any value above 0 increases reaction speed. A comparison at the same period shows a visible difference between the default output and a configuration using speed up factor 5.

Operational guidance remains consistent with standard smoothing filters and moving averages. Higher speed up values reduce lag but typically reduce smoothness and can amplify short-term fluctuations.

Parameter selection is best handled through testing: increase speed up until responsiveness is acceptable, then back off if noise and instability become excessive.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀24πŸ‘5πŸ‘Œ1
Efficient MT5 development starts with a clean project layout: keep Experts, Includes, Scripts, and Files in per-project subfolders. This keeps search scoped, makes Git tracking straightforward, and allows fast copying between demo and real terminals.

Avoid duplicated sources across terminals by relocating the MQL5 folder into a central projects directory and using a Windows symbolic link. One codebase then serves multiple terminals without manual sync.

Treat MQL5 like any professional codebase: use Git with a focused ignore list, commit frequently, and push to a remote for history and recovery. Debug on a separate demo terminal, release only compiled binaries to real accounts, and batch-compile all modules to catch interface drift early.

Improve diagnosis with targeted log extraction, external log review with highlighting, and regex-based contextu...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀75πŸ‘Œ2
A Bid-Ask Profile Dashboard for MT5 demonstrates building a real-time microstructure visualization panel directly on an MT5 chart using the standard ChartObject GUI framework.

The indicator monitors live Bid and Ask ticks, tracks consecutive price changes, and converts short sequences of directional movement into a market-pressure histogram. A lightweight buffer stores recent updates, while trend-strength logic applies decay to reduce the impact of older moves.

The interface is fully custom and includes color-coded buy vs sell pressure, dynamic histogram bars, and a close button for quick removal. Updates are tick-driven to keep redraw overhead low.

The code illustrates practical patterns for MQL5 dashboard construction, efficient buffer management, reusable GUI helpers, and real-time component updates suited to tick-level analysis.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Indicator
❀42πŸ‘Œ5
Combining Moving Average trend direction with Average True Range can improve trade timing by aligning entries with prevailing momentum and current volatility.

Pivot Point levels add structured support and resistance zones that can be used to validate breakouts, fades, and stop placement around nearby levels.

Take Profit and Stop Loss lines help convert analysis into defined execution rules. Targets can be set to reflect ATR-based ranges, while stops can be placed beyond invalidation points to reduce noise-driven exits.

Market regime changes, scheduled news, and liquidity conditions should be evaluated before relying on static levels. Consistent position sizing and adherence to a written plan remain central to risk control.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Strategy
❀36πŸ‘Œ3
An Inside Bar detection indicator is available for highlighting consolidation candles directly on the chart. The pattern is identified when the latest closed candle’s high and low remain fully within the prior candle’s range.

Detected Inside Bars are marked by applying a configurable candle color, allowing quick visual scanning across timeframes. This can be used to track compression zones that may precede directional expansion, without adding additional chart objects.

Alerting is optional and can be enabled per preference. Supported notifications include terminal popup alerts and mobile push notifications when a new Inside Bar forms on the most recently closed bar.

Key inputs: InsideBarColor, FireAlerts, EnablePushNotification, EnablePopupAlert.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Indicator
❀28πŸ‘Œ4πŸ‘3
Neuro-Structural Trading Engine is a multi-account MT5 framework for crypto CFD prop accounts built to prevent three common failure modes: oversized ATR stops, account-switch side effects, and chop-induced death by a thousand cuts.

Risk control is enforced with fixed-dollar stops: lot size is computed from tick size/value so each trade can’t exceed a strict $1 loss cap, independent of volatility. The EA adds partial profit taking at 50% of target, then moves the remainder to breakeven, plus rolling stop logic and hard daily/max drawdown halts for prop rules.

Reliability comes from process isolation: one Python β€œBRAIN” per account, each tied to its own MT5 terminal to avoid the singleton login issue. Signals are generated in Python (LSTM + 8 normalized features) and gated by a compression-ratio regime filter that blocks choppy markets, then execute...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀25πŸ‘4πŸ‘Œ4
Linear tools mis-handle accelerating moves, rounded reversals, and S-shaped trends, producing lagging channels and unstable signals. Manual fixes such as timeframe switching or visual adjustments remain subjective and hard to automate across instruments.

A polynomial regression channel formalizes curvature modeling by fitting a polynomial over a configurable lookback and constructing upper/lower bands from the standard deviation of residuals. Key runtime parameters include degree, period, and deviation multiplier, with input validation for insufficient data and underdetermined fits.

An MQL5 implementation can rely on ALGLIB for numerically stable least-squares fitting and polynomial evaluation. Efficiency targets include updating only the newest bar per tick and using an unbiased residual volatility estimator, yielding a reusable component suitable f...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Indicator
❀29πŸ‘Œ3✍2🀩2
DUET dual clustering for multivariate time series continues with the channel clustering module, aligned for financial forecasting workloads. The pipeline keeps normalization/outlier removal, temporal clustering, and a fusion stage based on masked attention.

Channel clustering is implemented in the frequency domain via FFT. A simplified metric replaces Mahalanobis distance with pairwise distances between amplitude spectra, producing a normalized [0,1] relationship matrix and an inverted distance mask to suppress weak dependencies without backprop.

The OpenCL MaskByDistance kernel computes channel-to-channel distances, performs per-workgroup max reduction for normalization, and writes the masking matrix. The host side adds CNeuronChanelMask with static FFT buffers and a feedForward-only path.

The DUET block (CNeuronDUET) runs temporal and channel modules ...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀47πŸ†6πŸ”₯3πŸ‘Œ3πŸ€“3✍2
Common digital filter windows used in signal processing include Hanning, Hamming, Blackman, and Blackman-Harris. These windows are typically applied to reduce spectral leakage and shape frequency response when designing FIR filters or performing FFT-based analysis.

Alongside these, several moving-average variants can function as simple digital filters: rectangular (simple moving average), linear weighted moving average, and triangular moving average. Despite their simplicity, they provide low-pass smoothing behavior and can be evaluated with the same criteria as other smoothing filters.

Operational guidance remains straightforward: treat these filters as moving averages, validate lag versus noise reduction, and select parameters based on the target signal dynamics.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀35πŸ‘8πŸ€”4🀨3πŸ‘Œ2πŸŽ‰1
Combination scalping is presented as a filtering method for automated trading systems based on a key variable: trade expiration time. The same entry rule can produce stable losses at one duration and stable profits at another, with results scattered across history.

The implementation tests a fixed entry setup across many expirations and take-profit distances, then keeps only the candlestick-measurement combinations that never produced losses for a given expiration. Measurements are reduced to pip-based body length and direction across a small window of preceding bars.

Constraints are operational and data-related: processing can reach billions of iterations, databases require periodic recalculation, and results are broker- and instrument-specific. Forex quote precision changes around 2009 reduce usable history, limiting robustness beyond intraday, small-dista...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Scalper
❀72✍6πŸ‘Œ6
An indicator measures current bar volatility against the previous 100 bars using standard deviation. This provides a normalized view of whether the latest move is statistically elevated or within typical range.

The output can be used as a quantitative filter for trade entry and exit, for example by requiring volatility to exceed a defined threshold before acting, or by reducing exposure when readings compress.

The same data stream can be used to flag divergences between price action and the volatility metric, helping identify situations where price extends while volatility confirmation weakens.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL4 #MT4 #Indicator
❀29⚑6πŸ‘Œ2πŸ‘€2
VR RSI Robot is an MT5 expert advisor using RSI with multi-timeframe confirmation. Signals from H1 are validated against D1 to reduce false entries and align trades with stronger directional bias.

Entry rules are strictly defined and based on completed candles to avoid redraw. Buy requires RSI on both H1 and D1 to be above the oversold level (default 20), with the current RSI higher than the previous value. Sell requires RSI on both timeframes to be below the overbought level (default 80), with the current RSI lower than the previous value.

Position handling follows a one-position-per-symbol model using a magic number. If an opposite signal appears, the existing position is closed and a new one is opened in the latest direction.

Lot sizing is normalized at initialization by rounding to the broker’s volume step and enforcing the minimum volume, supporting consis...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL4 #MT4 #EA
❀29πŸ‘Œ5πŸ‘4
ExMachina Supply & Demand Zones v2.0 updates an MT5 indicator for automatic supply/demand zone mapping using impulse detection filtered by ATR. The scan covers the last 1000 bars and marks the base candle preceding a qualified directional move, then rates each zone by strength, freshness, and touch count.

Impulse qualification now supports multi-candle windows (default 3 bars). Range or body can be summed across 2–3 candles and compared to ATR; moves at or above 1.0x ATR are flagged, capturing sequences missed by single-candle logic. Nearby same-type zones can be merged to reduce overlapping rectangles.

Operational features include touch tracking, nearest fresh-zone distance in a dashboard, and two alert types: touch (entry into a fresh zone) and proximity (default 50 points). An optional dark chart theme and visual controls (midline, extension, fres...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀30πŸ‘Œ7πŸ”₯4πŸ‘2πŸ†2
VR Rsi Robot for MetaTrader 5 trades RSI with multi-timeframe confirmation: H1 signals are validated by D1 using closed candles to avoid redraw. It holds one position per symbol, flips on opposite signals, and auto-adjusts lot size to broker limits.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀29⚑9
As codebases grow, call chains become harder to track, changes start touching multiple places, and maintenance becomes risky when context is missing. Structured separation is one practical response, and MVC remains a baseline approach.

Classical MVC splits responsibilities into Model (data and rules), View (presentation), and Controller (events and orchestration). Components stay decoupled via interfaces, limiting direct state changes and keeping responsibilities explicit.

For indicators, View maps cleanly to buffers and rendering, Model to calculation, Controller to handlers and inputs. For Expert Advisors, View aligns with order/position execution and reporting, while Model covers signals, sizing, and risk logic.

MVC adds overhead in trivial scripts, but pays off once projects span many files, multiple UI outputs, external data sources, or parallel deve...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #MVC
❀52πŸ‘6πŸŽ‰3πŸ’”3😁2🀑2πŸ‘Œ1
High-Performance JSON v3.5.0 targets low-latency JSON workloads in MT5 environments running LLM function-calling flows. Community JSON libraries showed two recurring constraints: frequent allocations and high serialisation latency, with recursion and temporary strings causing terminal stalls under load.

The library is rebuilt around a zero-allocation approach: parsing uses a tape backed by a contiguous long[] buffer, with direct serialisation into uchar[] to reduce intermediates. It adds hybrid numeric parsing using long accumulation and static Exp10 lookup tables, an iterative state machine to avoid recursion and stack overflow, plus SWAR scanning to process 8 bytes per cycle when skipping whitespace and long strings.

On x64 hardware with a 50,000-node payload, benchmark results report 137 ms parse vs 1540 ms, 264 ms serialisation vs 568 ms, and 401 ms ...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AI
❀18⚑2πŸ‘Œ2πŸ‘€2πŸ‘1
Part 25 extends an MQL5 3D binomial viewer into a multi-distribution plotting module. Supported models include Poisson, normal, Weibull, gamma, and additional discrete and continuous families, with a header icon used to cycle types at runtime.

The design relies on a distribution enum and a single dispatch function that routes sample generation, histogram building, density computation, and UI labeling. Adding a new model becomes an enum entry plus a loader function.

Implementation details include per-distribution input groups, dedicated loaders that standardize seeding, sampling, binning, scaling to theoretical peaks, and statistics. Continuous histograms have forced-range variants for heavy tails (notably Cauchy). Titles, axes, and parameter panels update based on the active type.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀22