MQL5 Algo Trading
575K subscribers
4.47K photos
7 videos
4.48K 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
Static prompts in LLM-driven Expert Advisors fail because market regimes change faster than manual prompt iteration cycles.

Metaprompting treats the prompt as a trainable component. A separate optimizer LLM generates prompt revisions, tests them against realized trade outcomes, and promotes the best version to production.

A practical architecture splits responsibilities: an execution agent returns BUY/SELL plus confidence from OHLCV and indicators; an evaluator converts closed-trade results into metrics (directional accuracy, profit factor, R-multiple, flat rate); a meta-LLM updates the prompt on schedule or when metrics degrade. MQL5 can call a local Python service over WinHTTP without third-party DLLs.

Example backtest (EURUSD M15, Mar–Apr 2026) showed 99 trades, 1.35 profit factor, 2.77 Sharpe, and low drawdown, with limits noted around data l...

πŸ‘‰ Read | VPS | @mql5dev
πŸ‘11🀩7❀6πŸ”₯4πŸ‘Œ1
A multi-indicator trading strategy combines RSI, Parabolic SAR, Heiken-Ashi, Stochastic, CCI, Williams %R, and Bulls/Bears Power to align trend, momentum, and reversal signals.

Trend filtering is typically handled by Heiken-Ashi candles and SAR direction. Momentum confirmation can be taken from RSI and Stochastic crossing key levels, while CCI and Williams %R help detect overbought/oversold conditions and short-term exhaustion.

Bulls and Bears Power are often used to validate whether buyers or sellers are gaining control, reducing reliance on any single indicator. Practical implementation usually requires strict entry rules, a volatility-aware stop, and limits on conflicting signals to avoid overfitting.

πŸ‘‰ Read | AppStore | @mql5dev
πŸ‘17❀12🀩5πŸ”₯3πŸ‘Œ1
The Pro version targets development teams that require tighter control over execution and a broader toolset for building, testing, and deploying automated trading logic.

Key additions typically include advanced debugging and profiling, richer configuration for strategy parameters, and extended options for managing data feeds and symbol specifications. Deployment workflows are expanded with more granular environment separation and improved logging for incident review.

Licensing is generally structured for commercial usage, with clearer terms around redistribution, support coverage, and long-term maintenance. Suitable for production setups where reproducibility, auditability, and predictable updates matter.

πŸ‘‰ Read | Forum | @mql5dev
πŸ‘11πŸ”₯8❀7🀩4✍1πŸ‘Œ1
MultiIndicatorDivergence adds a compact divergence panel that aggregates signals across timeframes, from M1 through monthly.

The panel compares price action against multiple indicators to flag disagreements commonly used as early reversal warnings. Each cell represents an indicator such as RSI, MACD, plus additional oscillators.

Color output is simplified: green indicates potential upward pressure, red indicates potential downward pressure, and dark indicates no actionable divergence at the moment. A higher count of the same color suggests broader indicator alignment.

Layout includes six columns covering the current bar and the prior five bars, enabling quick verification of whether divergence is emerging, persisting, or fading. This is a decision-support aid and does not replace risk controls.

πŸ‘‰ Read | Signals | @mql5dev
πŸ‘18❀12🀩6πŸ”₯4✍1πŸ‘Œ1
CNewsFilter provides a single decision point for EAs: whether the current time falls into a configured news blackout window. It reads the built-in MT5 economic calendar, filters by selected currencies and minimum importance, and blocks trading minutes before and after each release.

Integration focuses on a small API: SetCurrenciesFromSymbol(symbol) for base/profit/margin currencies, or SetCurrencies("USD,EUR"). Use SetImportance(low/moderate/high) and SetWindow(before, after). IsNewsTime() returns true inside the window. CurrentEvent() and NextEvent() expose event name, currency, and time for UI panels. Total() and Event(i) return the loaded events sorted by time. SetRefresh(seconds) and SetLookAhead(hours) control cache refresh and horizon.

Operational notes: no web requests, DLLs, or terminal permissions. Times are trade-server time (TimeTradeServer()). O...

πŸ‘‰ Read | VPS | @mql5dev
πŸ‘22❀10πŸ”₯8🀩7πŸ†2πŸ‘Œ1
Expert Advisors tag trades with a magic number. Magic Number Scorecard groups closed account trades by magic number to produce one result line per EA; magic 0 represents manual trading. This provides a fast view of which systems generate net results versus volume.

Per magic number, the report includes trades, wins, losses, win rate, gross profit, gross loss, profit factor, net profit, average trade, best and worst trade, maximum drawdown based on the closed-trade equity curve, and symbols traded. Rows are sorted by net profit.

Counting rules: one trade equals one closed position. All related deals are aggregated, including profit, swap, commission on entry and exit, and fees. Partial closes still count as one trade. Ownership is taken from the opening deal’s magic number, so manual closes remain attributed to the originating EA. Open or partially open positio...

