GoldNightScalper
- エキスパート
- バージョン: 1.0
- アクティベーション: 5
GoldNightScalper — a nighttime breakout scalper for XAUUSD
GoldNightScalper — an automated advisor for MetaTrader 5 that trades on breakouts of the Asian range. While gold languishes in a narrow overnight range, the advisor measures its boundaries; at the opening of the European session, it places two pending orders—a Buy Stop above the range and a Sell Stop below it—and executes on the side where the market breaks out. The second order is cancelled automatically (OCO logic), and there are no re-entries per day.
How the strategy works
- Range measurement. From midnight to the specified hour (by default 0:00–7:00 server time), the advisor waits and takes the maximum and minimum of the Asian session on minute data.
- Placing orders. Buy Stop and Sell Stop orders with stop-loss and take-profit are placed at the range boundaries with a buffer. Orders are valid for 24 hours.
- Breakdown. The triggered order becomes a position, and the second one is immediately deleted. If the market has already moved beyond the breakout level by the time the calculation is completed, the advisor enters with a market order instead of a pending order.
- Escort. The optional trailing stop moves the stop towards profit, taking into account all broker restrictions.
- End of the day. At the specified hour (11:00 by default), all positions and orders are closed—the position is not carried over to the next day, and no swap is paid.
Key Features
- One trading cycle per day — without martingale, averaging and grids.
- Automatic margin checking : if the volume does not meet the available funds, the lot is reduced to the allowed size; trades are not rejected with "No money".
- Taking into account broker restrictions : stops are moved to the minimum allowed distance (stops level), modifications are not performed in the freeze zone (freeze level) at both levels - SL and TP.
- Trading session check : trades are not opened outside of sessions and on weekends.
- Spread filter - entry is not performed with an extended overnight spread.
- Trailing stop without noise modifications: transfer only with real improvement of the stop.
Parameters
| Parameter | By default | Description |
|---|---|---|
| RangeStartHour | 0 | Start of Asian session, server hour. |
| RangeEndHour | 7 | Range end – by this time, the boundaries have been measured and orders are ready. Place your orders before the London open, according to your broker's time. |
| BufferPts | 150 | Range boundary offset. The main filter for false breakouts: small – the price "pierces" the boundary and returns; large – entries are rare and late. |
| StopLossPts | 350 | Stop-loss in points, moved to the broker's minimum automatically. |
| TakeProfitPts | 500 | Take profit in points. |
| UseTrailing | true | Enable trailing stop. |
| TrailPts | 250 | Trailing distance in points. |
| Lots | 0.10 | Desired volume; if there is insufficient margin, it is reduced automatically. |
| MaxSpreadPts | 60 | Maximum spread for placing orders. |
| CloseAllHour | 11 | Overnight window end time: close position and remove unfilled orders. |
| Magic | 202411 | Advisor's trade identifier. |
Recommendations for use
- Test in the strategy tester on minute or five-minute data, real tick mode — the range logic is designed for intraday timeframes; on D1 the results are uninformative.
- Check your broker's server time: the boundaries of the "Asian night" are set in server time; the GMT+2/+3 shift varies among brokers.
- Evaluate your broker's overnight spread based on tick history: with a wide overnight spread, scalping loses economics, raise BufferPts or avoid night entries.
- Positions are closed by the end of the day - no swap is paid, this is part of the strategy's economics.
- Start with a minimum volume and a control account.
Disclaimer
Trading in financial markets involves risk. Past testing results do not guarantee future returns. The Expert Advisor is a tool, not a guarantee of profit. Make decisions based on your own risk profile.
