MQL5 Algo Trading
539K subscribers
3.84K photos
6 videos
3.85K 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
MT5 Order Preflight is a read-only diagnostic script that validates a hypothetical market, limit, or stop request against the current trading rules advertised for the chart symbol. It logs a plain-text report to the Experts tab and can optionally write the same output into the terminal-wide Common\Files directory. No orders are sent, modified, or canceled.

Checks include current Bid/Ask availability, symbol trade mode and long/short/close-only restrictions, order-type support, volume min/max and step alignment, tick-size price normalization for pending orders, stops-level distance, stop-loss/take-profit support and minimum distance, and advertised filling flags (FOK/IOC/BOC).

Usage: compile SCA_MT5OrderPreflight.mq5 under MQL5\Scripts\StratCoreAlpha, run it on the affected symbol, select scenario, volume, and distances, then review PASS/WARN/FAIL lines....

πŸ‘‰ Read | AppStore | @mql5dev
❀19πŸ‘5πŸ‘Œ1
Quantora Multi-Timeframe RSI Dashboard for MT5 provides momentum analysis by aggregating RSI readings across seven intervals, from M1 through D1. Each timeframe is categorized as overbought, bullish, neutral, bearish, or oversold, allowing fast comparison of short-, mid-, and higher-timeframe conditions without chart switching.

The panel calculates an average RSI and an overall momentum bias, plus a count of how many timeframes sit in each state to highlight alignment versus dispersion. RSI periods and threshold levels are configurable to match different rule sets.

The interface is lightweight, updates automatically, and operates across any symbol and timeframe. The tool is intended for analysis and visualization only, with no trade execution, trade management, or standalone signal output.

πŸ‘‰ Read | AlgoBook | @mql5dev
πŸ‘9❀3πŸ‘Œ2
Risk Position Size Calculator is an on-chart tool that converts a fixed percentage risk and a stop-loss distance into an exact lot size, expressed in account currency. Entry and Stop lines are draggable; position size, cash risk, required margin, free margin after entry, and an optional reward:risk target update in real time, including when markets are closed. The tool calculates and displays only and does not place, modify, or close orders.

Stop valuation and currency conversion use OrderCalcProfit() for one lot, avoiding common inaccuracies from point-based estimates on cross pairs, metals, and CFDs. Margin figures come from OrderCalcMargin() rather than approximations. Volume is rounded down to the broker step to prevent exceeding the declared risk, and broker minimum-volume violations are reported explicitly. Risk can be based on balance, equity, or free...

πŸ‘‰ Read | VPS | @mql5dev
πŸ‘11❀10πŸ‘Œ4
Quantora Multi-Timeframe MACD Dashboard for MT5 provides multi-timeframe momentum and trend analysis based on MACD. It calculates main line, signal line, and histogram values across seven timeframes from M1 through D1 and presents them in a single dashboard view.

Each timeframe is graded from strong bearish to strong bullish, supporting quick assessment of momentum strength and direction. Aggregation includes a total momentum score and an overall MACD bias to highlight whether direction is consistent or conflicting across timeframes.

Additional counters report bullish, bearish, and neutral timeframes, plus positive versus negative histogram states. MACD parameters are configurable for different trading approaches. The interface updates automatically and supports any symbol and chart timeframe. Intended for analysis only; no signals or trade management.

πŸ‘‰ Read | VPS | @mql5dev
❀9πŸ‘8πŸ‘Œ2
Building profitable trading systems is treated as an engineering pipeline: create small prototypes fast, test early, then add only the filters that measurably improve robustness. Simpler EAs are easier to validate, fix, and port to MT5, while large codebases often add noise without improving edge.

Signal selection focuses on execution realism and risk structure: avoid sub-minute holding times due to latency sensitivity, and prefer equity curves close to balance with low drawdown and no grid/martingale behavior.

Commercial EAs are evaluated like software investments: profitability must exceed cost by multiples, durability is never guaranteed, and multi-currency behavior is a key sign the logic captures broader market dynamics.

Indicators are treated as supportive tools, not entry generators; the practical value is in pattern/geometry detection and notif...

