Channel Detector Indicator
- Indicators
-
Elham Afsharpour
I am an experienced trading software developer with 8 years of programming experience, especially in Python, C++, and MQL5. During the last 2 years, I have focused mainly on developing Expert Advisors, custom indicators, trading tools, and automation systems for MetaTrader. - Version: 1.0
- Activations: 5
ATD Channel Pattern Detector is a MetaTrader 5 indicator for detecting and drawing price channels directly on the chart.
ATD Channel Pattern Detector is a visual technical-analysis tool designed to identify possible ascending, descending, and horizontal channel structures based on price movement. The indicator scans historical bars, detects channel formations using its internal pattern-detection logic, and draws the detected channel lines on the chart.
This indicator is not an Expert Advisor. It does not open, close, or manage trades. It only analyzes the chart and displays detected channel structures visually. It can be used as an additional tool for manual chart analysis, discretionary trading, market-structure review, and technical-analysis confirmation.
The indicator can draw detected channels using separate colors for bullish, bearish, and neutral structures. It also includes optional popup, sound, and email alerts when a new channel is detected.
Main Features
-
Detects price channel structures on the chart
-
Draws channel lines automatically
-
Supports bullish, bearish, and neutral channel colors
-
Works directly on the selected chart symbol and timeframe
-
Optional popup alert
-
Optional sound alert with embedded sound resource
-
Optional email alert through MetaTrader 5 email settings
-
Clean input groups for easier setup
-
Indicator-only tool; no trading operations are performed
How It Works
The indicator analyzes recent price data and searches for channel-like structures using the selected search range and detection parameters. It checks whether price swings form a valid channel according to the configured rules, including the number of bars, symmetry, matching ratio, threshold, and angle difference.
When a valid channel is found, the indicator draws the channel lines on the chart. The channel color depends on the detected channel direction:
-
Bullish channel: shown with the bullish color
-
Bearish channel: shown with the bearish color
-
Neutral channel: shown with the neutral color
If alerts are enabled, the indicator can notify the user when a new channel is detected. Alerts are triggered only when a new channel appears, helping to avoid repeated duplicate alerts on the same candle.
Inputs
Search Settings
Look Back Bars
Sets how many candles the indicator scans when searching for channel patterns. A higher value allows the indicator to analyze more historical data, while a lower value focuses only on recent market structure.
Channel Detection
Threshold
Controls the sensitivity of channel detection. Lower values may detect more patterns, while higher values make the detection stricter.
Minimum Bars
Sets the minimum number of candles required for a valid channel pattern.
Maximum Bars
Sets the maximum number of candles allowed for a detected channel pattern.
Symmetry
Controls how balanced the detected channel structure should be. Higher values make the channel validation stricter.
Pair Matching Ratio
Defines how closely the selected swing points should match the channel structure. Higher values require stronger matching between channel points.
Angle Difference
Sets the allowed difference between channel line angles. Lower values require the channel lines to be more parallel.
Line Colors
Bullish Channel Color
Color used for bullish or upward channel structures.
Bearish Channel Color
Color used for bearish or downward channel structures.
Neutral Channel Color
Color used for neutral or sideways channel structures.
Alerts
Popup Alert
Enables or disables MetaTrader 5 popup alerts when a new channel is detected.
Sound Alert
Enables or disables sound alerts when a new channel is detected. The sound is embedded in the indicator, so users do not need to manually copy a sound file.
Email Alert
Enables or disables email alerts. To use this option, email must be configured correctly in MetaTrader 5 under Tools → Options → Email.
Notes
-
This is a visual indicator only.
-
It does not execute trades.
-
It does not manage orders or positions.
-
It does not use martingale, grid, recovery, or money-management logic.
-
Alerts do not work in the Strategy Tester because MetaTrader 5 does not execute real popup, sound, or email alerts in tester mode.
-
For email alerts, the user must configure SMTP email settings in MetaTrader 5.
-
The indicator should be tested on the user’s preferred symbols and timeframes before being used as part of any trading decision.
Suggested Usage
ATD Channel Pattern Detector can be used to review market structure and identify possible price channels. Traders may use the drawn channels as an additional visual reference for support, resistance, trend direction, consolidation areas, or breakout analysis.
The indicator is suitable for traders who prefer clean chart-based analysis and want an automatic way to highlight possible channel structures without manually drawing every channel.
