MQL5 Algo Trading
586K subscribers
4.89K photos
7 videos
4.89K 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
Smart Money Concepts workflows often require monitoring several timeframes and maintaining consistent zone markup. G7 Institutional SMC Radar is an MT5 indicator focused on XAUUSD scalping and prop-firm style execution, providing automated zone detection and a confluence-style confidence readout for manual decisions.

The tool auto-draws bullish/bearish Fair Value Gaps and ICT Order Blocks, extends them forward, and removes zones after mitigation to reduce chart clutter. A heads-up display outputs a 0–100 confidence score based on structural alignment between detected zones.

A background DXY correlation module is included to help validate directional bias. Recommended attachment is M15 or H1, then waiting for higher confidence readings (for example, 70%+) before executing manual entries. The package is positioned as an analytical dashboard rather than an a...

👉 Read | Freelance | @mql5dev
👍43🔥28❤21🤩18👀6⚡1👾1
G7 FVG OB Confluence AutoTrader is an MT5 algorithmic trading utility built around strict OB/FVG overlap validation. Trade signals are only considered when an institutional Order Block and an unmitigated 3-bar Fair Value Gap coincide at the same price structure, with configurable overlap tolerance.

The engine scans M15 order blocks via impulse displacement (>1.6x ATR) and tracks active imbalances. A 6-factor on-chart score (0–100%) aggregates NY-session USD news filtering, DXY correlation alignment, imbalance status, liquidity sweep detection, order block state, and an overall weighted confidence with score capping on structural conflicts.

Execution is handled from a chart HUD with one-click buy/sell, lot sizing, SL/TP edits, auto-exec toggling, breakeven-all, and close-all. Risk controls include daily loss shutdown, daily profit lock, spread filt...

👉 Read | Quotes | @mql5dev
👍37🔥33❤28🤩22⚡3
This article tackles a common MT5 usability problem: users delete a chart object created by an indicator, and earlier implementations removed the entire program. The proposed approach keeps the indicator running and automatically recreates the missing object.

It starts with a minimal fix: listen for object-deletion events and rebuild the object. Testing reveals subtle issues: repeated pointer initialization can leak memory, and OnDeinit can accidentally trigger recreation via queued events. The corrected version guards pointer reuse and disables event handling during shutdown.

A more practical refinement stores key object state (position and size) inside the object-managing class. When deletion is detected, the indicator restores the object using saved properties, balancing effort against fidelity.

👉 Read | Calendar | @mql5dev
👍47❤43🔥30🤩27⚡3✍1🤔1
G7 Account Inspector Pro is an on-chart account diagnostics and risk auditing dashboard for MetaTrader 5. It targets prop firm evaluation workflows, EA-driven trading, and discretionary portfolio monitoring with real-time performance and exposure metrics.

The interface toggles between a compact HUD and a full multi-column panel. It also calculates an account health score (0–100) based on core factors such as profit factor, max drawdown, win rate, and return-to-risk, with letter-grade output.

Behavioral metrics cover execution mix (EA vs manual via magic number), grid-style exposure, scalping turnover, lot sizing variance, and overnight/weekend holding. A compliance auditor tracks daily and total drawdown against configurable limits, with CSV export for historical reviews.

Key inputs include initial panel state, chart anchoring and offsets, daily/tot...

👉 Read | AppStore | @mql5dev
👍42🤩39❤28🔥26
Time-based OHLC appeared as a storage and reporting compromise when trades were sparse. As activity grew, bars and candlesticks added High/Low while keeping data volume manageable, scaling cleanly across timeframes.

In signal processing, Nyquist-Shannon shows that undersampling a periodic signal destroys frequency and amplitude information. Similar loss can occur when market data is sampled by clock time instead of event intensity.

Exchange pricing is discrete by tick and lot, but price is not driven by time. It reacts to trades, order book updates, and participant repricing. Fixed time bars therefore bundle a variable number of market events, making volatility and pattern statistics non-stationary across instruments and across years with different microstructure and algo participation.

👉 Read | Signals | @mql5dev
❤64👍40🔥38🤩32👨‍💻8🏆3👀2
Trading sessions are rendered as rectangles from configured start to end hours, spanning the highest high and lowest low printed within each session. Labels can be enabled to show the session name plus its high above the box and low below it; New York labels sit inside the box due to overlap with London.

