Capybara gold scalper MT5
- エキスパート
- バージョン: 1.0
- アクティベーション: 10
CAPYBARA GOLD SCALPER (MT5)
Calm structure-breakout trading for XAUUSD
Capybara Gold Scalper is a fully automated Expert Advisor for gold (XAUUSD) on MetaTrader 5. It reads market structure on the H1 chart, finds confirmed swing highs and swing lows, and places pending stop orders just inside those levels. When price breaks out of the structure, the order is filled and the trade is managed with a hard stop loss, a hard take profit and a trailing stop.
No martingale. No grid averaging. Every order carries a fixed stop loss and take profit from the moment it is placed.
HOW IT WORKS
1. Pivot detection (H1)
A swing high is a candle high that no candle to its left (within a set number of bars) exceeds and no candle to its right breaks. A swing low is the mirror image. The pivot is only "confirmed" once the required number of right-hand bars has closed, so the EA never trades a level that may still change.
2. Breakout entries
For every confirmed swing high the EA places a Buy Stop slightly below it; for every swing low, a Sell Stop slightly above it. The small inset gets the order filled as price pushes into the level instead of waiting for a full break.
3. Four independent strategies
The EA runs four separate engines, each with its own magic number, lot settings and trailing distance. You can run all four together or any single one.
Capybara A - Sticky pivots
H1 pivots of 10 bars left / 7 bars right. Entry 1.80 inside the pivot. Stop loss 5.00, take profit 15.00 (price units, USD per ounce). Keeps up to 6 pending orders alive at once; an unfilled order expires after 190 hours. After a losing or break-even exit, the same level can be re-armed once at the next H1 bar (up to 3 fills per level).
Capybara B - Latest-swing tracker
Asymmetric pivots: 25/2 bars for highs, 10/3 for lows. Entry 1.50 (buy) / 1.90 (sell) inside. Stop loss 5.00, take profit 25.00. Holds one pending order per side that always follows the most recent swing. Ignores a new swing that sits too close to price (under 1.20) or a level older than 84 hours, and pauses around the daily rollover (22:15 - 01:15 server time) to avoid rollover spreads.
Capybara C - Level book
H1 pivots of 7/5 bars. Entry 2.20 inside. Stop loss 10.00, take profit 25.00. Keeps a "book" of every confirmed level from the last 10 days and, every 15 minutes, works the eligible level nearest to price. A level can be traded up to 4 times; it is only re-armed after a near break-even exit (between -1.20 and +0.35), and only on the next M15 bar. Old levels sitting right next to price are skipped in favour of fresher structure.
Capybara D - Major structure
Wide H1 pivots of 27/20 bars, i.e. only significant swing points. Entry 2.20 (buy) / 1.25 (sell) inside. Stop loss 8.00, take profit 17.00. Level book of 14 days, up to 2 fills per level, same re-arm rule as C.
4. Trade management
Once a trade is 0.15 in profit, a trailing stop starts following the best price at a fixed distance (A 1.10, B 1.20, C 1.00, D 0.50). The trailing stop is held internally on every tick and also sent to the broker as the real stop loss whenever the broker's stop level allows it, so the protection survives a lost connection.
5. Protection filters
- Maximum spread filter (default 120 points): no new orders while spreads are wide.
- No new orders from Friday 22:00 server time until the market reopens; on live accounts all pending orders are removed on Friday evening.
- Before placing any order on a live account the EA checks that the terminal is connected, trading is allowed and the last tick is fresh (default 15 seconds).
- Restart recovery: after a restart, reconnect or VPS migration the EA rebuilds its state from the last 30 days of trade history and restores trailing stops, so it does not double-enter levels it has already traded.
MONEY MANAGEMENT
Each strategy has its own lot mode:
- Fixed lot (default 0.01)
- Risk % of balance per trade, calculated from that strategy's stop-loss distance
- Lot per balance: the fixed lot scaled up or down with your balance
ON-CHART PANEL
A brown capybara dashboard shows symbol, spread, open positions, pending orders, active strategies and connection state. Choose Big, Small or Off. Every order, fill, exit and skipped signal can also be written to a CSV trace file (Terminal\Common\Files) so you can audit exactly what the EA did.
REQUIREMENTS AND RECOMMENDATIONS
- Symbol: XAUUSD (any broker suffix). Attach to one chart only; the timeframe of the chart does not matter, the EA reads H1 and M15 itself.
- Account type: hedging (the strategies can hold buy and sell positions at the same time).
- Server time: the session filters are set for brokers on GMT+2 / GMT+3 (EU daylight saving). Adjust the Friday cut-off hour if your broker differs.
- Recommended start: from 1,000 USD with the default 0.01 lots on each strategy.
- Use a VPS close to your broker and a low-latency ECN account. The EA enters with stop orders, so execution quality (slippage on fills) has a direct effect on results.
MAIN INPUTS
- Entry mode: all strategies or A / B / C / D only
- Lot mode, fixed lot, risk % and balance reference for each strategy
- Magic numbers for each strategy (default 2101-2104)
- Pivot lengths, level-book age and fills per level
- Trailing activation and distance for each strategy
- Maximum spread, slippage (deviation), Friday cut-off hour, rollover pause for B
- Live safety checks, dashboard size, CSV trace on/off
RISK WARNING
Trading gold on margin carries a high level of risk and may not be suitable for all investors. Past results, including backtests, do not guarantee future performance. Test the EA on a demo account with your own broker before trading real money, and only trade money you can afford to lose.
