Gold Breakout Retest

Gold Breakout Retest

Gold Breakout Retest is an automated MetaTrader 5 Expert Advisor built around a structured range breakout and retest trading approach.

The EA identifies sideways price boxes, evaluates breakout strength, waits for a retest of the breakout area, and combines trend, market structure and price-action confirmation before opening a trade.

The strategy is designed to reduce low-quality entries by using multiple confirmation and risk-management layers instead of entering immediately on every breakout.

Main Trading Logic

The EA follows a structured trading process:

  1. Detect a valid sideways price range.
  2. Measure the quality of the range.
  3. Detect a breakout above or below the range.
  4. Evaluate breakout strength.
  5. Wait for a retest of the breakout level.
  6. Confirm momentum and price action.
  7. Check the higher-timeframe trend and market structure.
  8. Open the trade only when the required entry score is reached.

The default configuration uses M15 as the signal timeframe and H1 as the higher-timeframe trend filter. Pasted text

Sideway Box Detection

The EA automatically detects consolidation areas using:

  • Range width relative to ATR
  • Number of touches near the upper boundary
  • Number of touches near the lower boundary
  • Price distribution inside the range
  • Box quality scoring

Only boxes that satisfy the configured quality requirements are considered for breakout trading. Pasted text

Breakout and Retest Engine

The breakout engine analyzes:

  • Breakout body size
  • ATR-adjusted breakout strength
  • Candle closing position
  • Wick size
  • Trend alignment
  • Market structure alignment
  • Retest distance
  • Retest price action
  • Momentum confirmation

The system can dynamically adjust the required entry score depending on the detected box quality. Pasted text Pasted text

Trend and Structure Confirmation

The EA uses:

  • Fast EMA
  • Slow EMA
  • Higher-timeframe structure
  • Directional trend scoring

The default EMA periods are 50 and 200. Pasted text

Dynamic Stop Loss and Risk Reward

Gold Breakout Retest Pro includes adaptive trade management.

Depending on breakout quality, the EA can automatically select different stop-loss and risk-reward parameters.

Default dynamic risk-reward settings include:

  • Normal breakout: up to 2.0 RR
  • Strong breakout: up to 3.0 RR
  • Extreme trend conditions: up to 4.0 RR

These values are configurable by the user. Pasted text Pasted text

Advanced Position Management

The EA includes several position-management systems:

  • Break-even protection
  • ATR trailing stop
  • Swing-based trailing stop
  • Adaptive take-profit logic
  • Trend-decay exit
  • Maximum-loss protection
  • Fast fake-breakout exit

These tools are designed to manage trades dynamically as market conditions change. Pasted text

Fake Breakout Protection

The EA can detect situations where price breaks a range but quickly returns inside it while the trend changes against the position.

When the configured conditions are met, the EA can close the trade early instead of waiting for the original stop loss. Pasted text

Daily Risk Protection

Built-in risk controls include:

  • Maximum spread filter
  • Trading cooldown
  • Adaptive cooldown after winning or losing trades
  • Consecutive-loss pause
  • Daily loss limit
  • Maximum-loss cut

The default maximum daily loss threshold is configurable and is set to 3% in the supplied default parameters. Pasted text

Economic News Filter

Gold Breakout Retest Pro includes an MT5 economic-calendar filter.

By default, the EA can:

  • Monitor USD economic events
  • Block new trades before high-impact events
  • Block new trades after high-impact events
  • Resume trading automatically after the restricted period

The default news protection window is 30 minutes before and 30 minutes after the event. Pasted text

Full State Recovery

The EA includes a recovery system designed to rebuild important internal trading state after:

  • MetaTrader restart
  • VPS restart
  • EA restart
  • Temporary connection interruption

Recovery features include:

  • Persistent live-state snapshots
  • Historical trade-state reconstruction
  • Startup bar scanning
  • Recovery validation
  • Protection against trading when recovery fails

The default startup recovery scan is configured for up to 15,000 bars. Pasted text

Push Notifications

The EA supports MetaTrader mobile push notifications for events such as:

  • Trade opened
  • Trade closed
  • Break-even activation
  • Risk exit
  • EA startup
  • EA shutdown
  • Connection changes
  • AutoTrading status changes
  • News trading block
  • Daily trading report
  • Heartbeat/status notifications

A watchdog system can retry failed trade notifications and recover missed trade notifications from recent deal history after a terminal or VPS restart. Pasted text

Default Settings

Recommended starting configuration:

Signal timeframe: M15
Trend timeframe: H1
Fast EMA: 50
Slow EMA: 200
ATR period: 14
Fixed lot: 0.02
Maximum spread: 100 points
News filter: Enabled
High-impact USD news blocking: Enabled
Break-even: Enabled
ATR trailing: Enabled
Swing trailing: Enabled
Daily loss protection: Enabled
Full State Recovery: Enabled

The default parameters can be changed according to the trading account, broker conditions and individual risk requirements. Pasted text Pasted text

Installation

  1. Install the Expert Advisor in MetaTrader 5.
  2. Attach it to the desired trading chart.
  3. Enable Algo Trading.
  4. Check the input parameters before trading.
  5. For push notifications, configure your MetaQuotes ID in MetaTrader 5.
  6. For live automated trading, using a stable VPS connection is recommended.

Important Notes

The performance of an Expert Advisor can vary depending on:

  • Broker pricing
  • Spread
  • Slippage
  • Execution speed
  • Account type
  • Symbol specification
  • Market volatility
  • Trading settings

Backtest results do not guarantee future trading performance.

Always test the EA in the MetaTrader 5 Strategy Tester and on a demo account before using it on a live trading account.

Trading involves risk and losses can occur.


Filtrer:
Aucun avis
Répondre à l'avis