Supply and demand indicators MT5
- Göstergeler
- Xin You Lin
- Sürüm: 2.51
- Etkinleştirmeler: 5
🔷 FX-AIEA Smart Supply and Demand Zone Identification Indicator (Supply and Demand Indicators MT5)
Version: 2.51 | Compatible Platform: MetaTrader 5
🎯 Why do trades need supply and demand zones?
Supply and demand zones are the core manifestation of institutional order flow, reflecting real buying and selling power more accurately than traditional support and resistance. However, manual drawing is not only time-consuming but also highly subjective and prone to missing key areas.
FX-AIEA Supply-Demand Zone Indicator employs an adaptive ZigZag algorithm to automatically identify high-probability supply and demand areas, and marks them with colored rectangles on the chart for a clear view of the current market's "no-go zones" and "opportunity zones."
⚙️ Core Features
✅ Fully Automatic Drawing + Real-time Refresh
Dynamically extracts effective peaks and troughs based on an improved ZigZag, accurately pinpointing potential supply areas (red) and demand areas (sky blue).
New K-line automatic update: The indicator uses the native MQL5 prev_calculated mechanism, recalculating and redrawing the area each time a new K-line appears, never "stuck and not refreshed".
Supports manual refresh (double-click on the chart or switch periods), ensuring data is always synchronized.
✅ Flexible timeframes
Forced_TimeFrame parameter: Can force the indicator to run on any period (e.g., load the indicator on an hourly chart but calculate the area based on daily data).
Default follows the current chart cycle, meeting different trading styles such as intraday, swing, and long-term.
✅ Two area boundary modes
Mode Description Aplicable scenarios
Wide mode (default) Area covers the extreme values of the candlestick body and shadows Conservative trading, waiting for the price to completely leave the area
Narrow band mode (use_narrow_bands) Area only covers the K-line body part Aggressive entry, looking for quick retrace confirmation
✅ "Kill Retouch" noise reduction algorithm
With kill_retouch enabled, it automatically eliminates weak areas that are repeatedly "touched" by subsequent market movements but do not effectively break through, retaining only those that truly have institutional order block influence.
Significantly reduces false signals and improves area effectiveness.
✅ Visual customization (fully compliant with MT5 drawing standards)
Fill rectangles + price arrow labels, clearly marking area boundaries and current price positions.
Supply area color (TopColor), demand area color (BotColor), and price label color (Price_mark) can be set independently.
Supports rectangle fill transparency (Rectangle_fill), border thickness, etc., integrating into any chart style.
✅ High-performance design
Batch loads price data at once, avoiding repeated calls to the Copy function, with extremely fast calculation speed.
Handles up to 2000 K-line candles, balancing historical depth and operational efficiency.
📊 Indicator output description
Red rectangular area: Supply Zone – Price is likely to fall after touching.
Sky blue rectangular area: Demand Zone (Demand Zone) - Price is likely to rise after touching.
Right gray arrow: Shows the position of the current price relative to this area, assisting in identifying whether it is 正在回踩.
Indicators do not draw extra lines, only leaving clean rectangular areas, perfectly coexisting with your existing technical analysis tools.
🧠 Example of Trading Strategies
① Re-test Entry (Most Common)
After the price breaks through the supply/demand zone, it re-tests the boundary of the area for the first time.
Enter in combination with K-line reversal patterns (such as pin bar, engulfing).
Stop-loss is set outside the zone, take-profit looks towards the next opposite zone.
② Breakout Confirmation
When the price breaks strongly with a K-line above the supply zone upper trendline or below the demand zone lower trendline, it indicates that the original zone has become invalid, and 顺势追单 can be made.
③ Multi-timeframe Confluence
Use indicators to find immediate opportunities on smaller timeframes (like M15), while confirming major supply-demand zones on larger timeframes (like H4), and only trade in the direction of the main trend.
🔧 Overview of Input Parameters
Parameter Type Default Value Description
Forced_TimeFrame int 0 Forced calculation timeframe (0 = current timeframe)
use_narrow_bands bool false Whether to use narrowband mode (boundaries reduced to entities)
kill_retouch bool true Automatically eliminate weak areas that are lightly touched
TopColor color clrRed Supply area color
BotColor color clrDeepSkyBlue Demand area color
Price_mark color clrDimGray Price arrow color
Price_Width int 1 Arrow width
Rectangle_fill bool true Whether to fill the rectangle background
Rectangle_border_width int 1 Rectangle border width
Internal ZigZag parameters (period 13, deviation 8, step back 5) have been optimized for a long time and generally do not need to be modified.
🛡️ Compliance Statement
This indicator is only a technical analysis auxiliary tool, does not constitute investment advice, nor does it guarantee future profits.
All signals are for reference only, and users should make autonomous decisions based on their own risk tolerance.
The indicator does not contain any backdoors, malicious code, and does not access the network or external systems.
