MQL5 Algo Trading
488K subscribers
3.07K photos
3.07K 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
Intermarket analysis remains a core workflow in quantitative and institutional trading, where cross-asset correlation helps infer liquidity conditions. The US Dollar Index (DXY) is often monitored as a proxy for broad USD strength and its impact across FX and metals.

An Institutional DXY Overlay consolidates this view by plotting the Dollar Index directly on the active chart, reducing reliance on multi-window layouts and enabling faster correlation checks during execution.

Key capabilities include multi-symbol synchronization via iClose-based data requests, with alignment to the current chart timeframe. Dynamic scaling adjusts the plotted index to the visible price range for clearer comparison across instruments with different magnitudes.

SMT divergence spotting focuses on correlation breaks, such as DXY printing a higher high while a related pair fail...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀21πŸ‘Œ2
MetaTrader 5 uses SQLite, so standard SQL fits naturally inside MQL5 executables. One exception is execution from MetaEditor: it blocks DROP DATABASE for safety, even though DROP TABLE works. The takeaway is to treat destructive statements as production-grade risks.

The article then builds a clean workflow for quote storage: always modify data via SQL, not manual file edits. INSERT INTO is order-sensitive between column lists and VALUES, and careless table design permits unlimited duplicates.

To enforce consistency, define a PRIMARY KEY (e.g., trading day for daily bars). INSERT always creates rows; to change existing rows, use UPDATE ... SET ... WHERE keyed by the primary key. This pattern enables reliable incremental writes for trading data pipelines.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #SQL
❀28
Naive sizing breaks in ML trading because it ignores confidence, overlaps trades into accidental leverage, and forces constant rebalancing that turns edge into fees. It also misses payoff asymmetry, where the same win rate can justify different risk.

The AFML Chapter 10 toolkit in afml.bet_sizing implements four complementary sizers. bet_size_probability turns classifier probabilities into bounded signals via a z-score-to-normal-CDF mapping, then fixes triple-barrier overlap by averaging concurrently active bets and discretizing changes to reduce churn.

For non-probabilistic models, bet_size_dynamic sizes from forecast-vs-market divergence using calibrated sigmoid/power curves and can output limit prices for execution. bet_size_budget and bet_size_reserve handle directional-only signals, with the reserve method learning a sizing curve from empirica...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #AlgoTrading
πŸ‘9❀8πŸ”₯2
Market structure logic that relies on higher highs and lower lows treats every extreme as equal, which increases false signals during consolidation, minor retracements, and liquidity grabs.

A five-layer EA design addresses this with raw swing candidates plus a Structural Validation Engine. Swings become valid only with Break of Structure, displacement, liquidity sweep behavior, or time-based respect.

A Liquidity Interaction Layer tracks equal highs/lows and untouched validated swings, marking whether liquidity is taken. A state machine classifies phases as accumulation, expansion, distribution, or reversal based on validated swings and liquidity behavior.

Execution requires confluence: validated structure, liquidity interaction, and state alignment. Stops anchor to validated structure; targets use fixed risk:reward or next liquidity/structure level.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀25πŸ‘8πŸ‘Œ2⚑1
This part shows a practical path from raw MT5 tick exports to queryable data: request ticks in MetaTrader 5, save to CSV, then import the file into a clean .db using MetaEditor’s table import. Key details are choosing the correct delimiter (MT5 uses tabs by default) and naming the new table so the CSV header becomes the table schema.

With the data structured as a real table, SQL becomes usable for analysis and simulation. The article introduces SELECT as the core inspection tool, then moves to filtering with a WHERE clause, using column criteria (e.g., FLAGS = 88) to reduce large result sets.

MetaEditor’s result paging (blocks of 1,000 rows) is highlighted as a simple way to navigate big tick datasets during exploration.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #SQL
❀24
ASQ SuperTrend is an ATR-based trend-following indicator for MT5, drawing a SuperTrend line that flips between bullish and bearish states in real time. The line is green below price in uptrends and red above price in downtrends, with reversal arrows. Signals do not repaint on completed bars, and alerts support popup, sound (custom file), email, and push.

