Ballast Gold
- Uzmanlar
- Sürüm: 3.87
- Etkinleştirmeler: 5
Ballast Gold is an automated trading system for XAUUSD on hedging accounts. A BUY chain and a SELL chain run independently, and the EA manages entries, add-on orders, profit locking, closing and loss limits by itself.
How it works
- First order: only in the direction of a strong move (M15 RSI and the distance from EMA50 in ATR), and only when it agrees with the H4 trend (EMA200).
- Profit lock: when a position gains 500 points, a stop is placed behind it to keep part of the gain, and the chain starts a new cycle.
- Add-on orders: when price moves against the chain by 2,000 points, one order is added; each further step is 10% wider than the one before. Lots rise in linear tiers and are never doubled. At most 20 orders per direction, and no single order above 0.10 lot.
- Closing: the oldest position closes together with newer ones once their combined result reaches a target based on the lots closed.
Important: the strategy adds to losing positions. Floating losses can become large before a chain closes, and positions can stay open for weeks or months, which ties up margin. The protections below limit this but cannot remove it.
Built-in protections (cannot be switched off)
- Per-side loss limit (default 5% of balance) and global loss limit (default 25%)
- Equity protection line (default 70% of balance)
- Broker-side disaster stop on every position
- Volatility guard, gap halt and rollover window
- Fixed lot limits
Optional, off by default: news filter, manual no-trade windows, weekend protection.
The default inputs are the tested values. Widening the loss limits is not recommended: a wider limit can turn a limited loss into a much larger one in a single market move.
Requirements
- Hedging account. The EA stops on netting accounts.
- Designed and tested for XAUUSD (2 digits, contract size 100). Other symbols are not supported.
- Chart M15. Allow algorithmic trading. A VPS is recommended.
- Recommended balance: about 50,000 USD per 1 ounce of starting exposure, which is 50,000 USD or more on a standard XAUUSD account at 0.01 lot. A smaller balance means proportionally larger drawdowns.
- No DLL, no WebRequest.
Input parameters
The values shown are the defaults. The on-chart panels let you read and change the main settings while the EA is running.
[1. Basic]
- Inp_AllowBUY = true — Enable the BUY chain
- Inp_AllowSELL = true — Enable the SELL chain
- Inp_StartLot = 0.01 — First-order lot size (max 0.05)
- Inp_Start_Wait = 5 — Seconds to wait before a new first order after a cycle ends
- Inp_MinEquityPct = 70.0 — Equity protect line (equity/balance %, min 50): no new orders
- Inp_Magic_Start_BUY = 100000 — Starting MAGIC number for the BUY chain
- Inp_Magic_Start_SELL = 200000 — Starting MAGIC number for the SELL chain
[1b. First-order momentum filter]
- Inp_MOM_EN = true — Momentum filter: first order only in the strong direction
- Inp_MOM_TF = M15 — Momentum timeframe
- Inp_MOM_RSI = 60.0 — Long: RSI(14) >= value; Short: RSI <= 100 - value
- Inp_MOM_EMADist = 2.0 — Long: (close - EMA50)/ATR(14) >= value; Short: <= -value
[1c. Higher-timeframe trend filter]
- Inp_TR_EN = true — Trend filter: first order only with the higher-TF trend
- Inp_TR_TF = H4 — Trend timeframe
- Inp_TR_EMA = 200 — Trend EMA period: close above = longs only, below = shorts only
[1d. Stability & trade log]
- Inp_RO_EN = true — Rollover window: no first orders or add-ons (server time)
- Inp_RO_Window = 23:55-01:05 — Rollover window HH:MM-HH:MM (do not use quotes)
- Inp_Retry_Sec = 30 — Retry interval after a failed close (seconds)
- Inp_Orphan_EN = true — Orphan cleanup (orders outside the chain with no valid SL)
- Inp_Orphan_Sec = 60 — Orphan check interval (seconds)
- Inp_Log_EN = true — Write a closed-trade CSV log (Common\Files)
- Inp_Log_Name = BallastGold_trades.csv — Log file name (server name is prefixed automatically)
[2. Profit-lock chain]
- Inp_Chain_LockStep = 500 — Profit points the virtual first order needs to trigger lock
- Inp_Chain_LockSL = 400 — Points kept: SL = trigger price -/+ this value
[3. Add-on spacing]
- Inp_M_StepPips = 2000 — Base add-on step in points (min 1000), first add-on trigger
- Inp_M_StepMult = 1.1 — Step multiplier: step of layer N = base x Mult^(N-1)
[4. Add-on lots]
- Inp_M_TierSize = 3 — Orders per lot tier: lot steps up every N orders (min 3)
- Inp_M_MaxLayer = 19 — Max add-on layers excl. first order (max 19; 0 = no add-ons)
- Inp_M_MaxLot = 0.10 — Max lot size of a single order (max 0.10)
- Inp_M_Cooldown = 180 — Add-on cooldown (seconds)
[5. Close target]
- Inp_M_Tgt_Factor = 500.0 — Target factor: profit target = closing lots x factor
[6. Volatility guard]
- Inp_VOL_EN = true — Enable volatility guard (detects violent moves)
- Inp_K_Period = 100 — Number of bars used for the average bar size
- Inp_K_Threshold = 1.5 — Yellow: bar exceeds average by this multiple (step x1.5)
- Inp_K_Halt_Mult = 2.0 — Red halt: bar exceeds average by this multiple (add-ons stop)
- Inp_Halt_Bars = 3 — Bars to stay halted after a red halt
- Inp_Gap_EN = true — Enable gap halt
- Inp_Gap_Limit = 3000 — Gap halt limit (points, tick-to-tick jump)
[7. Loss limits]
- Inp_Side_Loss_Pct = 5.0 — Per-side loss limit (% of balance, range 3-10)
- Inp_Max_Loss_Pct = 25.0 — Global loss limit (% of balance, range 3-25)
- Inp_Loss_Wait_Hrs = 4 — Cooldown after a loss stop (hours)
[8. News]
- Inp_News_EN = true — Show high-impact USD news on the panel
- Inp_NF_EN = false — Enable news filter (needs MT5 economic calendar, no backtest)
- Inp_NF_Stars = 3 stars only — Which news counts (calendar importance: 1 to 3 stars)
- Inp_NF_PreHours = 3.0 — Stop this many hours before the news (0.5 to 5)
- Inp_NF_PostMin = 30 — Resume this many minutes after the news (0 to 240)
- Inp_NF_Scope = Add-on orders only — What to stop during the news window
- Inp_NF_Currencies = USD — Currencies to watch, e.g. USD or USD,EUR (no quotes)
- Inp_NF_FailBlock = false — If calendar is unavailable: false = trade, true = block
- Inp_NF_Alert = true — Push alert when the news window starts and ends
[8c. No-trade windows]
- Inp_SC_TZ = Computer local time — Clock used by [8c] and [8d]
- Inp_SC_TesterUTC = 8 — Tester only: your UTC offset in hours (tester has no clock)
- Inp_MB_EN = false — Enable the manual no-trade windows below (works in backtests)
- Inp_MB_Scope = Add-on orders only — What to stop inside a window
- Inp_MB_1 = (empty) — Window 1: 2026.12.05 20:00-23:30 (no quotes; empty = unused)
- Inp_MB_2 = (empty) — Window 2 (same format)
- Inp_MB_3 = (empty) — Window 3 (same format)
- Inp_MB_4 = (empty) — Window 4 (same format)
[8d. Weekend protection]
- Inp_WE_EN = false — Enable weekend protection (works in backtests)
- Inp_WE_Fri_Stop = 20:00 — Friday hh:mm new orders stop (empty = skip; up to 47:59)
- Inp_WE_Scope = Add-on orders only — What to stop from that time until Monday
- Inp_WE_Flat_EN = false — Close ALL positions on Friday at the time below (win or lose)
- Inp_WE_Fri_Flat = 23:00 — Friday hh:mm to close everything (hours up to 47 allowed)
- Inp_WE_Mon_Resume = 12:00 — Monday hh:mm when new orders may open again
- Inp_SC_Alert = true — Push alert when a window or weekend protection starts/ends
[9. Push alerts]
- Inp_Alert_Defense_EN = true — Alert on protections (halts, loss stops, equity line, lock)
- Inp_Alert_Close_EN = true — Alert on closes (up/down pairing)
[10. Panels]
- Inp_Show_Settings = true — Show the left settings panel
- Inp_Show_Stats = true — Show the bottom-left stats / volatility / news panel
- Inp_Show_Control = true — Show the bottom-right control center (with CLOSE ALL)
Risk warning: Trading leveraged products involves a high risk of loss and is not suitable for everyone. Backtests and demo results do not represent real trading results and do not guarantee future performance. Test on a demo account first and trade only with money you can afford to lose.
