Articles

Engineering a Self-Healing Expert Advisor in MQL5 (Part 4): Trade-State Reconciliation and Safe Mode Recovery for MetaTrader 5

This article adds trade-state reconciliation and Safe Mode recovery to a MetaTrader 5 Expert Advisor. The EA continuously validates recovery integrity by comparing the live broker position with the persisted SQLite state and the in-memory runtime state. Detected inconsistencies trigger an automatic

Engineering a Self-Healing Expert Advisor in MQL5 (Part 3): Restart-Aware Breakeven and Trailing Systems for MetaTrader 5

Building on Part 2, the implementation introduces restart-aware breakeven and trailing-stop systems for MetaTrader 5. The EA persists the state, such as breakeven activation, last trailing price, and virtual SL in SQLite, then restores them on startup. This preserves dynamic protection flow and

Engineering a Self-Healing Expert Advisor in MQL5 (Part 2): Restart-Safe Virtual Trade Protection for MetaTrader 5

Build a restart-aware virtual protection layer on top of the SQLite persistence from Part 1. The EA reconstructs hidden stop-loss and take-profit after restart, verifies current price against recovered exits, and closes or continues positions accordingly. The result is a consistent recovery path

Engineering a Self-Healing Expert Advisor in MQL5 (Part 1): Persistent Trade State Architecture for MetaTrader 5

This article demonstrates how to build the persistence foundation of a self-healing Expert Advisor in MQL5 using SQLite. Readers will learn how to create a permanent trade-state storage layer capable of surviving terminal restarts, shutdowns, and unexpected interruptions. The article covers SQLite

Building a Trade Analytics System (Part 4): Summary Metrics and Dashboard for MetaTrader 5

This article extends the existing Flask backend to compute performance analytics from stored MetaTrader 5 closed trades and deliver them as both JSON and a simple web view. It calculates total trades, total profit, win rate, average profit, and trade duration metrics, returning JSON at

Building a Trade Analytics System (Part 3): Storing MetaTrader 5 Trades in SQLite for MetaTrader 5

This article extends a Flask backend to reliably receive, validate, and store closed trade data from MetaTrader 5 using SQLite and Flask‑SQLAlchemy. It implements required‑field checks, timestamp conversion, transaction‑safe persistence, and working retrieval endpoints for all trades and single

Building a Trade Analytics System (Part 2): How to Capture Closed Trades and Send JSON in MQL5 for MetaTrader 5

We build a lightweight bridge that captures closed trades in MetaTrader 5 and sends them to an external backend over HTTP as JSON. It uses OnTradeTransaction for event detection, reads details from deal history, assembles a JSON payload, and posts it via WebRequest. A local Flask API is used to test

Building a Trade Analytics System (Part 1): Foundation and System Architecture for MetaTrader 5

We design a simple external trade analytics pipeline for MetaTrader 5 and implement its backend in Python with Flask and SQLite. The article defines the architecture, data model, and versioned API, and shows how to configure the environment, initialize the database, and run the server locally. As a

Larry Williams Market Secrets (Part 15): Trading Hidden Smash Day Reversals with Market Context for MetaTrader 5

Build an MQL5 Expert Advisor that automates Larry Williams Hidden Smash Day reversals. It reads confirmed signals from a custom indicator, applies context filters (Supertrend alignment and optional trading‑day rules), and manages risk with stop‑loss models based on smash‑bar structure or ATR and a

Larry Williams Market Secrets (Part 14): Detecting Hidden Smash Day Reversals with a Custom Indicator for MetaTrader 5

This article develops a practical MQL5 indicator that identifies Hidden Smash Day bars by strict numeric criteria and optional confirmation on the following session. We cover detection routines, buffer registration, and plot configuration to place arrows at valid bars. The approach delivers stable

Forum

MQL5 Market Issue

Hello Developers, While attempting to upload my EA to the Market, I encountered a confusing error. If anyone has experienced this before, I’d really appreciate your insight on what it means and how to resolve it. Any assistance is highly appreciated test on EURUSD,H1 (netting) strategy tester report

SnR

Guys what's the best objective method to define and detect Support and Resistance Zones using MQL5

How to download MT4?

How can I get MT4? Whenever I download the MT4 window setup and run it, it ends up installing MT5. This is confusing as I actually need MT4 to write EAs for my clients