Trendline with break
- Indicatori
- Minh Vuong Pham
- Versione: 2.0
What Is It?
Trendlines with Breaks is an auto-drawn trendline indicator that detects swing pivots, draws dynamic upper/lower trendlines, and fires breakout signals when price closes beyond those lines. No more manually drawing and adjusting trendlines — the indicator does it systematically.
Core Settings
| Parameter | Default | What It Does |
|---|---|---|
| Swing Detection Lookback | 14 | Bars left & right to confirm a pivot. Lower = more pivots, noisier lines. Higher = fewer pivots, smoother lines. |
| Slope Multiplier | 1.0 | Controls how steeply the trendline angles away from the pivot. Higher = steeper slope = wider channel. |
| Slope Method | ATR | How slope is calculated: ATR (volatility-based, recommended), StDev, or LinReg. |
| Backpaint | true | When ON, trendline is drawn back to the pivot bar (visually clean). When OFF, line starts at the confirmation bar (no repainting). |
| Show Extended Lines | true | Projects the current trendline as a dashed ray into the future. |
| Max Bars | 1000 | Limits calculation range. Set 0 for all history. |
Recommended Presets
- Scalping (M5–M15): Length 7–10, Mult 0.8, ATR
- Intraday (M30–H1): Length 14, Mult 1.0, ATR
- Swing (H4–D1): Length 20–30, Mult 1.2, ATR or StDev
How to Read the Indicator
Teal line (Upper): Resistance trendline anchored from the last swing high, sloping downward.
Red line (Lower): Support trendline anchored from the last swing low, sloping upward.
Teal arrow (▲): Bullish breakout — price closed above the upper trendline.
Red arrow (▼): Bearish breakout — price closed below the lower trendline.
Key behavior: Only one signal per trendline segment is fired. After a breakout arrow prints, the indicator waits for a new pivot to reset before it can signal again. This prevents signal spam.
Trading Strategies
Strategy 1: Breakout Momentum
The simplest approach — trade in the direction of the breakout.
Long Entry:
- Teal ▲ arrow appears (close above upper trendline)
- Enter on the next candle open
- SL below the breakout candle low (or below the lower trendline)
- TP: 1.5–2× risk, or trail using the lower trendline
Short Entry:
- Red ▼ arrow appears (close below lower trendline)
- Enter on the next candle open
- SL above the breakout candle high (or above the upper trendline)
- TP: 1.5–2× risk, or trail using the upper trendline
Filter: Skip signals that occur inside ranging/choppy markets. Use ADX > 20 or volume confirmation.
Strategy 2: Trendline Bounce (Mean Reversion)
Use the trendlines as dynamic support/resistance for pullback entries.
- In an uptrend, wait for price to pull back to the lower (red) trendline without triggering a break → go long
- In a downtrend, wait for price to rally into the upper (teal) trendline without triggering a break → go short
- Confirmation: bullish/bearish engulfing candle or pin bar at the trendline
Strategy 3: Break + Retest
The highest-probability setup:
- Wait for a breakout arrow (▲ or ▼)
- Do NOT enter immediately
- Wait for price to retest the broken trendline from the other side
- Enter when the retest holds (rejection candle pattern)
- SL beyond the retest wick, TP 2–3× risk
Recommended Toolkit Combination
TWB works best as part of a complete trading workflow. Here's a suggested stack:
1. Confirmation Indicators
- RSI (14) — Filter breakouts: only take long breaks when RSI > 50, short breaks when RSI < 50. Avoid signals in overbought/oversold extremes (possible false breaks).
- Volume Profile / Volume Indicator — Validate breakouts with above-average volume. Low-volume breaks are more likely to fail.
- 200 EMA — Macro trend filter. Only take longs above, shorts below.
2. Execution Tools
- One-Click Trade Panel — Essential for scalping and intraday. When a breakout arrow prints, you need fast execution. A one-click panel with preset lot sizes eliminates hesitation.
- TP/SL Manager (Partial Close) — Set automatic partial take-profit (e.g., close 50% at 1:1 R:R, trail the rest). The trailing portion can follow the TWB trendline.
- Risk Calculator / Lot Size Tool — Input your SL distance (from entry to the opposite trendline) and it auto-calculates position size for your risk % per trade.
3. Trade Management
- Trailing Stop EA — Set it to trail your stop along the TWB trendline. As the trendline moves, your stop follows.
- Session Indicator — Mark London/NY session boundaries. Breakout signals during session opens carry more weight than off-hours signals.
- Alert Manager — TWB fires signals visually, but pairing with an alert system (push/email/Telegram) means you never miss a setup.
4. Analysis Add-ons
- Multi-Timeframe Dashboard — Check if TWB breakout direction aligns across M15 + H1 + H4. Aligned signals = higher conviction.
- Economic Calendar Panel — Avoid trading breakouts 15 min before/after high-impact news releases.
Quick Rules Cheat Sheet
✅ DO:
- Wait for candle close to confirm breakout (the arrow only prints on close)
- Use higher timeframe trend as directional filter
- Set Backpaint OFF for live trading (no repaint)
- Increase Length on higher timeframes
- Combine with volume for breakout validation
❌ DON'T:
- Trade every single arrow — filter for quality
- Use very low Length (< 5) on high timeframes — too noisy
- Ignore the macro trend — breakouts against the trend fail more often
- Enter without a stop-loss — the opposite trendline is your natural SL level
- Over-leverage on the first breakout — wait for retest if unsure
Example Workflow (Step by Step)
- Chart Setup: TWB (Length 14, Mult 1.0, ATR, Backpaint OFF) + 200 EMA + RSI(14) + Volume
- Bias: Price above 200 EMA → look for longs only. Below → shorts only.
- Signal: Teal ▲ arrow prints. RSI > 50. Volume above 20-period average. ✓
- Entry: Market buy on next candle open via One-Click Panel
- SL: Below the red (lower) trendline or breakout candle low
- TP1: 1:1 R:R → close 50% (TP/SL Manager auto-handles)
- TP2: Trail remaining position using the lower trendline (Trailing Stop EA)
- Exit: Either TP2 hit or red ▼ arrow prints (trend reversal)
Final Notes
Trendlines with Breaks removes subjectivity from trendline trading. The indicator's strength is systematic pivot detection + clean breakout signals. But like any indicator, it's not a standalone system — the recommended toolkit above turns it from a signal generator into a complete trading workflow.
Start on demo. Backtest at least 100 signals on your preferred timeframe before going live. Track your win rate on breakout vs. retest entries separately — most traders find the retest strategy more consistent.
Settings are starting points — optimize for your instrument and timeframe.
