Articles, Library comments - page 3

Structural Swing Migration BUY : Structural Swing Migration BUY is an educational Expert Advisor for MetaTrader 5 that opens BUY positions when confirmed swing highs and swing lows move upward together. It evaluates closed M15 candles and combines structural confirmation with a volatility threshold
Check out the new article: Automating Trading Strategies in MQL5 (Part 54): Consolidation Breakout and Retest Entry Model . We implement an MQL5 program that validates consolidations by counting edge switches, height capped to the typical candle, and net drift, then requires a buffered close beyond
Check out the new article: Multi-Timeframe Bar Aggregator with Conflict Detection in MQL5 . We implement a multi‑timeframe aggregator that prevents mixing bars from different moments. It validates grid alignment, recency to the forming base bar, and closed‑bar end times, and returns either a
AesHmac: AES-256 encryption with tamper check and password keys for MQL4 : One include file that encrypts texts and bytes so only a program with the same key can read them. A wrong key or a changed message is refused instead of read as garbage, keys can come from a password, and the code is checked
AesHmac: AES-256 encryption with tamper check and password keys for MQL5 : One include file that encrypts texts and bytes so only a program with the same key can read them. A wrong key or a changed message is refused instead of read as garbage, keys can come from a password, and the code is checked
History Gaps: find missing bars before you backtest : Checks the chart's history against the symbol's trading sessions and separates real holes from holiday short sessions and days without bars. Marks the holes on the chart, shows coverage and the largest hole, warns when the history stops short of
Check out the new article: Neural Networks in Trading: Difference-Based Modeling of Market Microstructure (EDCFlow) . In the article, we explore the EDCFlow framework, which offers a new approach to analyzing market microstructure. It combines state correlation with a difference map, making it
TesterSafeLots - risk lot size that stays correct in the MT4 Strategy Tester : Risk-based lot size for MQL4 that does not depend on MODE_TICKVALUE in the Strategy Tester, so backtests of USDJPY, USDCHF or USDCAD on a USD account risk what the input says. Includes a test EA that measures the error
Prop Firm Equity Guard daily loss and max drawdown protector : Prop Firm Equity Guard protects prop-firm challenges and funded accounts. It monitors live equity against your daily loss and max drawdown limits, then closes all positions, deletes pending orders and locks trading before the firm's
Trade History in R : Shows the closed trades of the account in R (net profit divided by the money at risk at entry): expectancy, win rate, drawdown in R, losing streak, per-symbol summary and CSV export. Author: Andrii Lysenko
Trade History Export to CSV with Summary (win rate, profit factor, drawdown) : Exports the closed positions of the account to a CSV file (one row per position) and shows a summary: trades, win rate, profit factor, net result, max drawdown and results per symbol. Read-only. Author: Gilberto Cardona
Risk Lot From Stop Line : Drag a stop line on the chart and see the volume for a given risk, the real risk after rounding, and a warning when even the minimum volume risks too much. Author: Andrii Lysenko
HTF EMA No Lookahead : Higher-timeframe EMA (fast and slow) on a lower-timeframe chart, using only higher-timeframe bars that are already closed. Values never change after the bar closes. Author: Andrii Lysenko
Hotkeys: keyboard shortcuts for MQL4 experts and indicators, set in the inputs : One include file that gives your EA or indicator keyboard shortcuts the user types into the inputs, such as Shift+B. Each press fires one action, Shift+B never fires on a plain B, and a shortcut that cannot work is
Round Number Levels Session Grid : Round number levels for Gold (XAUUSD) and any symbol on MT5. Draws major and minor round levels around price plus Asia, London and New York session open lines, with an optional alert when a candle closes across a major level. Open source code. Author: Cristhian
Multi Timeframe Trend Dashboard : Multi timeframe trend dashboard for Gold (XAUUSD) and any symbol on MT5. Shows up, down or flat for up to 6 timeframes from a fast and slow EMA on the last closed bar, with the distance in points and an alert when all line up. Open source code. Author: Cristhian
Inside Bar Engulfing Scanner : Engulfing and inside bar scanner for Gold (XAUUSD) and any symbol on MT5. Marks bullish and bearish engulfing candles and inside bars on closed bars, draws the mother bar range as a box and can alert on each pattern. Arrow buffers for iCustom. Open source code. Author
Hotkeys: keyboard shortcuts for MQL5 experts and indicators, set in the inputs : One include file that gives your EA or indicator keyboard shortcuts the user types into the inputs, such as Shift+B. Each press fires one action, Shift+B never fires on a plain B, and a shortcut that cannot work is
Daily loss and max loss guard - prop firm rules in one include : Watches the equity like a prop firm does: daily loss limit and max loss limit, static or trailing, floating profit included. Stops new trades at a warning level, closes everything on a breach and remembers it after a restart. Author
Check out the new article: Detrended Cross-Correlation Analysis (DCCA) for Pairs-Trading Pair Selection Under Nonstationarity . A complete, native MQL5 toolkit for Detrended Cross-Correlation Analysis: engine, validator, basket scanner, and a reference spread-trading EA. The engine produces a
Check out the new article: Implementing a Zone-Aware Rollover Window Gate in MQL5 . CTradeWindows blocks EA entries during the daily rollover spread spike. Each window is a clock time in a zone such as New York, so it follows that zone through DST. CSpreadProfile learns the windows from tick spreads
Check out the new article: Using the MQL5 Economic Calendar for News Filter (Part 6): A Filter an EA Can Hold Two Of . This article describes refactoring an EA‑scoped news filter into a reusable MQL5 class. Inputs move into a configuration struct, while events, currency mapping, saved stops, a
Check out the new article: A Thin gRPC Inference Client: Serving a Live Python Model to MetaTrader 5 Without ONNX . Learn how to connect a LightGBM pipeline with a custom feature transformer to an MQL5 Expert Advisor without converting it to ONNX. The article covers the gRPC service, REST gateway
Check out the new article: Neural Networks in Trading: Mesh-Based Approximation of Event Streams as a Tool for Analyzing Price Patterns (Conclusion) . The article presents an adaptation of the EEMFlow framework for building highly effective trading models using MQL5. MeshFlow estimation algorithms
New article MQL5 Programming Basics: Strings is published: The article covers everything you can do with strings in MQL5. It should be of interest primarily to novice MQL5 programmers, while experienced developers will have a good opportunity to summarize and systematize their knowledge. Author
Return-to-Mean Clock: How Many Bars Does Price Take to Come Back to the Moving Average : Measures how long price takes to come back to its moving average. The histogram shows the distance of the close from an EMA in ATR. Every time that distance first reaches a stretch level (1, 2 and 3 ATR by
Smart Trade Assistant - MTF Trend Scanner with One-Click Risk Trading : Scans the trend on M5, M15, H1, H4 and D1, shows market bias, volatility, session and previous-day levels in one clean panel, and opens trades with one click using a risk-based lot, ATR stop loss and R:R take profit. Author
Backtest Data Preflight: check broker bar history before a backtest : Check the first and last available bars and the gaps between bars for a date range before a backtest in the MetaTrader 4 Strategy Tester. Author: George Ciprian Mandache
CustomStopOut: your own margin call and stop-out levels, worst order closed first : A script that sets your own margin call and stop-out levels above the broker's. It alerts when the margin level falls below your margin call level and, below your stop-out level, closes open orders one at a time, the
StrictJson: RFC 8259 JSON parser and writer for MQL4 : One include file that reads and writes JSON in MQL4. It refuses broken JSON and tells you the line and column of the mistake, keeps numbers exact, reads and writes UTF-8 files, and saves your EA's settings to a file and loads them back. Author