πŸ‘‰ Read | Signals | @mql5dev
❀16πŸ‘4πŸ‘Œ2πŸŽ‰1
Quantora Moving Average Dashboard for MT5 consolidates key trend filters into a single on-chart panel. It monitors EMA 20/50/100/200 and SMA 50/200, showing current price positioning versus each average to outline short-, medium-, and long-term structure.

Moving average alignment is aggregated into a score and a summarized market bias output (bullish, bearish, neutral) for faster context during multi-timeframe review. The panel also reports bid, ask, and spread with real-time updates.

All periods are configurable, with support for any symbol and timeframe. The tool is analytical only and does not execute or manage orders.

πŸ‘‰ Read | CodeBase | @mql5dev
❀18πŸ‘7πŸ‘€4πŸ‘Œ1
Quantora Candle Strength Analyzer for MT5 is a free, open-source indicator focused on candle structure and price action.

It evaluates body size, upper and lower wicks, candle direction, wick rejection, range conditions, plus buyer/seller pressure derived from candle geometry. Results are summarized as a Pressure Score from -5 to +5 based on direction, strength, pressure, and rejection.

Operation supports Current Candle and Closed Candle modes. Parameters include body thresholds, wick ratio, range lookback, and update interval. The dashboard shows live spread, candle range, average range, and additional real-time candle metrics.

Runs on the attached chart timeframe and is intended for multiple market types. Buyer/Seller Pressure is a structural proxy, not order flow or volume. No trade execution or guaranteed signals are provided.

πŸ‘‰ Read | NeuroBook | @mql5dev
❀11πŸ‘5πŸ‘Œ1
Trade Adjustment Panel is an on-chart position management utility for MT5 that modifies existing market positions after execution. It is intended for manual trades or positions opened by other Expert Advisors, with no entry logic, signal generation, or order placement.

Stop Loss functions include break-even, break-even with configurable point offset, profit locking via Stop Loss repositioning, and trailing stop updates based on a fixed point distance from current price.

Take Profit targets can be calculated using Risk:Reward multiples (1R, 2R, 3R), derived from the initial entry-to-Stop Loss distance.

Volume tools support partial closures at 25%, 50%, 75%, or 100%, with broker rule checks against SYMBOL_VOLUME_MIN and SYMBOL_VOLUME_STEP before requests are sent.

