MT4 & MT5 · All Instruments

BracketBlitz EA

Rapid-fire OCO bracket orders that chase the market — Buy Stop + Sell Stop, auto-refreshed every 30 seconds. Catch breakouts without predicting direction.

Open Source — Free to use on any instrument in MetaTrader. Expires 2026-03-28.

Strategy

How It Works

A breakout-capture strategy designed for volatile market conditions.

1

Bracket Placement

Two pending orders straddle the current price: Buy Stop at Ask + GapPips (catches upward breakouts) and Sell Stop at Bid − GapPips (catches downward breakouts).

2

OCO Execution

The moment price breaks through one level and triggers an order, the opposite side is immediately deleted. This prevents conflicting positions and keeps exposure directional.

3

Fresh Entries

If neither order triggers within 30 seconds (configurable), both are deleted and re-placed at the new current price — keeping the bracket tight around the latest price action.

4

Trailing Protection

Once in a trade, the stop loss follows price movement automatically. For buys, SL moves up as price rises. For sells, SL moves down as price falls. It never moves back.

Capabilities

Key Features

Built for speed, simplicity, and breakout-capture efficiency.

Rapid-Fire Brackets

Continuously places Buy Stop + Sell Stop pending orders around the live price, straddling the market for instant breakout capture.

🔄

OCO Execution

One-Cancels-Other logic — when one side triggers, the opposite pending order is instantly deleted to keep exposure directional.

⏱️

Auto Refresh

Stale orders are deleted and re-placed at the new current price every 30 seconds (configurable), keeping entries razor-close to the action.

📈

Trailing Stop

Once in a trade, the stop loss automatically follows price movement, locking in profits as the breakout extends.

📊

Multi-Platform

Identical logic on both MetaTrader 4 and MetaTrader 5. Works on any instrument — forex, gold, indices, crypto CFDs.

🎯

Breakout Capture

Designed for volatile conditions and news events. Catches the first directional move without predicting direction.

🛠️

Fully Configurable

Tune every parameter — gap distance, stop loss, trailing stop, order lifetime, lot size, and magic number.

🔒

Isolated Trading

Only manages orders with its own MagicNumber. Never touches manual trades or orders from other EAs.

Getting Started

Installation Guide

Get BracketBlitz running in minutes.

1. Download the EA

Download the compiled file for your platform using the buttons above. Choose .ex4 for MetaTrader 4 or .ex5 for MetaTrader 5.

2. Install in MetaTrader

Open your MetaTrader terminal. Go to File → Open Data Folder. Place the file in MQL4/Experts/ (MT4) or MQL5/Experts/ (MT5). Restart MetaTrader or right-click the Navigator panel and select Refresh.

3. Attach to Chart

Open any chart (works on all instruments — forex, gold, indices, crypto CFDs). Drag BracketBlitz onto the chart. In the EA properties, go to the Common tab and enable Allow live trading (MT4) or Allow Algo Trading (MT5).

4. Configure Parameters

Adjust GapPips, StopLossPips, TrailingStopPips, and OrderLifetimeSec in the Inputs tab. Use the preset configurations below as starting points. Give each chart instance a unique MagicNumber.

5. Enable Auto Trading

Make sure Auto Trading is enabled in MetaTrader (the button in the toolbar should be green). The EA will immediately place Buy Stop + Sell Stop bracket orders around the current price.

Configuration

EA Settings

All parameters are adjustable from the EA input dialog when attaching to a chart.

ParameterTypeDefaultDescription
LotSizedouble0.01Position size for each bracket order
GapPipsint50Distance in pips from current price for pending orders
StopLossPipsint50Stop loss distance in pips from entry price
TrailingStopPipsint20Trailing stop distance in pips — follows price, never moves back
OrderLifetimeSecint30Seconds before stale pending orders are refreshed at new price
MagicNumberint/long123456Unique identifier — use different values for multi-chart setups
Tuning

Preset Configurations

Recommended starting points for different trading styles.

Scalping

M1 / M5

GapPips10
StopLossPips15
TrailingStopPips8
OrderLifetimeSec15

Swing

H1 / H4

GapPips100
StopLossPips80
TrailingStopPips40
OrderLifetimeSec120

News Trading

Any

GapPips30
StopLossPips50
TrailingStopPips20
OrderLifetimeSec10
Project

File Structure

BracketBlitz/
├── BracketBlitz.mq4    # Expert Advisor source — MetaTrader 4
├── BracketBlitz.mq5    # Expert Advisor source — MetaTrader 5
├── .gitignore           # Excludes compiled .ex4/.ex5 files
└── README.md            # Documentation
⚠️ Important

Risk Disclaimer

Please understand the risks before using BracketBlitz EA.

🧪
Demo First

Always test on a demo account before using real money

📉
No Guarantees

Past performance does not guarantee future results

Volatile Markets

Breakout strategies work best with volatility but also carry higher risk

💰
Risk Capital Only

Only trade with money you can afford to lose

📊
Spread Awareness

Wider spreads during news events may affect order placement

👀
Monitor Regularly

Check your positions regularly, especially during market events

Support

Frequently Asked Questions

Yes! Just give each instance a different MagicNumber so they don't interfere with each other.

Yes. It works on any instrument available in MetaTrader — forex pairs, gold (XAUUSD), indices, crypto CFDs, etc. The pip calculation auto-adjusts for each symbol's digit configuration.

Absolutely. The EA only manages orders with its own MagicNumber. It will never touch your manual trades or orders from other EAs.

30 seconds is a balance between keeping entries fresh and avoiding excessive order churn. You can adjust this from 5 seconds (aggressive) to 3600 seconds (passive) via the OrderLifetimeSec input.

No. The strategy relies on the trailing stop to lock in profit and exit. This allows the trade to ride extended breakouts without a hard exit cap.

BracketBlitz is designed for breakout-capture, making it well-suited for news events. However, be aware of wider spreads, slippage, and rare gap scenarios.

Both versions have identical logic. Choose based on your broker: MT4 for most retail forex brokers, MT5 for newer brokers with more asset classes.