TCM MQL4 & MQL5 Coding Course
A practical course in writing MetaTrader 4 and MetaTrader 5 programs: the event model, data and indicators, trade requests and their results, symbol rules, state, logging, testing and migration, ending with a complete, commented Expert Advisor in both languages.
- 15 modules
- 148-page PDF
- MQL4 + MQL5 side by side
- Capstone EA source included
What's in the 15 modules
Four parts, from setting up MetaEditor to delivering a finished EA. Every code example comes in MQL4 and MQL5 with a tab to switch between them, and the capstone LearningEA source files (.mq4 and .mq5) are yours to study and change. Checked against the MetaQuotes documentation in October 2026.
Getting startedModules 01–03
- 01Foundations and setup
- 02Program structure and events
- 03Types, variables and scope
Core languageModules 04–07
- 04Conditions, loops and functions
- 05Price data, bars and time series
- 06Inputs and robust configuration
- 07Indicators and signal design
Trading operationsModules 08–11
- 08Trade requests and execution
- 09Position sizing and symbol constraints
- 10Stops, targets and price normalisation
- 11State, duplicate prevention and bar timing
Quality and deliveryModules 12–15
- 12Errors, logs and defensive coding
- 13Testing, debugging and reproducibility
- 14MT4 and MT5 differences and migration
- 15Capstone: build, document and deliver
A tool from Module 10
The stop validator checks a stop-loss and take-profit against the broker's stops level, measured from the right side of the spread, exactly as the course's code does.
Three questions from Module 10
Each module ends with six questions like these. Every answer comes with the reason, so a wrong answer still teaches you something.
Pick an answer to see how the knowledge checks work.
1. A buy at 1.08500 has a stop-loss at 1.08550. Should the validator accept it?
It is on the wrong side.
2. From which price is a buy's stop distance measured?
Buy: Bid − SL ≥ StopLevel.
3. Tick size 0.25. What does NormalizeToTick(5250.37) return?
5250.37 ÷ 0.25 = 21,001.48 → 21,001 × 0.25 = 5250.25.
- MetaTrader users who want to automate their own rules
- Coders moving between MQL4 and MQL5
- Anyone who has bought an EA and wants to read and judge code properly
- Anyone looking for a profitable EA to copy. The capstone shows how to build an EA safely, not a strategy to trade.
- Other platforms: the course covers MetaTrader only