Angle Channel Detector
- Indicators
-
Carlos Dante Diaz
Hi, I'm Carlos Díaz, a programmer and algorithmic trader from Argentina with more than 10 years of experience as a trader. I design, code and test all my Expert Advisors in MQL5, using MetaEditor and the MetaTrader 5 Strategy Tester. - Version: 2.0
Angle Channel Detector: find the steepest, noise-free trend segments on the chart
Angle Channel Detector analyzes price using linear regression and draws a clean channel ONLY when its slope exceeds the minimum angle you define. No clutter or overlapping lines: each channel is a straight segment with two parallel bands and a dotted middle line.
WHAT IT SHOWS
- Bullish (green) and bearish (red) channels when the angle exceeds the minimum.
- The current channel is always visible, in gray if it doesn't meet the minimum yet.
- Previous historical channels without overlapping each other. You decide how many channels to show and how many bars back to analyze.
- A label on each channel with its angle in degrees and percentage slope.
- A panel in the top right corner with current channel data.
AN ANGLE YOU CAN ACTUALLY COMPARE
The angle is calculated using the regression slope relative to the ATR. If the price rises by one ATR per bar, the angle is 45°. This makes values comparable across symbols and timeframes, and the default parameters are designed to work across different assets without recalibration. You can also choose percentage-per-bar calculation.
OPTIONAL ALERTS
On-screen popups, mobile push notifications, or emails when the channel turns steeply bullish or bearish. Alerts are evaluated at the close of the bar.
CUSTOMIZATION
- Colors for the bullish, bearish, and current channels.
- Line thickness and text size.
- Option to hide labels and the panel.
MAIN PARAMETERS
- Channel periods (regression): number of bars per channel (50 by default).
- Channel width (standard deviations): width of the bands (2.0 by default).
- Deviation calculation: price deviation or residual deviation (tighter bands).
- Price source: price used in the calculation.
- Angle calculation: slope relative to ATR (recommended) or percentage per bar.
- Minimum angle to detect (degrees): minimum angle to mark a channel (10° by default).
- ATR period (ATR mode): ATR period (14 by default).
- Always show the current channel: displays the current channel in gray even if it doesn't exceed the minimum.
- Maximum channels to show: maximum number of channels on the chart.
- Number of bars back to analyze: how many bars back to analyze.
HOW TO USE IT
It serves as a visual aid to identify strong trends, filter trades based on market slope, or confirm context before making a decision. A larger angle indicates a steeper segment. It works on any symbol and timeframe, uses price data only, and does not open trades on its own.
IMPORTANT
Channels are recalculated upon the close of each bar. The current channel and the location of previous ones may change as new bars appear. Test the indicator on a demo account first.
Leveraged trading involves the risk of loss. This indicator is an analysis tool and does not guarantee results.