πŸ‘‰ Read | Freelance | @mql5dev
πŸ‘17πŸ”₯8❀7🀩6πŸ‘Œ3πŸ‘¨β€πŸ’»1
MTF Trend Context [Vian] is a compact MT5 panel that reports trend state across five selected timeframes and summarizes alignment as ALL BULLISH/BEARISH, MOSTLY BULLISH/BEARISH, or MIXED.

Trend classification uses a single EMA rule per timeframe: Bullish when Close > Fast EMA > Slow EMA, Bearish when Close < Fast EMA < Slow EMA, Neutral otherwise. Default EMA lengths are 20 and 50, both configurable with Slow required to remain greater than Fast.

Each row is evaluated on the most recently closed bar of its own timeframe (shift 1), avoiding the current forming candle. Data readiness is validated before display; missing history or incomplete EMA calculations are shown as N/A rather than inferred.

Presets cover Scalping, Intraday, and Swing, plus a five-timeframe Custom set. If any row is N/A, alignment is not upgraded and remains MIXED with a count of...

πŸ‘‰ Read | Freelance | @mql5dev
πŸ‘15❀5πŸ”₯4🀩4
A risk-check script estimates worst-case gap losses for all open positions ahead of weekend or holiday closures. It sums the projected losses and compares them with the remaining room under the next trading day’s daily loss limit.

Output includes the next day’s limit in account currency, the floating loss carried over, and per-position details: symbol, side, lots, configured gap for its group, and the loss that gap implies. A final verdict flags OK or TOO MUCH, including a per-position reduction amount.

Key point: stop-loss orders do not cap gap risk, since fills occur at the first available price after the gap.

Inputs cover account size (or current balance), daily loss limit and safety margin, whether carried floating loss counts against the next day, per-asset gap percentages (FX, metals, indices, crypto, other), and symbol group matching via name fr...

πŸ‘‰ Read | Signals | @mql5dev
❀7πŸ‘7πŸ”₯6🀩3πŸ‘Ύ1
MarketInfo is an information script for MetaTrader 5 that logs key telemetry for the active instrument and outputs a chart comment for quick review.

It reports current Bid, Ask, and spread in pips, along with symbol parameters such as minimum and maximum lot size, lot step, and price digits.

Volatility is calculated using ATR for a configurable period. The script also shows the time remaining until the current bar closes to support timing-sensitive execution and monitoring.

For a user-defined number of recent bars, it aggregates high, low, average close, average volume, and average range. A simple classification marks the current state as upward, downward, or sideways based on recent price behavior.

πŸ‘‰ Read | Docs | @mql5dev
πŸ‘15🀩7πŸ”₯5❀4πŸ‘Œ1πŸ‘¨β€πŸ’»1
MA Crossover EA is an automated strategy that places trades when two moving averages intersect. It supports any instrument and timeframe, with configurable fast and slow MA periods.

Trade logic is limited to one open position at a time. A BUY is opened when the fast moving average crosses above the slow moving average. A SELL is opened when the fast moving average crosses below the slow moving average.

Risk controls include optional Stop Loss and Take Profit levels defined in pips. Execution can be restricted to bar-close signals via a TradeOnNewBar setting to reduce intra-bar noise.

Key inputs typically include lot size, FastMAPeriod, SlowMAPeriod, StopLoss, TakeProfit, and a MagicNumber for trade identification. Validation in a strategy tester and parameter optimisation per symbol are recommended before live use.

πŸ‘‰ Read | VPS | @mql5dev
❀12🀩10πŸ‘7πŸ”₯7
This article shows how to build market-pattern models in MetaTrader 5 using CatBoost, focusing on a small, well-chosen feature set instead of endless hand-tuned trading rules. The goal is to reduce overfitting caused by optimizing many inequalities across symbols and periods.

A practical pipeline is outlined: generate predictors and a binary target directly from an MQL5 Expert Advisor, export samples to CSV, train CatBoost via a standalone exe (no Python/R), then run the trained model in MT5 using a CatBoost interpreter class.

Feature engineering emphasizes context: time features, price position vs. key levels, volatility, and oscillator values across multiple timeframes, sampled at several bar offsets to capture dynamics. The baseline signal is a simple MA-cross trend entry; ML is used to filter false entries in flat markets while keeping implementation ac...

πŸ‘‰ Read | Quotes | @mql5dev
❀14πŸ‘9🀩6πŸ”₯4
Mean reversion triggers can be gated by a convergence indicator count to reduce noise. This setting defines how many independent signals must align before a reversion event is allowed to fire.

A lower threshold such as 5 increases trade frequency and can react earlier, but typically raises the false-positive rate in ranging conditions with weak confirmation.

A higher threshold such as 9 is more selective and may improve signal quality, but can delay entries and miss shorter reversals. Practical selection depends on symbol volatility, timeframe, and the number and correlation of indicators feeding the convergence check.

πŸ‘‰ Read | Forum | @mql5dev
❀4πŸ‘2