Sessions in progress expand as new highs or lows are formed. Hours are defined in broker server time (whole hours), not local time or GMT. Defaults target common GMT+2/GMT+3 servers with US DST: Tokyo 02–11, London 10–19, New York 15–24 (server time).

Sessions may cross midnight by setting an end hour lower than the start. Rendering is limited to M1–H1; H4+ is skipped. Non-trading days are ignored, historical boxes do not repaint, and all chart objects are removed on indicator unload. Optional fill draws behind candles; otherwise outlines are used.

👉 Read | VPS | @mql5dev
❤45🔥39👍26🤩7👌5✍3👨‍💻2
Session Ranges + ADR Panel consolidates key intraday context: session highs/lows for Asia, London, and New York, current-day movement versus Average Daily Range, remaining time on the active candle, and live spread. Session boxes include high, low, and range labels, with overlap visibility and a distinct London/New York overlap color.

High/low calculations are sourced from a lower timeframe (default M5) for precision on M1–H1 charts, with optional hiding above a chosen timeframe. Sessions can cross midnight, and completed session boxes remain fixed with no repainting; only the active session expands as new extremes print.

The ADR panel tracks the last N completed days, today’s range, % of ADR with 70%/100% thresholds, and ADR remaining. Updates run every second, even without ticks. Units support pips, points, or raw price with auto pip sizing and optional...

👉 Read | VPS | @mql5dev
❤38🔥10🤩10👍9👌3👀1
ATR Risk Planner standardizes pre-trade planning around ATR-based volatility. Stop distance is calculated as ATR multiplied by a configurable factor, with targets shown as R multiples (1R, 2R, 3R). Position sizing uses broker tick size and tick value for loss, enabling consistent sizing across FX, metals, energy, and indices without manual pip-value calculations.

The panel reports ATR in price and points on the current or selected timeframe, spread in points and as a percentage of the stop with a warning threshold, and risk as percent of balance, percent of equity, or a fixed currency amount. Lot size is rounded down to the broker volume step and the resulting SL loss is displayed; if minimum volume exceeds allowed risk, it is flagged.

Buy and sell plans are computed separately (ask vs bid) and optional chart lines mark entry, stop, and up to three target...

👉 Read | Calendar | @mql5dev
❤22👍13🤩11🔥9
Spread and Swap Monitor surfaces symbol trading costs directly on the chart, targeting spread spikes on XAUUSD, oil, and major FX pairs around news, rollover, and low-liquidity sessions, plus overnight swap impact.

A separate window plots per-bar spread as a histogram in points with a configurable moving average (50 bars default). Wide-spread bars are flagged when exceeding a multiple of the average (2x default) or an optional fixed-point threshold.

Spread sourcing supports Auto, bar-history only, or tick-history only. Auto uses broker per-bar spread when available, otherwise rebuilds the widest bid/ask spread per bar from tick data (last 500 bars default). The current bar tracks the widest live spread seen so far.

An on-chart panel shows live spread in points and price, average spread, today’s tightest/widest live spread since load, swap long/short w...

👉 Read | Calendar | @mql5dev
👍16❤14🔥13🤩11👀1
A compact chart-corner text block provides three live lines: bar close countdown, current spread in points (ask minus bid), and time remaining to server 00:00 rollover. The bar countdown shifts color during the final 10% of the candle. The rollover line appends “(x3)” on triple-swap days for the symbol.

Updates run on a 1-second timer, so values keep moving between ticks and on low-liquidity instruments. If no tick arrives for over 5 minutes, the bar line switches to showing the last tick timestamp instead of a countdown.

Timing notes: MT5 relies on the terminal’s server clock estimate. MT4 derives server time from the last tick and advances it using the local clock, so values may be off until the first fresh tick after loading. Rollover is typically at server midnight, but broker schedules vary.

The indicator draws text labels only and cleans them up...

👉 Read | NeuroBook | @mql5dev
👍22🤩11🔥9❤7👀2
Trading sessions are rendered as rectangles from the configured start to end time, spanning the highest high and lowest low printed within that window. Labels are optional and can show the session name, with the high above the box and the low below it. New York labels are placed inside the box due to overlap with London.

Hours are defined in broker server time, not local time or GMT. Defaults target a GMT+2/GMT+3 server with US daylight saving: Tokyo 02–11, London 10–19, New York 15–24. For other brokers, read Market Watch server time and offset accordingly. Sessions can cross midnight by setting an end hour lower than the start hour.

