Code & convert EAs
Guides to writing MQL5 Expert Advisors and indicators and converting MQL4 to MQL5: magic numbers, hedging vs netting, OnNewBar, ATR and more.
- Hedging vs Netting Accounts: Why Your EA Breaks on One of Them — — Understand MT5 hedging and netting accounts, how they affect EA positions, and how to make your MQL5 trading system account-compatible.
- Magic Numbers in MT5: How to Stop Your EA from Touching Other Trades — — Learn how to assign and check MT5 magic numbers in MQL5 and MQL4 to prevent Expert Advisors from interfering with other trades.
- What Is Quant Trading? Explained Simply — — Learn what quant trading is, how quantitative strategies work, common examples, and the risks beginners should understand before using them.
- Trend Following EAs: When They Work and When They Die — — Why trend-following Expert Advisors that look great in backtests struggle live, and the regime, cost and correlation filters to build into one.
- Why Many Traders Misuse ATR (and How to Use It Properly) — — ATR is everywhere, and often misused. What Average True Range really measures, why one fixed setting fails, and how to code ATR stops, filters and sizing.
- Coding Custom Indicators in MQL5: A Practical Guide — — Build a custom MQL5 indicator from scratch. The #property setup, indicator buffers, OnCalculate, prev_calculated and the mistakes that slow indicators down.
- Converting MQL4 to MQL5: 7 Things to Remember — — Porting an EA or indicator from MT4 to MT5? The seven MQL4 to MQL5 changes that matter most, from trade requests and positions to indicator handles.
- OnNewBar: Run Your Trading Bot Once per Candle in MQL4 and MQL5 — — MetaTrader has no OnNewBar event. A small, reusable pattern to run your EA's logic once per candle in MQL4 and MQL5, and the mistakes that cause repeat signals.
- MQL4 vs MQL5: The Differences That Matter for Your Code — — MQL4 and MQL5 look alike but work differently. How trading, events, indicator handles and price data differ between MetaTrader 4 and MetaTrader 5 code.
Related tool
MQL4 to MQL5 converter: MT4 EAs and indicators to MT5