Gold Session Limits EA
- Experts
- Andreas Smigadis
- 버전: 1.1
- 업데이트됨: 28 11월 2025
- 활성화: 10
GOLD SESSION LIMITS EA
Dual–Session Breakout Engine for XAUUSD (MT4)
by Alpha Structure FX
1️⃣ What Is Gold Session Limits EA?
Gold Session Limits EA is a fully automated, session-driven breakout system built exclusively for Gold (XAUUSD).
It focuses on two of the most explosive daily phases on Gold:
-
Previous Day Range Breakout – trades clean breaks of the prior day’s High/Low.
-
London Session Range → US Open Breakout – trades the London range breakout as New York comes in.
The EA is designed for traders who want strict, rule-based session trading on Gold, without sitting in front of the charts all day.
2️⃣ Key Features
⚡ Two Independent Breakout Engines in One EA
-
Previous Day Breakout
-
Places pending orders 2 hours after server midnight.
-
-
London Session Breakout
-
Builds the London session range and trades the breakout into US open.
-
🕒 100% Time–Driven, Session Logic
-
All logic is based on broker server time (MT4) – not your local clock.
-
Precisely defined placement, deletion and session windows.
🧠 Smart Level Protection
-
Trades only if key levels haven’t been broken prematurely.
-
Filters out “late entries” and fake breakouts.
🔁 No Duplicate Orders
-
Detects existing orders/positions.
-
Avoids double entries and unnecessary over-exposure.
📊 On-Chart Session Dashboard
-
Shows:
-
Daily & weekly results
-
Session levels
-
Win rate & profit factor
-
Open risk & core stats
-
📈 ATR-Based Dynamic Stops (Optional)
-
Adaptive SL/TP and trailing stop using volatility (ATR).
-
Choice between fixed or ATR-based risk parameters.
✅ Automatic Daily & Weekly Reset
-
New day = clean session.
-
Weekly stats reset for fresh performance tracking.
3️⃣ Core Logic – How It Trades
🕑 SESSION 1 – Previous Day Breakout
-
Placement Time:
2 hours after broker server midnight
(Example: server day at 00:00 → orders at 03:00 server time).
Logic:
-
EA reads yesterday’s High and Low on XAUUSD.
-
It places:
-
Buy Stop at previous day High.
-
Sell Stop at previous day Low.
-
-
Orders are active only while:
-
Levels are still intact (not already broken).
-
Spread is within your allowed range.
-
-
Untriggered pending orders are deleted at DeleteTime (default: 21:00 server time).
One-direction rule:
-
If yesterday’s High is already broken → only Sell setup remains valid.
-
If yesterday’s Low is already broken → only Buy setup remains valid.
🕒 SESSION 2 – London Session → US Open Breakout
Concept: Trade the breakout of the London session range, with entries timed into New York liquidity.
-
From LondonStartTime to LondonEndTime
(default: 10:00–15:00 server time)
the EA builds the London High/Low range. -
At the NY/London crossover (default: 15:00 server time), the EA:
-
Places a Buy Stop above London High.
-
Places a Sell Stop below London Low.
-
-
Trades are filtered by:
-
Spread
-
Level integrity (no broken levels before setup)
-
-
Untriggered orders are deleted at DeleteTime (default: 21:00 server time).
4️⃣ Time & Server Settings – ⚠️ CRITICAL
This EA is fully time-driven.
For it to work correctly, all session inputs must be aligned with your broker’s MT4 server time, not your local time.
🔸 Core Principle
-
All inputs = MT4 server time (shown in Market Watch / chart).
-
Your local device time can be different.
-
Brokers can be GMT+0, GMT+2, GMT+3, etc., and may shift with DST (Daylight Saving Time).
4.1 Previous Day Limits – “2 Hours After Midnight”
The Previous Day session is designed to place orders 2 hours after the server day rolls over.
-
If your server day starts at 00:00 → set PlaceTime = 02:00 (server).
-
If your server day starts at a different time, adjust so that:
PlaceTime = 2 hours after the moment a new D1 candle opens on your broker.
Best way to set it:
-
Open a D1 chart on XAUUSD.
-
Check the open time of a new daily candle (server time).
-
Set PlaceTime = (D1 open time + 2 hours).
4.2 London Session Limits & US Open – Align to Your Broker
London session logic uses:
-
LondonStartTime & LondonEndTime → build the London range.
-
US open / NY overlap time → place breakout orders.
To match real market sessions, you must:
-
Know your broker server offset vs. London and New York.
-
Convert:
-
London morning session
-
US open / NY overlap
into server time, then set: -
LondonStartTime → start of London range (server).
-
LondonEndTime → end of London range / order placement (server).
-
Or a dedicated NY order time input, if included.
-
Example (model only):
-
Real London open: 08:00 (London time)
-
Real US open: 15:30 (London time)
-
Broker server: GMT+2
-
London currently: GMT+1
→ Server is +1 hour ahead of London
Approximate mapping:
-
LondonStartTime ≈ 09:00 server time
-
LondonEndTime / US trigger ≈ 16:30 server time
✅ Always:
-
Check a session indicator or watch price movement to see when London and New York are actually active on your broker.
-
Adjust LondonStartTime, LondonEndTime, and order time so the EA tracks real London volatility and places orders into US open liquidity, in server time.
❗ If you do not align times to server:
-
Previous Day session may use the wrong daily candle.
-
London range may not match real London hours.
-
Orders might trigger in quiet hours instead of high liquidity, and the EA will not behave as intended.
5️⃣ Built-In Risk Management
Risk per trade:
-
RiskPercent – risk based on account balance
-
Recommended:
-
Beginners: 0.5%
-
Intermediate: 1%
-
Advanced/aggressive: up to 2%
-
-
-
FixedLotSize – for traders who prefer an exact lot size.
Stop Loss / Take Profit:
-
Fixed points, or
-
ATR-based dynamic stops via StopLossType / TakeProfitType :
-
Adapts to volatility.
-
Can be combined with ATR-based trailing stop.
-
Weekly Profit Target:
-
Example: stop trading after +$500 in a week (or your own target).
-
Helps lock in performance and avoid emotional overtrading.
Optional Auto-Close:
-
Auto-close profitable trades at a specific time
(e.g. before rollover or when you don’t want overnight exposure).
6️⃣ Suggested Usage
Best Conditions
-
Instrument: XAUUSD (Gold) only
-
Sessions: London & New York overlap typically provide the strongest momentum
-
Spread: Prefer brokers with tight Gold spreads (approx. 10–30 points typical)
Timeframe
-
EA logic is internal – it does not depend on chart timeframe.
-
You can use any chart; M15 or H1 is recommended for monitoring and analysis.
Environment
-
Run on a VPS or 24/5 machine so:
-
Timer events aren’t missed.
-
Session logic runs without interruption.
-
Psychology & Usage Tips
-
Treat this EA as a structured session strategy, not a “money printer”.
-
Avoid changing settings every day – make adjustments based on weekly reviews, not emotions.
-
Accept that some days/weeks will be negative.
-
Long-term edge comes from discipline, consistency, and correct time alignment.
7️⃣ Brokers & Platform Requirements
Platform
-
MetaTrader 4 (MT4)
Account Type
-
ECN / Raw spread preferred
-
Fast execution & low slippage on Gold
Broker Requirements
-
Must offer XAUUSD (Gold)
-
Must allow EAs / algorithmic trading
-
Reasonable margin and contract size
-
Stable server time (know the offset vs London & NY)
8️⃣ What You Get with Gold Session Limits EA
-
Fully automated two-session Gold breakout engine
-
Smart session & level logic for:
-
Previous Day breakout
-
London → US breakout
-
-
On-chart performance dashboard
-
Built-in risk management & weekly profit lock options
-
Optional ATR-based dynamic stops and trailing
-
Robust duplicate order protection
-
Detailed logging for transparency & troubleshooting
-
Complete user manual / documentation for deeper understanding
9️⃣ Financial Risk Disclaimer
Trading foreign exchange, CFDs, and other leveraged products carries a high level of risk and may not be suitable for all investors. Past performance is not indicative of future results. You should carefully consider your financial situation and risk tolerance before trading, and seek independent financial advice if necessary.
This Expert Advisor does not guarantee profits, can lead to partial or total loss of capital, and should always be tested on a demo account before being used on a live account. You alone are responsible for any investment decisions and results.