Boxes are drawn only on M1–H1. H4 and higher are skipped due to bar alignment issues. Weekends and holidays are ignored in the “Days to show” count. Past boxes never repaint, and all objects are removed when the indicat...

👉 Read | AppStore | @mql5dev
❤18🔥18🤩13👍9👀1
Reference levels remain a common tool for breakout and rejection logic, especially around the prior day, prior week, and the current session open. A lightweight indicator can standardize these levels across any chart timeframe using fixed daily and weekly data.

The plot set includes PDH/PDL (previous day high/low), PWH/PWL (previous week high/low), and today’s open. Each level is drawn as a line with a compact label showing the name and exact price, positioned just to the right of the latest candle.

Levels are sourced from the symbol’s D1 and W1 bars, meaning the “day” follows the broker server session. Values refresh only when a new D1 bar starts and rely on completed days and weeks, preventing intra-day repainting. If D1/W1 history is not yet available, rendering is deferred until data arrives, and all objects are cleared on removal.

Key inputs co...

👉 Read | AppStore | @mql5dev
🔥14👍13🤩9❤8👨‍💻2👀1
A Wolfe Wave indicator can be used to flag potential trend reversals and is typically applied on H4 or daily charts. Signal frequency depends on pattern sizing controls, including the candle-count threshold used to qualify bars as swings. Higher values produce larger formations and fewer detections.

Wave filtering can be tightened with a minimum ATR wave size. A value of 0 disables filtering, while 1 requires each leg to be at least 1 ATR. ATR period defines the lookback for the ATR calculation and is only relevant when the minimum ATR filter is enabled. Historical depth is controlled via the “candles from history to analyze” setting.

Rule toggles commonly include bullish-only, bearish-only, or both. Clean Pattern (Bulkowski) rejects formations with intermediate peaks/troughs outside the structure. Time symmetry requires similar wave durations, with...

👉 Read | Signals | @mql5dev
👍14❤10🔥9🤩2👀2👾2
Проблема стандартных ZigZag и фракталов на M5 заключается в шуме и жестких порогах: либо появляется избыток волн, либо пропускаются развороты из-за фильтра по размеру.

Индикатор формирует структуру по логике ручной разметки. Разворот фиксируется по старшему таймфрейму: используется H1‑фрактал из трех свечей, а точка ставится на ту M5‑свечу внутри часа, где был фактический максимум или минимум. Волна не может пройти мимо экстремума: если между точками цена ушла дальше, конец волны переносится на новый экстремум. Последняя точка сопровождает цену до подтверждения встречным фракталом. Если H1‑фрактала нет, но откат не меньше 0,5 ATR(H1), добавляется недостающая пара точек. Порогов в пунктах нет, подход одинаков для валют, металлов и индексов.

Сплошные линии показывают подтвержденные волны без перерисовки. HH/HL означают рост, LH/LL — снижение. Справа ри...

👉 Read | NeuroBook | @mql5dev
❤10👍9🔥6🤩3
Perceptron training can fail on raw-value datasets when feature magnitude shifts outside expected ranges. With gradient-based updates and small random initialization, large scales can inflate early error and prevent convergence, even when distribution shape is unchanged.

Rescaling to a bounded interval (for example, 0..1) keeps gradients numerically stable and can reduce training bias caused by disproportionate feature ranges. This becomes critical as input dimensionality grows.

Two scale types are typically applied: arithmetic (linear mapping) and logarithmic (nonlinear, nonnegative domains). A practical implementation is to scan min/max in the training array, compute a scale factor, and transform values before training, without changing model code.

👉 Read | NeuroBook | @mql5dev
👍16🤩7❤6🔥6👀1
Fair Value Gap (FVG) logic for XAUUSD and other symbols is based on confirmed data: a gap is defined only after the third candle closes. Bullish FVG requires candle 3 low above candle 1 high; bearish FVG requires candle 3 high below candle 1 low. An ATR-based minimum size filter removes minor gaps.

After creation, each gap is tracked. On retrace, the zone can shrink to the remaining unfilled area, keeping focus on what is still open. Mitigation can be configured as first touch, 50% midline hit, or full fill; mitigated gaps are dimmed or removed. Processing uses closed bars only, avoiding repainting.

