Auto Trendlines and Channels with Breakout Alerts
- Indicadores
- Versão: 1.0
Draws the best-scoring support and resistance trendlines from swing points, with touch counts, an optional parallel channel line, and breakout arrows and alerts on candle close.
Auto Trendlines and Channels draws trendlines for you from the swing highs and swing lows on your chart, then ranks them so that the lines that matter most are the ones you see.
How it works
1. The indicator finds swing highs and lows. A swing is confirmed only after the chosen number of bars has closed on each side.
2. It tests lines through pairs of recent swing points. A line is kept only if no candle has closed through it (with a small tolerance based on ATR) since its first point.
3. Each valid line gets a score from the number of swing points that touch it, how long it is and how recent it is. The best resistance and the best support lines are drawn (up to three per side).
4. Each line is labelled with its touch count and current price, for example "S 3T 1.08450".
5. For the best line of each side, an optional parallel channel line is drawn through the opposite extreme.
Breakouts
When a candle closes beyond a line by more than your ATR threshold, an arrow is drawn on that candle and an alert is sent (pop-up, sound or push). Breakouts are checked on closed candles only.
Updates
Lines are recalculated when a new candle opens. The current candle does not change the lines. Because the lines are re-ranked on each new candle, a line can change or disappear as the market moves: this is a charting aid and not a fixed history of past lines.
Inputs
- Swing points: strength, bars scanned, swing points considered.
- Line selection: minimum touches, minimum span, touch tolerance, close tolerance, maximum distance from price, lines per side, channel on/off.
- Breakouts and alerts: arrows, ATR threshold, alerts.
- Style: colours, width and styles of the line and channel, labels, small status panel, footer line on/off.
Notes
- Works on any symbol and timeframe. All distances use ATR, so there are no pip settings.
- Buffer 0 holds the breakout direction of the last closed candle (1 up, -1 down, 0 none).
- This indicator does not open, modify or close trades. It is an analysis tool and not financial advice. Breakouts can fail and price can return inside a line. Past behaviour of price does not guarantee future results.
Questions and suggestions are welcome in the comments section of this product.
