Explore the latest free tools from the MQL5 community. Here's a new indicator, expert advisor, or script for MetaTrader.
The project introduces a lightweight trading prototype built around an interactive supply and demand zone management framework. The objective is not to present a complete trading methodology or claim a finished automated trading system, but to demonstrate how structured zone analysis can be combined with validation logic, trade management, and market context evaluation.
The configurable input parameters control different areas of the trading framework, including:
- Strategy Automation Controls — Enable or disable automated signal processing, configure the Expert Advisor identifier, and define basic execution parameters.
- Risk, Spread & Trade Protection — Manage trading conditions through spread limits, risk-reward targets, and volatility-based protection settings.
- Trailing Stop Settings — Control optional position management by allowing profits to be protected as price moves favorably.
- Higher Timeframe Trend Filter Parameters — Apply broader market context confirmation using trend direction and momentum exhaustion checks.
- Approach Context Parameters — Evaluate how price moves toward a qualified zone, helping distinguish between controlled approaches and aggressive market movements.
The main focus of this implementation is the interactive zone management system. Each qualified supply or demand zone maintains information about its lifecycle, structural quality, and interaction history as market conditions develop.
Recover from drawdowns intelligently with the Auto Recovery Expert Advisor for MT4/MT5. Perfect for hedging strategies. Learn more.

Fig 1. Supply Demand Zones drawn with an example Entry.
One of the key outputs of this project is the detailed zone logging system. The generated logs provide a record of how zones are formed, monitored, tested, and invalidated over time. Traders can use this information to study zone behavior, review historical interactions, and develop their own trading ideas or decision processes. Navigate here to find the logfiles
![]()
Fig 2. log file location.
The trading strategy included in this release is provided as an example of how the zone framework can be applied in an automated environment. Users are encouraged to explore the generated zone data, experiment with the available settings, and adapt the framework according to their own trading approach.
The primary goal of this project is to demonstrate a structured way of managing supply and demand zones while providing useful information that can support further analysis, experimentation, and strategy development.
For a deep dive in regard to this codebase please read these articles👇👇
Part I, Part II, Part III
Notice: This tool is designed purely as a foundational framework and should be utilized exclusively within a demo environment. The primary value of this engine lies in its comprehensive logging infrastructure; I encourage you to experiment with routing these logs to external applications or analytical bots. For anyone seeking an expanded feature set, a commercial utility based on this logic is available in the Market.|
File Name |
Description |
|---|---|
|
MasterLog1.mqh |
A reusable logging module used by the Expert Advisor. It provides the logging functionality required by the project. |
|
DynamicSR4.mq5 |
The main Expert Advisor. It demonstrates the Dynamic Support and Resistance interaction engine presented and serves as the entry point for the accompanying source code. |
| TradeManager.mqh | Implements the trade execution and position management layer. It is responsible for submitting, monitoring, and managing orders generated by the strategy while remaining independent of the decision-making process. |
| ZoneStrategy.mqh | Implements the trading decision engine. It evaluates qualified supply and demand zones through a sequence of validation filters before generating trade requests that are delegated to the trade manager for execution. |
| MQL5.zip | An archive with theMQL5 the terminal installation directory, and each file will be placed in its correct location:DynamicSR4.mq5MasterLog1.mqh,TradeManager.mqh, andZoneStrategy.mqh |
Complement community code with advanced automation from RobotFX.
75178