Articles

Custom Indicator Workshop (Part 4) : Automating UT Bot Alerts into a Trading Expert Advisor for MetaTrader 5

This article shows how to build an MQL5 Expert Advisor around the UT Bot Alerts indicator. The EA reads custom indicator signals via iCustom() and CopyBuffer(), evaluates entries only on new bars, using the last closed candle at index 1, and enforces a one-direction-at-a-time model by closing

Custom Indicator Workshop (Part 3): Building the UT Bot Alerts Indicator in MQL5 for MetaTrader 5

This article demonstrates how to build the UT Bot Alerts indicator in MQL5 using a clear, step-by-step approach. The tutorial explains how to implement an ATR-based trailing stop system, compute a custom EMA for signal detection, and generate buy and sell signals without repainting. The final

Engineering a Self-Healing Expert Advisor in MQL5 (Part 5): Real-Time Recovery Dashboard (Final Part) for MetaTrader 5

This article implements a real-time monitoring dashboard for a self-healing MetaTrader 5 Expert Advisor. The dashboard displays the current EA state, virtual stop-loss and take-profit levels, breakeven and trailing status, recovery state, synchronization status, and heartbeat information directly on

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

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