Execution can be filtered by symbol scope (current chart or all charts) and direction (Buy, Sel...

πŸ‘‰ Read | NeuroBook | @mql5dev
πŸ‘10❀5πŸ‘Œ2
Previous Day High/Low/Close levels remain common intraday reference points for support, resistance, and prior session value. This indicator reads High, Low, and Close from the last completed D1 bar and plots them as horizontal lines on any intraday chart, keeping prior-day structure visible without timeframe changes.

PDH is treated as a potential resistance or breakout trigger, PDL as potential support or breakdown trigger, and PDC as a session pivot where trading above is often read as net bullish and below as net bearish.

Multi-day mode (InpDaysToShow 1–10) draws each older day’s levels only across its own session with β€œ-N” labeling to avoid overlap. Lines refresh automatically when a new daily bar opens. Inputs cover per-level visibility, colors, shared line style/width, and optional labels with price and font size. Session boundaries follow the b...

πŸ‘‰ Read | Quotes | @mql5dev
❀17πŸ‘8πŸ‘Œ1
Tsetlin Machine implementation for MQL5 focuses on interpretable classification using boolean rules instead of floating-point weights.

Model structure is layered: Tsetlin automata (integer state counters) decide INCLUDE/EXCLUDE per literal, clauses form AND-rules, and per-class clause banks vote with positive and negative polarity. Multi-class output is argmax over class scores.

Training uses two feedback types, not gradients. Type I reinforces clauses that should fire, Type II suppresses false positives by adding a currently-false literal to break an incorrect match. Updates are one-vs-rest with a sampled rival class and a probability gate based on target margin T and specificity s.

Workflow includes booleanizing indicators, labeling by forward return, training on market history, saving a compact text model, and exposing active rules on-chart via a...

πŸ‘‰ Read | VPS | @mql5dev
❀14πŸ‘6πŸ‘Œ1
Part 5 extends the Part 4 chart-object stack by adding a Fibonacci detection and normalization layer that bridges EA-generated objects with trader-drawn tools.

Manual Fibonacci objects are structurally volatile. Users can rename objects, change level counts, or edit ratios, which can break array indexing and produce inconsistent ObjectGet* reads. The fix is a two-step pipeline: detect all Fibonacci-family objects, then normalize levels and flags while preserving anchors.

Coverage includes all six MQL5 Fibonacci types (OBJ_FIBO, OBJ_FIBOFAN, OBJ_FIBOTIMES, OBJ_FIBOARC, OBJ_FIBOCHANNEL, OBJ_EXPANSION) with type-aware handling of OBJPROP_LEVELVALUE semantics.

Integration updates TopologyManager and ObjectPlacer to normalize before evaluation and to enforce manual priority to prevent duplicate placements. A separate test EA validates behavior via jou...

πŸ‘‰ Read | Signals | @mql5dev
❀17πŸ‘4πŸ‘¨β€πŸ’»1
Trend Execution Planner is a free, open-source MT5 chart utility focused on regime classification and pre-trade sizing. It runs as an Expert Advisor only to read live account and symbol specs and remains strictly non-trading, with no order, position, or trade-request calls.

The panel outputs a trend-condition score built from price/MA direction, MA slope, ADX, and Kaufman’s Efficiency Ratio, then classifies conditions as strong up, strong down, or mixed/neutral. Execution cost is shown as spread expressed as a percentage of ATR, with a configurable limit.

Hypothetical long/short plans use current Ask/Bid, an ATR-based stop, and a reward/risk target. Position sizing is normalized to broker constraints using OrderCalcProfit, with margin and free-margin checks via OrderCalcMargin, plus warnings when minimum lot exceeds the selected money risk.

Score formula: ...

πŸ‘‰ Read | Calendar | @mql5dev
❀12πŸ‘8
Risk-based position sizing indicator designed to standardize lot calculations across symbols with different tick values. The chart uses three draggable horizontal lines for Entry, Stop Loss, and an optional Take Profit. While lines are moved, an on-chart panel updates in real time via OnChartEvent, with tick updates as fallback.

Lot size is computed from the instrument’s tick value and tick size using SymbolInfoDouble(), then rounded and clamped to the allowed volume step, minimum, and maximum. This keeps results consistent on FX pairs, metals, indices, and crypto CFDs without manual recalibration.

The panel displays direction (derived from Entry vs Stop), entry/stop prices and distance in points, risk amount, and calculated volume. When Take Profit is enabled, it also shows target, expected reward in account currency, and reward-to-risk ratio. Risk ...

πŸ‘‰ Read | Calendar | @mql5dev
❀8πŸ‘7πŸ‘Œ1
Time‑MoE uses point-based tokenization to keep per-tick/per-candle data intact, then applies SwiGLU embeddings to represent both smooth drift and volatility spikes.

The core change is swapping the Transformer FeedForward block for a sparse Mixture of Experts in a decoder-only stack. A shared expert is always active; a Top‑K router selects additional experts per token. Cross-attention is retained by splitting a single stream into β€œcurrent-step tokens” and β€œfull-history context”.

End-to-end integration places TimeMoEAttention inside an Environment State Encoder, with separate forecasting heads per horizon. Each head consumes the shared latent output, uses convolution for horizon-specific forecasts, then projects back to the original feature space. RevIN is replaced by learnable scale/bias (BatchNorm used as denormalization) due to encoder encapsulation.

πŸ‘‰ Read | AppStore | @mql5dev
❀20πŸ‘7πŸ€”1πŸ‘Œ1
This validation study stress-tests the Siegmund ARL formula used to set CUSUM thresholds in MetaTrader 5. On six instruments across M15/H1/H4, the textbook ARL prediction misses badly: with W=100, k=0.5, h=4, the indicator triggers about every 66 bars versus the expected 338, largely due to fat-tailed returns.

Statistical checks around each breakpoint (200 bars pre/post) show what the detector really flags. Variance shifts are confirmed in ~47% of breaks, while mean shifts are almost never confirmed (~0.7%), making it a practical volatility-regime detector rather than a directional change detector.

In the quietest volatility tercile, behavior becomes conservative (ARL ~430), implying excess signals come mainly from extreme bars in volatile regimes. The included CUSUM_Breakpoint.mq5 code is fully reproducible and structured for efficient incremental u...

πŸ‘‰ Read | Quotes | @mql5dev
πŸ‘14❀10πŸ‘Œ1
Smart Trade Manager for MT5 is a trade-management Expert Advisor focused on protecting manually opened positions. It does not generate entry signals and does not place trades. It monitors supported symbols and applies stop-loss and ongoing risk controls after entry.

Stop placement is structure-based: buys reference the most recent swing low and sells reference the most recent swing high on a selected timeframe. An ATR buffer is applied beyond the structure level, then the final SL is constrained by configurable minimum and maximum ATR distance limits. All calculations use closed-bar data.

Management functions include breakeven with R-based trigger and lock, ATR trailing with separate profiles for Gold and selected FX pairs, optional R-multiple take profit, and dollar-based profit protection with peak giveback closeout. Execution controls include spread filte...

πŸ‘‰ Read | Calendar | @mql5dev
❀24πŸ‘7πŸ‘Œ1
Scaling out is widely treated as a default improvement, but standard trading reports rarely quantify whether partial exits improved results versus holding full size until the final exit.

ScaleOutValue.mq5 analyzes closing-deal CSV data and prints a report to the Experts tab. It calculates Value-Add Ratio (aggregate value added vs holding to last exit), Scale-Out Win Rate (percent of scaled positions that beat last-exit holding), and Scaling Efficiency (percent of the best outcome achievable using the trader’s own exit prices that was captured). A composite A+ to F grade combines the three, adds a single-trade dependence check, and outputs recommendations.

Input is a CSV in MQL5\Files (default ScaleOutData.csv) with one row per closing deal and a fixed header schema. If missing, a demo dataset is generated on first run. A companion exporter script writes...

πŸ‘‰ Read | Docs | @mql5dev
πŸ‘11❀9πŸ‘Œ1
DoEasy’s timeseries architecture is extended with a dedicated indicator buffer data object: one object represents one buffer value on one bar, linked to the owning indicator, symbol, timeframe, buffer index, and bar time. These objects are designed to live in typed collection lists, enabling fast selection, filtering, sorting by time, and later cross-indicator comparisons and benchmarking via cached data.

The new CDataInd class follows the library’s base object pattern with integer/real/string property arrays, property support flags, a Compare() override for Search()/Sort(), and helpers for readable setters/getters and journal output. Selection/sorting services are updated to handle the new object type.

Testing updates the sample EA to instantiate buffer objects for current and previous bars across standard and custom indicators, printing object descriptio...

πŸ‘‰ Read | Forum | @mql5dev
❀36πŸ‘10πŸ’”3πŸ€”2🀑2πŸ‘¨β€πŸ’»2πŸ‘€2
Smart Session Breakout is a session-range breakout indicator for MetaTrader 4. It tracks the Asian session high/low (default 00:00–08:00 broker time), draws the range box, then monitors London/New York for confirmed closes beyond the projected levels.

Signal quality is tightened with volatility checks. Beyond a close outside the range, the breakout candle must meet configurable ATR expansion rules, including a minimum body size relative to ATR. Min/Max range height filters skip unusually small or large ranges.

Signals are non-repainting when confirmation on bar close is enabled. An on-chart panel reports session phase, spread, ATR in pips, and time to bar close. Alerts support pop-up, sound, email, and mobile push. Version 1.10 fixes midnight-crossing sessions, dashboard corner placement, alert firing in intrabar mode, input validation, and reduces p...

πŸ‘‰ Read | Calendar | @mql5dev
❀8πŸ‘4πŸ†1
Dashboard stats summarize historical signal outcomes on the chart.

BUY shows the count of Buy signals split into Paid (target TP reached) and Loss (3-Grid SL hit), along with the resulting Buy win rate percentage.

SELL provides the same breakdown for Sell signals: Paid versus Loss, plus the Sell win rate percentage.

OVERALL WINRATE aggregates Buy and Sell results into a single success percentage across the available chart history.

InpRiskReward controls the target Risk:Reward ratio in the indicator settings, for example 1.0 for 1:1, 1.5 for 1:1.5, and 2.0 for 1:2.

πŸ‘‰ Read | Docs | @mql5dev
❀8πŸ‘3