Trendlines with Breaks EA
Adaptive trendline breakouts. Volatility-sloped lines. Non-repainting signals.
A fully automated MetaTrader 5 Expert Advisor that identifies short-term pivot highs and lows, projects adaptive diagonal trendlines from those pivots, and enters trades when price breaks through a projected line. The slope of every trendline is derived from live market volatility — not fixed angles — so the system continuously adjusts to changing conditions without manual intervention. Breakouts are detected on closed bars and never repaint. Ships with 19 symbol- and timeframe-tuned preset files.
What makes it different.
- Adaptive trendlines — pivot-anchored upper/lower lines that automatically re-slope to current volatility, no manual drawing required
- Three slope methods — ATR (responsive), StDev (smoother), LinReg (smoothest) — pick the best fit per instrument and timeframe
- Non-repainting signals — closed-bar breaks latched by upos/dnos state flags, arrows never move once printed
- Advanced risk management — fixed-lot or percent-risk sizing (balance or free margin), SL/TP in points, R:R enforcement, daily loss and profit kill-switches
- Four trailing stop modes — None, Classic (points), Trendline (tracks projection), ATR-based (volatility-adaptive) with break-even logic
- Signal filters — MA trend (SMA/EMA/SMMA/LWMA), RSI overbought/oversold, minimum bars between trades, direction lock (long/short/both)
- Session and day-of-week control — time-window filter, per-weekday flags, presets for London, New York, Tokyo, Sydney, and the overlap
- Live on-chart dashboard — symbol, timeframe, slope method, daily P/L, open positions, trade stats, and trend state
- 19 ready-to-load .set preset files — major FX, XAUUSD, XAGUSD, indices, and crypto across M15–D1
- Multi-symbol support — run concurrently on many charts using unique magic numbers to isolate positions and statistics per instance
Simulated on $10k starting equity at the stated CAGR. Past performance does not guarantee future results. See risk disclosure.
Every input, documented.
| Parameter | Default | What it controls |
|---|---|---|
| SlopeMethod | ATR | Volatility estimator used to slope the trendlines. ATR is most responsive; StDev smoother; LinReg smoothest. |
| SlopeLength | 14 | Lookback length for the slope calculation. Shorter = reacts faster; longer = more stable lines. |
| SlopeSteepness | 1.0 | Multiplier on the raw slope. Smaller values produce flatter, longer-lived trendlines; larger values close on price faster. |
| SwingLookback | 14 | Bars scanned on each side of a candidate pivot. 14 matches the default ATR length; raise for cleaner anchors on noisy symbols. |
| ShowTrendlines | true | Draws both projected lines on the chart. Purely visual — does not affect trading. |
| UseMAFilter | false | When enabled, only longs above the MA and shorts below. Reduces trade count but improves directional alignment. |
| MAMethod | EMA | Moving average type for the trend filter (SMA / EMA / SMMA / LWMA). |
| UseRSIFilter | false | Blocks entries when RSI is outside your configured range — useful for avoiding exhausted moves. |
| TradeDirection | Both | Long-only, short-only, or both directions. |
| LotSizingMode | Percent Risk | Fixed lots or percent-of-balance / percent-of-free-margin risk. Percent risk is the default for compounding. |
| RiskPerTradePct | 1.0 | Equity fraction risked per trade when using percent-risk sizing. Keep at 0.5–1.0 for sustainable compounding. |
| StopLossPoints | 200 | Stop loss distance in points from entry. Override per preset. |
| RRRatio | 2.0 | Take-profit distance as a multiple of the stop. 2.0 risks one to make two. |
| MaxDailyLossPct | 3.0 | Daily loss kill-switch. EA stops opening new trades for the rest of the session once this is hit. |
| MaxDailyProfitPct | 0.0 | Optional daily profit target that stops trading once reached. 0 disables. |
| TrailMode | ATR | Trailing stop: None, Classic (fixed points), Trendline (tracks the projected line), or ATR-based (volatility adaptive). |
| UseSessionFilter | false | Restricts trading to a configured time window (server hours). Combine with the weekday flags for tight control. |
| MaxSpreadPoints | 30 | Blocks entries when current spread exceeds this value — protects against news-window blowouts. |
| MaxOpenPositions | 1 | Caps concurrent open positions per magic number on this symbol. |
| MagicNumber | 20260418 | Unique identifier for this EA instance. Change per chart when running multiple copies. |
Full parameter reference in the PDF user guide included with your license.
Frequently asked.
Does it repaint?
No. Breakouts are detected on closed bars only, and the one-shot state flags (upos/dnos) prevent a signal from firing more than once. Arrows never move once printed.
Which slope method should I use?
Start with ATR — it is the most responsive and works well across major FX and metals. StDev is preferred on choppy pairs where ATR over-reacts. LinReg is best on slow, trending instruments like indices and higher timeframes.
Which timeframe works best?
H1 is the default recommendation — clean pivot formation without H4 delay. M15 suits active traders who want more breakouts. H4 and D1 are ideal for swing accounts and prop-firm evaluations.
What symbols are included as presets?
19 preset files ship with the EA — major FX (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, NZDUSD, USDCHF), XAUUSD, XAGUSD, US30, NAS100, SPX500, GER40, UK100, BTCUSD, ETHUSD across M15, H1, H4, and D1.
Is it prop-firm safe?
Yes. The daily loss kill-switch, max open positions cap, and optional profit target are designed for FTMO-style challenges. Use percent-risk sizing at 0.5% and the ATR trailing mode for best pass rates.
Do I need a VPS?
Recommended but not mandatory. The EA only evaluates signals on bar close, so execution latency matters less than it would for scalpers. A VPS mainly protects you from lost connections during news.
How do I get updates?
Every buyer gets lifetime updates delivered via your licensed download page. v2.00 is the current version; the next release adds a fourth slope method and per-weekday slope-steepness overrides.
Does it work on MT4?
No. This is MT5 only. The pivot, slope, and order APIs used here do not exist in MT4 in a form that produces identical results.
Ready to run Trendlines with Breaks EA?
Lifetime license. All presets included. Direct developer support.