Magix Box EA
- Experts
- 버전: 1.1
- 활성화: 5
Magix Box EA - First H1 Candle Breakout
Automated daily breakout EA: the first H1 candle after the session break becomes the box. Breakout on H1 close, two orders with one stop outside the box, TP1 1R + break-even, TP2 2R. Risk % sizing, no grid, no martingale.
Magix Box EA trades one clear, rule-based setup per day - fully automatic.
Every day the EA takes the first H1 candle after the daily session break as the box. When an H1 candle closes outside the box, it opens the trade in the breakout direction, with the stop loss outside the opposite side of the box and two take-profit levels. The position is split into two orders: the first takes profit early, the second runs to the final target with the stop at break-even.
No grid. No martingale. No averaging. Every order has a stop loss on the broker server.
HOW IT TRADES
1. The box
- The first H1 candle after the daily session break becomes the box.
- The session break is detected automatically, so it works with any broker time zone.
- Alternative modes: first H1 candle of the server day, or a fixed server hour.
- If the box is wider than 1.5 x ATR H1 (default), there is no trade that day.
2. The signal
- BUY when an H1 candle closes above the box, SELL when it closes below.
- Only candle closes count - wicks through the box are ignored.
- Signals are accepted only inside the entry window (default 06:00 - 14:00 server time) and when the spread is below the limit.
3. The orders
- Lot size from risk % of equity (default 0.5% for both orders together), or a fixed lot.
- Two orders with the same stop loss: outside the opposite side of the box plus 0.3 x ATR H1.
- Order 1: TP1 = 1R (default 50% of the lot).
- Order 2: TP2 = 2R.
4. Management
- When TP1 is reached, the stop of order 2 moves to break-even.
- Trades still open after 12 H1 candles are closed.
- All trades are closed on Friday at 21:00 server time (default).
- One setup per day.
WHAT CAN HAPPEN TO ONE SETUP (default plan)
- TP1 + TP2: +1.5R (0.5 x 1R + 0.5 x 2R)
- TP1 + break-even: +0.5R
- Stop loss before TP1: -1R
- Time or Friday exit: closed at market
R = the risk of the setup (distance between entry and stop).
OPTIONAL REVERSE
If the stop is hit before TP1, the EA can flip once to the other side at the stop price, with a new stop outside the box and its own risk multiplier. Off by default.
ON THE CHART
- The box with the BUY and SELL breakout levels
- A live panel: settings, today's box, status, open orders, floating P/L and closed-order statistics
- Push notifications for entries and exits (optional)
INPUTS
Trading
- Magic number
- Lot mode: risk % of equity / fixed lot
- Risk per setup (%), fixed lot, maximum lot
- Reverse trade risk multiplier
- Max spread for new trades (points), max slippage
- Push notifications
Box
- Box candle: after session break (auto) / first candle of the day / fixed hour
- Fixed hour (server time)
- Min / max box size (x ATR H1)
Entry window
- Breakouts accepted from / until (server hours)
Exits
- Stop buffer outside the box (x ATR H1)
- TP1 and TP2 in R
- Lot share closed at TP1 (%, 0 = single order to TP2)
- Move stop to break-even at TP1
- Reverse once on / off
- Max holding time (H1 candles)
- Friday close hour
Display and optimization
- Draw box and levels, show panel
- Minimum trades for the custom optimization criterion
DEFAULT SETTINGS
The defaults come from a robust area of an XAUUSD H1 optimization (2026): risk 0.5%, max box 1.5 x ATR, window 06-14 server, stop buffer 0.3 x ATR, TP1 1R with 50% + break-even, TP2 2R, reverse off, max hold 12 H1 candles, Friday close 21:00, max spread 500 points (3-digit gold = 0.50).
The window hours are in server time. If your broker uses a different server time, adjust them.
RECOMMENDED USE
- Chart: XAUUSD H1. Other symbols: backtest and adjust first.
- Hedging account recommended (each setup uses two separate orders).
- Backtest on your broker with "Every tick based on real ticks", then forward test on a demo account before trading real money.
- The EA includes a custom optimization criterion (select "Custom max" in the Strategy Tester).
NOTES
- Panel values in the screenshots are examples, not a promise of future results.
- Results depend on the broker, spread, symbol and market conditions.
- Trading involves risk. Past results do not guarantee future performance. Use a risk level you can afford.