Version 2.0 adds three ATR calculation modes: Wilder smoothing (recursive ATR), SMA of true range, and EMA of true range. Mode selection changes responsiveness and is shown in the short name and dashboard.

The dashboard reports trend direction, SuperTrend level, price, pip distance to the flip point, trend duration, strength vs ATR, reversal count over the last 100 bars, active settings, current ATR in pips, plus symbol/timeframe.

Implementation uses 7 buffers, band locking (upper only decreases, lower o...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Indicator
❀25πŸ‘Œ2
ASQ_FlowDesk is an MT5 expert advisor panel focused on manual execution with automated risk and exit handling. It supports one-click LONG/SHORT market orders plus pending entries: Buy/Sell Limit and Buy/Sell Stop.

Risk can be set via manual lots, % of equity, or fixed cash risk. Exits support three scaled take-profit targets (T1/T2/T3) with configurable close fractions, plus four trailing modes: off, fixed distance, ATR-adaptive, or prior-bar structure. Auto-breakeven can shift SL to entry plus a cushion after a defined profit threshold.

Operations include Flatten All, Close Long/Short, Cancel Pendings, and Lock Entry. An on-chart panel shows spread, positions, exposure, P&L, target progress, and trail status.

Install by copying ASQ_FlowDesk.mq5 into MQL5/Experts, compiling, attaching to a chart, and enabling Algo Trading.

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #EA
❀26πŸ‘3πŸ‘Œ2😁1
ASQ_RiskGuard for MT5 adds account-level risk controls designed to enforce drawdown and daily loss rules. Equity drawdown protection closes positions when thresholds are hit, with daily loss caps that can disable trading for the day. A trailing max drawdown mode measures from peak equity to match typical prop firm constraints.

Operational filters include session hours enforcement with optional forced close, spread-based entry blocking, and position limits for count, lots, and daily order volume. Lot sizing supports fixed size, percent risk, or fixed currency risk per trade. Alerts trigger at configurable warning levels and at limit breach across popup, sound, push, and email. Logging to file is available for audit.

Installation: place ASQ_RiskGuard.mq5 in MQL5/Experts, compile, attach to a chart, and enable algo trading. Monitoring can cover all positions o...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #EA
❀25✍2πŸ‘Œ2
Library work starts on symbol chart support with a new Chart object that stores chart properties as int/double/string parameters. The parameter set will evolve as functionality expands.

Signal handling is corrected in MQL5.com Signals integration. Collection updates will now refresh properties of existing signal objects, not only append newly discovered signals. Added methods include SetProperties(), lookup of signal index by ID, and selection by ID to avoid unstable database indices.

A new CChartObj class is added under DoEasy\Objects\Chart. It initializes from ChartGetInteger/Double/String, supports comparisons, property descriptions, and journal output. Flag setters use ChartSet* with optional ChartRedraw batching to account for asynchronous updates. Read-only chart parameters are mirrored into object state for later synchronization.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀36πŸ‘Œ7πŸ‘5
Building a profitable model is only the first phase in algorithmic trading. A common failure point is execution: standard terminal trade calls are synchronous, blocking the next instruction until the server responds. During high-impact news or when a grid needs to close many positions at once, this wait time can turn into platform stalls and significant negative slippage.

The Asynchronous Institutional Trade Engine is a header-only library that routes order, modify, and close requests through non-blocking channels. Execution commands can be queued and dispatched without tying up the main strategy loop, separating trading logic from network latency.

The library also adds risk controls, including spread checks that can halt async bursts when liquidity degrades. It provides a partial-close routine for closing exact position percentages without manual lot r...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀18πŸ‘2πŸ‘Œ1
A new product version reaches baseline functionality for extracting working trading settings, with usability changes aimed at lowering the entry barrier and expanding participation in parameter search and market research.

Key updates include a redesigned UI, a second polynomial for brute force based on a modified Fourier series, improved RNG modes, spread capture and noise reduction, spread-aware optimization, lot variation for ultra-short segments, and multiple bug fixes.

A new workflow generates a TXT configuration read by a single β€œsettings receiver” EA for MT4/MT5, avoiding .set limits with variable-length arrays.

Internals cover coefficient generation, tick-based spread recording for OHLC, use of mid-price to reduce broker dependence, and notes on instability under spread noise plus overfitting risk.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #EA
❀50πŸ†9πŸ‘7πŸ‘Œ4
An RSI variant has been released that applies a Kalman Filter to the input series while keeping the standard RSI interpretation. The intent is to reduce short-term noise in the oscillator without changing common threshold logic such as overbought and oversold levels.

The indicator is displayed in a separate subwindow, consistent with typical RSI layouts. This build is described as the latest fixed version, addressing prior issues and aiming for stable behavior in live charts and backtests.

πŸ‘‰ Read | Signals | @mql5dev

#MQL4 #MT4 #Indicator
❀9✍5πŸ‘Œ2πŸ‘¨β€πŸ’»2
Smart Money Concepts setups without strict session alignment tend to fail because directional moves often concentrate around defined macroeconomic windows rather than persisting through the full trading day.

The ICT Silver Bullet framework targets those narrow periods where liquidity conditions change and execution becomes more consistent. This indicator automates the detection of those time windows, then limits on-chart output to the active session to reduce noise and common retail traps.

Execution zones are plotted directly on the chart, while Fair Value Gaps are scanned and projected only when they form inside the configured windows. Broker server offsets are handled via dynamic GMT adjustment to keep session alignment consistent without manual calculation.

The MQL5 implementation is optimized to process only recent visible history to reduce CPU ...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀16πŸŽ‰6πŸ‘Œ5πŸ”₯1
ASQ SafeScalping v1.20 is a free open-source breakout scalping Expert Advisor for MT5 from AlgoSphere Quant. Entries use a strict seven-condition gate: EMA(150/510) direction, ATR-based EMA separation, close relative to both EMAs, N-bar breakout with ATR buffer, RSI zone filter, momentum vs prior close, and optional H1 EMA(50/200) confirmation. If any check fails, no trade.

v1.20 fixes repeated TP1 partial closes via ticket tracking, disables GlobalVariables-based peak drawdown tracking in Strategy Tester, and removes a legacy MT4 directive for clean MT5 builds.

Risk and trade management are conservative: single position only, fixed SL/TP, percent sizing, max drawdown auto-pause, daily trade cap, breakeven, trailing stop, and one-time partial close. Filters cover session hours, spread, news, and Friday cutoff. Five .set presets support phased optimization, w...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #EA
❀21πŸ‘Œ2
Dominance EA is a daily, bias-driven system that derives direction from the prior session’s control rather than intraday tick activity. Execution is limited to once per trading day at the session open, with Mondays excluded to reduce weekend gap effects.

Bias is validated through two checks. Structural dominance counts prior-day bullish versus bearish candles to determine control. Context confirmation requires the prior day’s final close to be on the correct side of a moving average. Optional inverted mode flips the signal for contrarian testing.

Trade flow enforces one position per symbol per day. Volume uses SYMBOL_VOLUME_MIN. Stops are set from the prior day’s high/low widened by an ATR multiple, with take profit fixed at 2x stop distance. Pre-trade checks cover stop level rules, margin, and tick pricing. Configuration includes mode, MA/ATR parameters, f...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀18πŸ‘Œ3⚑2
Many strategies still rely on a single trigger such as an EMA crossover, without validating trend strength, momentum, volume, and directional bias. This approach typically increases false entries when context is mixed.

This MT5 indicator applies EMA 9/21 as the trigger, then scores seven conditions on the crossover bar: price vs VWAP, RSI vs 50, MACD line vs signal, crossover direction, ADX strength with price context, volume vs its moving average, and M5 RSI as a short-term momentum check. Signals are printed only when the bull or bear score meets a user-defined minimum.

Risk handling is automated via ATR-based stop-loss and five take-profit levels. A lot size calculator sizes positions by balance and risk percentage, with optional session filtering for Asian/London/New York hours. An on-chart dashboard reports indicator states, bias, trend strength...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Indicator
❀8πŸ”₯1