Gold Session and Swap Risk Panel
- ユーティリティ
- バージョン: 1.0
- アクティベーション: 10
Gold Session and Swap Risk Panel is a manual trade panel for XAUUSD. It sizes each trade from your risk percentage and an ATR-based stop-loss, shows when your account is too small for the broker's minimum lot, and warns about tonight's swap and the next session close. It does not generate signals. A trade is opened only when you press BUY or SELL.
Why gold needs extra care
One lot of gold is usually 100 ounces, so even the minimum 0.01 lot gains or loses about 1 USD for every 1 USD move. With a typical stop of 10 to 40 USD, a small account often cannot open a trade at 0.5% risk. The long swap on gold is large at many brokers and is charged three times on one night of the week. The spread widens around the daily break and right after the reopen, and the market closes on Friday evening and for holidays.
Before you click
The lot is calculated from your risk percentage and the stop distance, and it is always rounded down, never up. If the broker's minimum lot would risk more than your limit, the button is blocked and the panel shows the account balance at which the minimum lot would fit your risk. New trades are also blocked when the spread is much wider than its recent median, shortly before the daily break or weekend close, shortly after the reopen, when free margin is not enough, and when a daily loss, weekly loss or drawdown lock is active.
While the trade is open
Stop-loss and take-profit are set from ATR, with optional breakeven and an ATR trailing stop. The panel shows tonight's swap in your account currency and marks the triple-swap night. The swap guard can alert you, or close trades that would pay a negative swap, a few minutes before the rollover. The rollover time is read from the symbol's own trading sessions (the daily break), so it also works for brokers whose gold rollover is not at server midnight. A custom time can be set. The session guard can alert you or close trades before the weekend or holiday close.
Accounts and scope
It works with hedging and netting accounts. On netting accounts a new trade is blocked while a position exists on the symbol, so the panel never reverses or adds to a position by accident. By default the guards manage only the trades opened by the panel. Manual trades can be included with one setting. Trades of other Expert Advisors are never touched. The panel is designed for XAUUSD but works on any symbol, because all values come from the symbol's own specification: tick value, contract size, swap mode and trading sessions.
Inputs
Position sizing: risk per trade in percent of equity (default 0.5), optional use of the minimum lot when it risks no more than a set percent, commission per lot.
Stops: ATR timeframe and period, stop-loss in ATR, take-profit as a multiple of the stop, trailing stop and breakeven in ATR.
Entry gates: maximum spread as a multiple of the median spread, minutes without new trades before a break and after a reopen.
Swap and rollover guard: mode (off, alert, close before the triple-swap rollover, close before every rollover), minimum cost, minutes before the rollover, rollover time source.
Session close guard: action before the weekend or holiday close, optional close before every daily break.
Account protection: daily loss lock, weekly loss lock, drawdown lock, close trades when a lock is hit, maximum trades per day, reset of the saved lock state.
Panel and alerts: panel position, pop-up alerts, push notifications, magic number, log level.
Strategy Tester
Buttons cannot be clicked in the Strategy Tester. To let you see the panel at work, a demo mode presses BUY or SELL automatically every few bars, alternating sides. It works only in the Strategy Tester and has no effect on a live chart. The demo trades are random. They do not show any expected result. They only show the lot sizing, the blocks, the swap and session closes, the trailing stop and the locks. With a long test period the drawdown lock usually stops the demo after some time. Use a period of one to three months, or raise the lock, to see more demo trades.
Notes
No DLL, no internet connection, no grid, no martingale, no averaging. Trading involves substantial risk of loss. This tool helps you apply your own risk rules. It does not predict the market and cannot prevent losses, gaps or slippage. Test it on a demo account first.