Key settings include ATR period, minimum gap fraction, scan depth, per-side limits, display toggles, and alerts for new gaps or first touch. The module is chart-only (rectangles/lines), with detection and update functions designed for reuse in automation as...

👉 Read | AppStore | @mql5dev
❤19🔥9🤩5👍4
E-STMFlow is adapted to trading by treating each tick as an event, updating model state on every price/volume/spread change instead of batching data into fixed candles. This preserves microstructure detail, reacts immediately to bursts in activity, and naturally idles during quiet periods.

The core is a compact Spatio-Temporal State Space Module reinterpreting “space” as a feature vector and “time” as irregular tick timing. State-space updates provide lower latency and lighter compute than heavy attention or deep recurrent stacks, with tunable state dimensionality.

Implementation consolidates modules into a top-level MT5 encoder class (CNeuronESTMEncoder) built as a sequential cFlow pipeline, accelerated via OpenCL. Initialization validates layer configs, assembles STSSM blocks plus shape-matching transpose/conv stages, and uses residual links so b...

👉 Read | Quotes | @mql5dev
❤19🔥12👍8🤩4🏆2
Equal highs and equal lows can be tracked as liquidity lines: two or more confirmed swing points that finish within an ATR-based tolerance, with no intervening candle taking the level first. Each additional matching swing adds another touch to the same line. Swings are confirmed on closed bars, so the objects appear with a delay and do not repaint.

When price trades beyond the line and closes back inside, the level is classified as swept, indicating buy-side or sell-side liquidity was taken and price returned. When the candle closes beyond the line, the level is marked as taken to separate breakouts from sweeps. A sweep is descriptive only and does not predict direction.

Key settings include swing length (default 3), tolerance (default 0.10 ATR), ATR period (14), max bars between swings (100), and scan depth (1500). Options cover active/swept/taken lim...

👉 Read | Forum | @mql5dev
❤13👍8🔥7🤩5
Trading-terminal optimization typically depends on gradients. Hand-coded derivatives are fast but brittle. Finite differences require step-size selection and trade truncation against cancellation. Automatic differentiation removes that parameter and yields derivatives accurate to floating-point rounding.

Forward mode propagates value and derivative together using dual numbers and per-function chain rules. It requires one pass per input, with a small set of elementary functions.

Reverse mode records a tape of parent slots and local partials during evaluation, then sweeps backward once to accumulate adjoints. The implementation uses flat arrays, amortized growth, and skips zero adjoints to avoid unnecessary NaNs.

Bench results: reverse mode is a poor fit for least-squares Jacobians, finite differences can be faster under ~5 parameters, and exact Jac...

👉 Read | Calendar | @mql5dev
❤14👍14🔥4🤩4
A risk-based lot sizing panel calculates volume from two inputs: risk amount (percent of balance, percent of equity, or fixed money) and stop loss in points. Loss per 1.00 lot at the selected stop is obtained via OrderCalcProfit, keeping results consistent across XAUUSD, indices, cross pairs, and crypto, not only major FX.

Trade buttons send market orders with stop loss and optional take profit already attached, after free margin validation and broker minimum stop-distance checks. Volume is rounded down to the broker step, capped by broker limits and an optional user maximum, with both target and real risk displayed. If calculated volume is below broker minimum, the trade is rejected unless “use minimum lot” is enabled, in which case the minimum is used and real risk is shown.

Supports hedging and netting accounts. Executes only on manual BUY/SELL input and...

👉 Read | AppStore | @mql5dev
❤12👍7🤩4✍2🏆1
Part 4 of Prop Firm Guard solves a common prop-firm rule: restricting trade actions around economic news, but only for news that matches the account’s actual risk exposure.

Instead of using the chart symbol, the EA scans all open positions, derives a unique set of exposed currencies, and uses that set to filter the MT5 Economic Calendar. Duplicate currencies are removed, and special handling is shown for an explicit XAU/USD model where USD exposure is inferred from broker base/profit currency properties.

A key implementation detail is fault-aware state modeling. The news subsystem distinguishes no supported exposure, a valid “no event” result, and genuinely unavailable data. Exposure collection can be partial (some positions unreadable), which correctly forces an “unavailable” outcome rather than a false-safe state.

The calendar search uses validated serve...

👉 Read | Forum | @mql5dev
❤13👍9🤩4😱2🔥1👌1