TrendSync Event Straddle Manual Triggered Manager
- ユーティリティ
-
Juliano Guzlinki Pacheco
I believe that technology is one of the main competitive differentiators in the modern financial market. While many traders still rely exclusively on manual analysis and emotional decision-making, the use of automation, algorithms, and intelligent systems allows for more precise, fast, and - バージョン: 2.50
- アクティベーション: 7
EVENT STRADDLE PRO — PROFESSIONAL EA FOR HIGH-IMPACT NEWS EVENTS
Expert Advisor to trade FOMC, NFP, CPI, PCE and other high-impact macroeconomic events with configurable straddle, advanced slippage control, and adaptive breakeven based on pre-news ATR.
Built for traders who operate the economic calendar and need execution speed, protection against bloated fills, and post-entry automation that the human brain simply cannot deliver during spike conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE PROBLEM IT SOLVES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Trading macroeconomic news releases has three well-known pitfalls:
PROBLEM 1 — Execution speed
In the first 500 ms after an FOMC or NFP release, the market moves 50-200 pips. No human trader can type an order, confirm, and send it in time. The move happens without you.
PROBLEM 2 — Fill slippage
Even traders using pending stop orders suffer bloated fills: the spike crosses the intended level and you get filled 50, 100, 200 pips above/below. The result: bad entry, SL inside the natural retracement zone, trade stopped at breakeven or worse.
PROBLEM 3 — Decisions under pressure
After the fill, rapid decisions pile up: partial close? move to breakeven? wait for a second peak? Under adrenaline, the human brain makes sub-optimal decisions, tending to exit too early (leaving money on the table) or too late (giving back profit).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW EVENT STRADDLE PRO SOLVES IT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ AUTOMATED PRE-POSITIONING
Places up to 10 stop orders simultaneously (BUY STOP + SELL STOP at multiple distances) with a single keyboard shortcut. Order placement in 50 ms via OrderSendAsync.
✓ SLIPPAGE CONTROL VIA STOP LIMIT
Optional BUY/SELL STOP LIMIT orders instead of plain stop orders. If the fill exceeds the configured limit, the order simply does not execute. Zero loss instead of entering at the top of the spike.
✓ ADAPTIVE BREAKEVEN BY PRE-NEWS ATR
Two breakeven modes:
• USD Mode: triggers when consolidated P&L reaches a dollar threshold
• ATR Mode: uses pre-news ATR (captured at ARM moment) as reference. Triggers only when price advances X × ATR in your favor. Protects against reversal without killing the trade on the first spike pullback.
✓ POOR FILL DETECTION
OnTradeTransaction measures real post-fill slippage. Positions filled worse than the alert threshold are marked as "compromised" and receive accelerated breakeven (half the normal trigger) to lock in minimum profit early.
✓ KEYBOARD-DRIVEN PARTIAL CLOSE
Three shortcuts (P+2, P+5, P+7) to close 25%, 50%, or 75% of current position volume. Allows profit-taking at the peak without exiting the full position.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FULL FEATURE LIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VISUAL PANEL
Complete on-chart panel displaying:
• System status (ARMED / DISARMED)
• Lines status (LOCKED / DYNAMIC / HIDDEN)
• Anchor price and current Bid
• Real-time spread
• Active configuration (lot, SL, TP, distances)
• Pending order and open position count
• Breakeven status (waiting / applied)
• Visual alert for positions compromised by slippage
• Configurable countdown timer
CONFIGURABLE STRADDLE — 10 LEVELS
Up to 10 simultaneous distances, configurable from 300 to 1200 pips (default). Each level can be individually enabled/disabled. Customizable colors per level for quick visual identification on the chart.
KEYBOARD SHORTCUTS (requires ARMED system)
B+B = BUY STOP at selected distances
S+S = SELL STOP at selected distances
D+D = Full STRADDLE (BUY + SELL simultaneously)
C+C = Cancel all pending orders
Z+Z = Close all EA positions
P+2 = Close PARTIAL 25% of positions
P+5 = Close PARTIAL 50% of positions
P+7 = Close PARTIAL 75% of positions
All shortcuts require double confirmation (two keys within configurable 500 ms) to prevent accidental triggering.
LAYERED SAFETY SYSTEM
• ARMED/DISARMED mode: all keys ignored when disarmed
• LOCKED/DYNAMIC mode: lines can be fixed at reference price
• Lines automatically hidden when system is disarmed (reduces visual noise)
• Automatic pre-news ATR capture at ARM moment
• Automatic state reset after disarm
SLIPPAGE CONTROL
• Use_Stop_Limit: toggles STOP LIMIT orders on/off
• Max_Slippage_Pips: maximum fill slippage accepted (default 100 pips)
• Slippage_Alert_Pips: threshold to mark position as compromised (default 50 pips)
• Compromised positions get BE trigger at half of normal
COUNTDOWN TIMER
Configurable visual countdown that triggers every X minutes (default 30). Useful to anticipate M15/M30/H1 bar closes or specific news release times. Sound alerts at T-10s and T-0s. Fully customizable.
ASYNCHRONOUS MANAGEMENT
All critical operations (create orders, cancel, close positions) use OrderSendAsync — does not wait for server confirmation before sending the next. Operational latency around 50 ms regardless of order count.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED OPERATIONAL FLOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
T-60 min before event:
→ Attach EA to the XAUUSD chart
→ Confirm panel settings
T-30 min:
→ Click ARM SYSTEM (activates shortcuts)
→ Pre-news ATR is automatically captured
T-5 min:
→ Click LOCK LEVELS (fixes levels at current price)
→ Verify lines and distances on the chart
T-30 seconds:
→ Press D+D (places full straddle)
→ 2 to 20 stop/stop-limit orders are sent in ~50 ms
T-0 (news release):
→ Price hits the level, order is triggered
→ Fill is automatically measured
→ If slippage > alert: position marked as compromised
T+5 to T+30 min:
→ Manual partial close via P+5 (or P+2 / P+7)
→ Automatic BE triggers when price advances X × ATR in favor
→ SL moves to entry + offset in profit direction
Post-event:
→ Click DISARM
→ Lines disappear, state resets for the next event
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ADVANTAGES BY EVENT TYPE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
► FOMC (Federal Reserve Meeting) — 8x/year
Release at 2:00 PM ET + press conference at 2:30 PM ET. Typical XAUUSD move: 100-300 pips in 30 minutes. Recommended setup: 500/700/900 pip distances, 0.01-0.05 lot, ATR trigger 2.0×. The ATR captured before the announcement protects against the initial whipsaw common in interest rate decisions.
► NFP (Non-Farm Payrolls) — 12x/year
First Friday of each month at 8:30 AM ET. Typical move: 50-150 pips in 15 min. Recommended setup: 300/500/700 pip distances, tighter SL than FOMC (shorter move duration), BE trigger 1.5× ATR. Strong dispersion across the three sub-indicators (payrolls, unemployment, wages) justifies using both sides of the straddle.
► CPI (Consumer Price Index) — 12x/year
Mid-month at 8:30 AM ET. Typical move: 50-120 pips. In hawkish Fed regimes, each CPI becomes a mini-FOMC. Recommended setup: 300/500 pip distances, ATR trigger 1.5-2.0×. Core CPI and Headline may diverge — the straddle captures both.
► PCE (Personal Consumption Expenditures) — 12x/year
Last business day of the month. Fed's preferred inflation indicator. Typical move: 40-100 pips. Conservative setup recommended: 2 distances (300/500) with smaller lot size.
► ADP (Nonfarm Employment Change) — 12x/year
Wednesday before NFP, 8:15 AM ET. Private labor market preview. Setup: 300/500 distances, reduced lot (0.01-0.03). Smaller move than official NFP — adjust distances and lot accordingly.
► JACKSON HOLE SYMPOSIUM — 1x/year (August)
Fed Chair speech. Potential move comparable to FOMC when monetary policy guidance is given. Similar setup to FOMC.
► OTHERS: BoE, ECB, GDP, Jobless Claims, JOLTS
Compatible. Requires individual calibration of distances and lot.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TECHNICAL SPECIFICATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Platform: MetaTrader 5 (build 3000 or higher)
Type: Expert Advisor (semi-automated)
Timeframe: any (M5-M15 recommended for visualization)
Symbols: all pairs. Optimized for XAUUSD, but works on FX majors, indices, and crypto
Account type: hedging (required for the straddle)
Order mode: STOP or STOP LIMIT (configurable)
Filling: ORDER_FILLING_RETURN (compatible with most brokers)
Latency: ~50 ms via OrderSendAsync, regardless of order count
Magic Number: configurable, allows parallel operation with other EAs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONFIGURATION PARAMETERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LINE DISTANCES
Distance1 to Distance10 (in pips) — configure each level
DISTANCES TO USE
Use_Dist1 to Use_Dist10 — enable/disable each level individually
ORDER MANAGEMENT
Lot — lot size per order
Stop_Loss_Pips — SL in pips
Take_Profit_Pips — TP in pips
Expiration_Minutes — automatic pending expiration
Magic_Number — unique EA ID
Order_Comment — order identifier
SLIPPAGE CONTROL
Use_Stop_Limit — enables STOP LIMIT mode (recommended)
Max_Slippage_Pips — maximum slippage accepted on fill
Slippage_Alert_Pips — threshold to mark compromised position
AUTOMATIC BREAKEVEN
Breakeven_Enabled — on/off
Breakeven_Mode — 0 (USD) or 1 (ATR)
Breakeven_Trigger_USD — USD value to trigger BE (mode 0)
Breakeven_Offset_Pips — pips beyond entry (mode 0)
BE_ATR_Timeframe — ATR timeframe (mode 1)
BE_ATR_Period — ATR period (mode 1)
BE_ATR_Trigger_Mult — ATR multiplier to trigger BE (mode 1)
BE_ATR_SL_Mult — ATR multiplier to position SL (mode 1)
SYSTEM SAFETY
Start_Armed — start already armed? (default NO)
Timeout_Sequence_MS — time between keys (default 500ms)
Sound_Alerts — audio alerts on each action
COUNTDOWN TIMER
Show_Countdown — show countdown on panel
Countdown_Interval_Min — interval in minutes
Countdown_Duration_Sec — countdown duration
Countdown_Sound_Alert — sound alerts at T-10s and T-0s
VISUAL
Show_Panel — show visual panel
Show_Labels — show labels on lines
Lines_Style / Lines_Width — line style and thickness
Color_Dist1 to Color_Dist10 — color per level
Color_Anchor — anchor line color
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USAGE RECOMMENDATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEFORE FIRST USE ON LIVE ACCOUNT
Test on a demo account for at least 2-3 consecutive events. Memorize the shortcuts. Practice the ARM → LOCK → D+D sequence before trading real money.
RISK MANAGEMENT
Never activate all 10 distances simultaneously without calculating whipsaw risk. With 10 triggered orders, the crystallized cost can be significant. Recommended to start with 2-3 active distances until the flow is mastered.
BROKERS
First test if your broker accepts STOP LIMIT on the chosen symbol. If not supported, set Use_Stop_Limit = false to use plain STOP orders. Some symbols require minimum distance from current price (stops_level) — configure distances respecting this minimum.
TIMEFRAMES
Panel works on any timeframe. Pre-news ATR works best on M15 (default). For smaller events (ADP, Jobless Claims), M5 may be more responsive.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This Expert Advisor is an assisted execution tool. It is not a fully automated trading system nor does it guarantee results. The decisions of WHEN and HOW to trade remain with the user.
Trading forex, metals, and CFDs involves significant risk of loss and is not suitable for all investors. Past results do not guarantee future results. Only trade with capital you can afford to lose.
Always test on a demo account before any use on a live account. Understand each parameter before activating it. The author is not responsible for losses arising from use.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUPPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical support via MQL5 private messages. Typical response within 24-48 hours.
Comments and suggestions are welcome.
Part of the TrendSync suite — professional tools for algorithmic traders of XAUUSD, FX, and indices.
