GoldLab NY Opening Range
- 专家
- 版本: 1.0
- 激活: 5
New York opening-range breakout EA: closed-bar breakout or retest entry, tick-volume and ATR filters, stop at the range, time exit. Built for gold.
GoldLab NY Opening Range is a fully automated Expert Advisor for MetaTrader 5. It is designed for XAUUSD (gold) and also runs on other symbols such as EURUSD.
How it trades
- Opening range - the high and low of the first N minutes (default 30) of the New York session, starting at the NY session start time you set in server time (default 13:30 - set 16:30 on a GMT+3 broker).
- Range filter - the range width must be between a minimum and maximum multiple of the H1 ATR.
- Breakout on a closed bar - on the signal timeframe (default M5) a bar must close beyond the range (plus a buffer); wicks alone do not trigger.
- Tick-volume filter - the breakout bar's tick volume must be at least the recent average (multiplier adjustable), to avoid low-participation breaks.
- Optional retest mode - instead of entering at the breakout, the EA waits for price to come back to the broken level and close back in the breakout direction within a set number of bars. A close back through the other side of the range cancels the setup.
- Exits - stop-loss at the opposite side of the range (or the range middle), take-profit at an R-multiple (default 1.5R), optional break-even, and a time exit that closes everything at the set hour (default 20:00 server time).
- Entries are allowed only inside the entry window after the range (default 180 minutes), with a maximum number of trades per day.
Risk management (built in)
- Every trade is opened with a stop-loss. There is no martingale, no grid and no averaging down.
- Position size from risk % of balance (default 1%) or a fixed lot; lots are normalised to the broker's min / max / step and reduced if free margin is not enough.
- Daily loss limit: no new trades for the rest of the day once equity is down the set % from the day-start balance.
- Max spread filter, optional trading-hours filter, and no orders while the market is closed or trading on the symbol is disabled.
- Stop-loss / take-profit are always placed outside the broker's stops and freeze levels.
- Works on hedging and netting accounts (on netting accounts it opens only when the symbol has no position).
Inputs
| Input | Default | Description |
|---|---|---|
| NY session start hour / minute | 13 / 30 | Server time of the New York open |
| Opening range length (minutes) | 30 | Length of the opening range |
| Signal timeframe | M5 | Breakouts are judged on closed bars of this timeframe |
| Entry window (minutes) | 180 | Entries allowed for this long after the range |
| Max trades per day | 2 | Daily trade cap |
| Breakout buffer (points) | 3 | Close must be this far beyond the range |
| Wait for retest | false | Enter on a retest of the broken level instead of the breakout |
| Retest bars / tolerance (x ATR) | 12 / 0.3 | Retest must happen within these bars and this distance |
| Tick-volume filter / period / multiplier | true / 20 / 1.0 | Breakout bar volume >= average x multiplier |
| ATR period | 14 | ATR for filters |
| Min / Max range (x H1 ATR) | 0.2 / 3.0 | Range width filter (0 = off) |
| Stop-loss placement | Opposite side | Or range middle |
| Take-profit (R) | 1.5 | Target as a multiple of the stop distance |
| Break-even at (R) | 1.0 | Move stop to entry at this profit (0 = off) |
| Time exit hour / minute | 20 / 0 | Close trades at this time (-1 = off) |
| Risk per trade (%) | 1.0 | Risk as % of balance, used when Fixed lot = 0 |
| Fixed lot | 0.0 | Fixed lot size (0 = use Risk %) |
| Maximum lot | 10.0 | Upper cap per trade |
| Use minimum lot if risk lot is too small | true | On small accounts trade the broker minimum instead of skipping |
| Magic number | 20271002 | Change it to run several copies on one account |
| Daily loss limit (%) | 3.0 | Stop opening trades for the day at this loss (0 = off) |
| Max spread (points) | 60 | 2-digit gold / 4-digit FX scale (100 = 1.00 USD on gold); 0 = off |
| Restrict to trading hours | false | Optional start / end hour (server time) for new entries |
| Max slippage (points) | 30 | Same scale as spread |
| Show info panel | false | Optional status panel on the chart |
Recommended
- Symbol / timeframe: XAUUSD (designed for gold), also index-correlated FX pairs such as EURUSD. Any chart timeframe; the signal timeframe input (M5 default) drives the logic.
- Account: any (hedging or netting), any deposit that allows the broker's minimum lot with a sensible risk %.
- VPS: recommended for uninterrupted operation.
Important notes
- No trading system can guarantee profit. Past performance, in the tester or live, does not guarantee future results.
- Always test the EA in the MetaTrader 5 Strategy Tester and then on a demo account before using real money, with your broker's own data and spread.
- Session hours are in your broker's server time - check your broker's time zone and adjust the hour inputs if needed.
- Start with a low risk % and use money you can afford to lose.
