Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
Camarilla Trend Day Expansion is a breakout trading strategy built on the classic Camarilla pivot points — a set of intraday support and resistance levels calculated from the previous day's high, low, and close. Camarilla pivots have long been a favorite of floor traders and short-term day traders because they split a session into two behavioral regimes: quiet "range days," where price rotates between the inner bands, and directional "trend days," where price breaks the outer bands and runs. This strategy is designed specifically to study the second regime — the trend-day expansion.
Most Camarilla systems fade the inner reversal bands, betting that price snaps back into the day's range. This one does the opposite. It ignores the mean-reversion trade entirely and only looks for a conviction breakout of the outer H4 (upside) or L4 (downside) band, then projects toward the H5/L5 extension targets that traders associate with a genuine trend day. In short, it is a momentum-continuation approach dressed in a well-known pivot framework.
As a learning tool, this strategy suits traders who want to understand how pivot-based levels, breakout confirmation, and volatility-scaled risk fit together in a single automated system. It is best viewed as a strategy analysis exercise — a way to see how a rules-based trend-day filter behaves — rather than a shortcut to any particular outcome. If you are studying price structure, breakout confirmation, or reward-to-risk filtering, this EA offers a clean, self-contained example.
How It Works
The strategy reconstructs each trading "day" by watching the calendar date of the chart's own bars roll over — it never reads a higher timeframe. When a new day begins, the levels from the day that just finished are frozen so they cannot repaint, then used to govern trading for the new session.
Level calculation (from the previous completed day's High, Low, Close, with R = High − Low):
- H3 / L3 — inner reversal bands:
C ± R × 1.1 / 4 - H4 / L4 — outer breakout bands:
C ± R × 1.1 / 2 - H5 / L5 — trend-day extension targets:
H5 = (H / L) × CandL5 = 2C − H5
The strategy signals a long trade when:
- A freshly closed bar closes clear above the H4 band by an ATR-based buffer (ATR, the Average True Range, measures recent volatility).
- The prior bar was still at or below H4, confirming the break is genuinely fresh rather than a continuation of an old move.
- The breakout candle is a bullish conviction body — its body is at least a set fraction of its total range, filtering out indecisive wicks.
- The projected H5 target sits above H4, and the reward-to-risk ratio clears the minimum filter.
The strategy signals a short trade under the mirror-image conditions: a fresh, high-conviction bearish close below the L4 band, with the prior bar at or above L4, targeting the L5 extension.
Stop-loss logic:
- For longs, the stop is placed just under the broken H4 band or the breakout bar's low (whichever is lower), minus an ATR buffer.
- For shorts, the stop is placed just above the L4 band or the breakout bar's high, plus an ATR buffer.
- This keeps the stop anchored to real structure — if price falls back inside the band, the trend-day thesis is invalidated.
Take-profit logic:
- The target is the structural H5 (long) or L5 (short) extension level — a fixed magnet rather than an arbitrary pip count.
- Because both stop and target are structural, the strategy applies a minimum reward-to-risk filter and discards any breakout whose target sits too close to the stop to justify the trade.
Additional controls: only one position per magic number is held at a time, only one trade per side per day is permitted, and a spread filter blocks entries when trading costs are unusually wide.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| AtrPeriod | 14 | 5 | 40 | ATR lookback used to size the breakout confirmation buffer and the stop buffer. |
| BreakBufferAtr | 0.10 | 0.00 | 1.00 | How far beyond H4 / L4 (in ATRs) the bar must close to confirm a valid break. |
| StopBufferAtr | 0.50 | 0.10 | 2.50 | Extra stop distance beyond the band and the breakout bar's extreme, in ATRs. |
| BodyFrac | 0.50 | 0.20 | 0.90 | Minimum breakout-candle body ÷ range — demands a conviction close, not a wick. |
| MinRewardRisk | 1.20 | 0.50 | 4.00 | Rejects breaks whose H5 / L5 target is closer than this multiple of the stop risk. |
| MaxSpreadPoints | 100 | 5 | 300 | Skips new entries when the current spread (in points) is wider than this value. |
| Lots | 0.10 | 0.01 | 1.00 | Fixed trade volume in lots. |
| Magic | 7758 | 0 | 9,999,999 | Unique identifier so the EA manages only its own positions. |

Recommended Chart Settings
Camarilla day-trading has a natural home on liquid instruments and intraday timeframes. This strategy was designed with a liquid FX major, gold, or a stock index in mind — for example EURUSD, XAUUSD, or US30 — running on an M15 to H1 timeframe. These conditions give the daily range enough structure for the H4/L4 breakout bands and H5/L5 targets to be meaningful.
That said, the EA is timeframe-agnostic by design: it reconstructs the "day" from whatever primary timeframe you select, so it will run on other symbols and periods too. Results will vary considerably across different instruments, sessions, and market conditions, so treat any single configuration as a starting point for your own study rather than a fixed recommendation.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Strengths of this approach. The strategy is built on transparent, widely documented math — you can recompute every Camarilla level by hand. Its entries are strict: a fresh break, a conviction candle body, an ATR-scaled confirmation buffer, and a reward-to-risk floor all have to align. Because both the stop and target are anchored to structure rather than fixed pip values, the logic self-scales across instruments and volatility regimes, which makes it a clean example for studying rules-based risk design.
Known limitations. Breakout systems are, by nature, vulnerable to false breaks — days where price pokes above H4 or below L4 and then reverses. On genuine range days (the majority of sessions for many instruments), the outer bands may never break, or may break and fail, producing whipsaw losses. Reconstructing the day from bar dates means the session boundary depends on your broker's server time, which can shift the levels between brokers. And because the strategy takes at most one trade per side per day, it deliberately passes on many moves — it is selective rather than active.
Where it may underperform. Choppy, low-volatility, or heavily range-bound markets are the natural weak point of any trend-day breakout method. News-driven spikes can trigger a break just before a sharp reversal, and thin liquidity can widen spreads beyond the filter's tolerance. This is a strategy to study and stress-test, not to deploy blindly.
Risk Management Tips
Sound risk management matters more than any single entry rule. As general educational principles:
- Risk only a small, fixed fraction of your account per trade — many educators suggest no more than 1–2%. Size your lots to match that risk given the strategy's structural stop distance, rather than leaving the default lot size unchanged.
- Always test on a demo account first. Run the EA in MT5's Strategy Tester and on a demo feed across several months of data before considering anything else.
- Understand drawdown. Even a well-designed strategy will string together losing trades. Know the maximum losing streak and equity drawdown you are prepared to tolerate in advance.
- Account for costs. Spreads, commissions, and slippage all erode breakout entries; keep the spread filter realistic for your broker.
- Never risk money you cannot afford to lose, and treat automated trading as an ongoing study, not a set-and-forget solution.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: CamarillaTrendDayExpansion.ex5 (0 downloads)
- Source Code: CamarillaTrendDayExpansion.mq5 (1 downloads)
- Documentation: CamarillaTrendDayExpansion.pdf (1 downloads)