Open to work
02 / 06 · Case studyAlgorithmic trading

A trading robot for MetaTrader 5 that finds price zones and trades them.

Year
2022 to 2025
Role
Design, code and testing
Stack
MQL5, C++, MetaTrader 5, AWS EC2
Status
Built and tested. Video coming.

Markets turn at the same places

Price often reverses at levels where it has turned before. Traders call these support and resistance zones. Finding them by eye is slow, and people break their own rules when money is on the line.

A robot does not get tired or scared. But it needs exact rules.

A robot that maps zones, then acts

ZoneTrader Pro is an Expert Advisor (EA): a program that trades by itself inside MetaTrader 5. I wrote it in MQL5, a C++ style language made for trading.

It scans price history for an apex: a high or low where price turned hard. It checks the bars before and after the apex. If the move is deep enough, the area becomes a zone. When price comes back and breaks the zone, the robot trades.

  1. 01Price data
  2. 02Find apex
  3. 03Validate zone
  4. 04Check filters
  5. 05Place trade
  6. 06Manage exit

Rules a robot can follow

Zone detection
An apex needs a set number of bars and a minimum depth, before and after it.
Entry modes
Market orders fire at once. Pending orders wait at the zone price.
Position sizing
Fixed lots, or a set percent of the account risked on each trade.
Stop-loss and take-profit
The stop sits behind the zone. The target follows a risk-to-reward ratio.
Five risk filters
Trading sessions, news events, daily gain and loss limits, a cap on open trades and a spread check.
Control panel
On-chart buttons pause buying or selling and close trades by hand.

The robot in numbers

5
independent risk filters guard every trade
2
entry modes: market orders and pending orders
24/5
runs on a cloud server (AWS EC2) while the market is open

What comes next

Score each zone by its depth and age, so the robot trades only the strongest. Then let a model tune the settings as the market changes.