Tun Gold M15
- Experts
- Versão: 1.22
TUN EDGE M15 - Breakout Retest Expert Advisor for XAUUSD
Tun Edge is a fully automated Expert Advisor for Gold (XAUUSD) on the M15 timeframe. It trades one clean setup: a breakout of a recent high or low, followed by a retest of the broken level and a confirmation candle in the breakout direction. Instead of chasing the first breakout candle, it waits for the market to prove the level holds.
HOW IT WORKS
1. Breakout - price closes beyond the high/low of the previous 8 candles.
2. Retest - the next candle pulls back to the broken level and closes back on the right side of it.
3. Trigger - a confirmation candle breaks the retest candle in the breakout direction.
4. Filters - every setup is scored before entry:
- Late-entry filter: skips oversized, overextended candles
- Room-to-target filter: skips trades with a nearby swing blocking the target
- Context score: EMA 20/50 structure, RSI zone, candle strength and tick volume
- Higher-timeframe bias: H1 trend alignment adds to or subtracts from the score
Only setups with a score of 54 or higher are traded.
TRADE MANAGEMENT
- Stop loss: ATR(14) + 30 pips beyond entry
- Take profit: a fixed scalp target of 20-40 pips, adapted to current volatility
- One trade at a time - no stacking, no hedging, no grid
- Every order is sent with a hard stop loss and take profit
US SESSION FILTER
No new trades are opened during the US session (08:00-16:00 New York time by default), when high-impact US news most often hits gold. Open trades are still managed normally. The EA detects your broker's server time and US daylight saving time automatically, so it works the same with any broker. A manual GMT offset is available if needed.
RECOVERY LOT (OPTIONAL)
After a losing trade, the next lot can be increased so that one take profit recovers the loss plus the normal profit. When the loss is recovered, the lot returns to the base size. Recovery is always limited by a Maximum Lot setting that you control. You can switch it off completely to trade a fixed lot.
Important: this is a loss-recovery method. It increases position size after losses, which raises risk during losing streaks. Use a Maximum Lot you are comfortable with.
DRAWDOWN PROTECTION
- Max drawdown %: closes the trade and stops the EA if equity falls a set percentage below its peak
- Daily loss %: pauses trading for the rest of the day after a set daily loss
Both are off by default and can be enabled in the inputs.
LIVE DASHBOARD
A clean on-chart panel shows:
- Equity, today's profit/loss and drawdown from peak
- The open trade with a live progress bar from stop loss to take profit
- H1 bias, US session countdown, spread and recovery balance
- EA statistics: number of trades, win rate and net profit
Click the header to collapse or expand the panel.
RECOMMENDATIONS
- Symbol: XAUUSD (Gold)
- Timeframe: M15
- Account: hedging or netting, low-spread account recommended
- Minimum balance: 1,000 USD with the default 0.01 base lot
- Suggested presets:
1,000 USD - Base Lot 0.01, Max Lot 0.05 (Equivalent to 10USD Cent)
5,000 USD - Base Lot 0.05, Max Lot 0.25 (Equivalent to 50USD Cent)
10,000 USD - Base Lot 0.10, Max Lot 0.50 (Equivalent to 100USD Cent)
- A VPS is recommended for uninterrupted trading
I will put Set file in comment section
INPUTS
General
- Magic Number - unique ID for this EA's trades
- Signal timeframe - default M15
- Max spread (pips) - no entry when spread is above this value
- Pip size - 0.10 for gold
Lot & Recovery
- Base lot - starting lot size
- Risk % - when above 0, the base lot is calculated from % risk per trade
- Use recovery - on/off
- Maximum lot - hard cap for recovery sizing
- Reset recovery balance - clears the stored recovery amount
US Session Filter
- Enable filter, server time mode (Auto / Manual), GMT offset, block start and end hour (New York time)
Drawdown Protection
- Max drawdown %, Daily loss % (0 = off)
Dashboard
- Show dashboard, X / Y position
RISK WARNING
Trading gold with leverage carries a high level of risk and may not be suitable for all investors. Past or simulated results do not guarantee future performance. Always test the EA on a demo account and in the Strategy Tester with your broker's real tick data before trading live, and only trade with money you can afford to lose.
