News Sniper Straddle
- Uzmanlar
- Napat Puangjunkum
- Sürüm: 2.0
- Etkinleştirmeler: 10
Automated News Straddle Breakout System for MetaTrader 5
While most EAs run away from high-impact news, this one was built to hunt them. News Sniper AI connects directly to the MQL5 built-in Economic Calendar, detects upcoming NFP, CPI, FOMC, and GDP releases, and automatically places a precision straddle (Buy Stop + Sell Stop) around the current price seconds before the data drops.
When the number hits and price explodes in one direction, the triggered order rides the spike while the opposite order expires automatically. A fast trailing stop locks in profit as the momentum fades.
No external API. No DLL. No web requests. Everything runs natively inside MetaTrader 5.
---
How It Works
1. The EA scans the MQL5 Economic Calendar every 4 hours for high-impact events within the next 24 hours.
2. It filters events by type (NFP, CPI, FOMC, GDP, Retail Sales, Employment) and by currency (configurable).
3. When the countdown reaches the configured threshold (default: 2 minutes before release), the EA places two pending orders:
- Buy Stop: Above current Ask by the straddle distance
- Sell Stop: Below current Bid by the straddle distance
4. Both orders have built-in SL, TP, and automatic expiration.
5. When the news drops, price spikes into one order. The trailing stop activates immediately.
6. Unfilled orders are auto-deleted after the configured cleanup window.
---
Key Features
- **Native Calendar Integration**: Uses the MQL5 built-in CalendarValueHistory function. No external dependencies, no DLL, no internet scraping.
- Smart Event Filter: Toggle individual event types on/off. Trade only NFP and CPI, or enable everything. Full control.
- Automatic Symbol Mapping: The EA detects which currency is affected and automatically finds the correct trading pair (e.g., USD news = trade EURUSD, GBP news = trade GBPUSD).
- Trailing Stop with Step Control: The trailing stop only updates when price moves by a configurable step size, preventing server spam and slippage.
- Aegis Shield Protection: Max drawdown halt with automatic position closure.
- Auto Expiration: Pending orders expire automatically if not triggered within the post-event window.
---
Parameters
News Event Settings
| Parameter | Default | Description |
| Minutes Before News | 2 | How early to place the straddle |
| Minutes After News | 10 | How long to wait before deleting unfilled orders |
| Trade NFP | true | Enable Non-Farm Payrolls |
| Trade CPI | true | Enable Consumer Price Index |
| Trade FOMC | true | Enable Interest Rate / FOMC decisions |
| Trade GDP | true | Enable Gross Domestic Product |
| Trade Retail Sales | false | Enable Retail Sales |
| Trade Employment | false | Enable Employment Change |
| Currencies | USD,EUR,GBP,JPY,CAD,AUD,NZD,CHF | Which currencies to monitor |
Straddle Settings
| Parameter | Default | Description |
| Straddle Distance | 100 Points (10 pips) | Distance from current price for pending orders |
| Stop Loss | 300 Points (30 pips) | Stop Loss distance |
| Take Profit | 600 Points (60 pips) | Take Profit distance |
| Trailing Stop | 150 Points (15 pips) | Trailing stop distance after activation |
| Trailing Step | 50 Points (5 pips) | Minimum price movement to update trailing stop |
Risk Management
| Parameter | Default | Description |
| Risk Per Trade | 1.0% | Percentage of balance risked per trade |
| Max Drawdown to Halt | 10.0% | Aegis Shield threshold |
| Max Open Trades | 2 | Maximum simultaneous positions |
Optimization Guide
Use MT5 Strategy Tester with Every tick based on real ticks:
- Straddle Distance: 50 to 200 (Step 25)
- Stop Loss: 200 to 500 (Step 50)
- Take Profit: 300 to 1000 (Step 100)
- Trailing Stop: 50 to 300 (Step 50)
---
Warnings
1. Spread Widening: During major news events, spreads can widen dramatically. The EA accounts for this with dynamic StopLevel checks, but extreme spread conditions may cause slippage.
2. **Broker Restrictions: Some brokers freeze order execution during news releases or increase margin requirements. Verify your broker's policy on news trading.
3. Calendar Data: The MQL5 Economic Calendar requires an active internet connection to receive event updates. If calendar data is unavailable, no straddle will be placed.
4. Not for Backtesting: News straddle strategies cannot be accurately backtested because the Strategy Tester does not simulate calendar events with real timestamps. Test on a demo account with live data.
5. VPS Required: The EA must be running at the exact moment before the news release. A stable VPS with low latency is essential.
