Forex Anvil Breakout is a rule-based Expert Advisor built to trade a six-symbol breakout portfolio.
The EA includes separate built-in strategies for EURUSD, GBPUSD, USDJPY, XAUUSD, AUDJPY, and CHFJPY. The strategy settings are already configured, so users do not need to adjust the internal entry or exit logic.
The user controls the enabled symbols, broker symbol mapping, lot sizing, account protection, news filter, and basic trade settings.
Basic Setup
Attach Forex Anvil Breakout to one enabled symbol chart, normally EURUSD.
The EA automatically selects and manages the other enabled symbols. It can be attached to any chart timeframe because its trading timeframes are built into the strategies.
A hedging account is required. Netting and exchange accounts are not supported.
Make sure your broker provides every symbol that you enable. A starting deposit of $500 or more is suggested.
Panel Settings
Show Panel
This turns the chart panel on or off.
Use true to show the EA panel on the chart.
Use false to hide the panel.
The panel is only for display. It shows information such as strategy status, lot sizing, closed profit/loss, and trade counts. It does not control the EA.
Update Panel In Tester
This controls whether the panel updates during strategy tester runs.
Use true if you want the panel to update during backtests.
Use false if you want faster backtesting.
Broker Symbol Mapping
Use these settings if your broker adds characters before or after standard symbol names.
Examples:
- EURUSD requires no prefix or suffix.
- mEURUSD uses prefix m .
- EURUSD.D uses suffix .D .
- pro_EURUSD_i uses prefix pro_ and suffix _i .
The EA applies the mapping to all six portfolio symbols.
Strategy Settings
Forex Anvil Breakout includes six internal breakout strategies:
- Enable EURUSD
- Enable GBPUSD
- Enable USDJPY
- Enable XAUUSD
- Enable AUDJPY
- Enable CHFJPY
Use true to enable a strategy or false to disable it.
Each strategy has its own built-in symbol settings, breakout behavior, stop loss, take profit, and trade-management rules. The strategies are designed to work together as a portfolio and will not always trade at the same time.
Risk Management
Lot Sizing Mode
This controls how the EA calculates lot size.
There are two lot sizing modes:
Fixed Lot
Max Account Drawdown %
Fixed Lot Mode
Fixed Lot Size
This input is used when Lot Sizing Mode is set to Fixed Lot.
The EA uses the lot size entered by the user.
Example:
0.01
This means each trade uses 0.01 lot, unless the broker minimum lot, maximum lot, or lot step requires adjustment.
Fixed lot mode is simple. The lot size does not increase or decrease based on account balance.
Max Account Drawdown % Mode
Max Account Drawdown %
This input is used when Lot Sizing Mode is set to Max Account Drawdown %.
The EA calculates lot size based on the selected drawdown target.
Example:
10
This means the EA calculates lot sizes around a 10% account drawdown target.
Manual Account Balance
This input is used with drawdown-based lot sizing.
If Manual Account Balance is set to 0, the EA uses the real account balance.
If Manual Account Balance is set above 0, the EA uses that number instead of the real account balance when calculating lot size.
Example:
Real account balance: $10,000
Manual Account Balance: $5,000
The EA will calculate lot size as if the account balance is $5,000.
This is useful when the user wants the EA to trade more conservatively or wants to use a fixed balance number for risk calculation.
Aggressive Lot Scaling
This optional setting keeps the prior accepted lot size for recovery and can exceed the Max-DD calculated lot after account drawdown
Global Safety
Account Min Equity Stop can stop EA trading if account equity falls below the selected value.
Account Max Equity Stop can stop EA trading if account equity rises above the selected value.
Max Daily Drawdown limits the allowed daily equity drawdown. If set to 0, this protection is disabled.
Daily Drawdown Reset Hour sets the broker-time hour used for the daily drawdown reset.
Max Randomization Pips for Entry and Exit can add controlled randomization to entry and exit prices
News Filter
Enable News Filter
This turns the news filter on or off.
Use true to enable the news filter.
Use false to disable it.
The news filter uses the MQL5 Economic Calendar during live trading.
The news filter is disabled during strategy tester and optimizer runs, so live calendar filtering is not used in backtests or optimizations.
News Currencies
This tells the EA which currencies to watch for news.
For gold trading, USD news is usually the main one.
Example:
USD
If using more than one currency, separate them with commas.
Example:
USD,EUR,GBP
News Keywords
This tells the EA which news events to watch.
The EA checks calendar event names for the selected keywords.
Example:
CPI,FOMC,NFP,Payrolls,Interest Rate
The EA will look for news events that contain those words.
Auto Detect Symbol Currency
This allows the EA to try detecting the related currency from the trading symbol.
For gold, users can still manually enter USD in News Currencies.
Include High Impact News
This tells the EA whether to include high impact news events.
Use true to include high impact news.
Use false to ignore them.
Block Trading Before News
This controls whether the EA blocks new trades before selected news events.
Use true to block new trades before news.
Use false to allow normal trading before news.
Minutes Before News
This sets how many minutes before news the EA should stop opening new trades.
Example:
60
This means the EA blocks new trades 60 minutes before selected news events.
Block Trading After News
This controls whether the EA blocks new trades after selected news events.
Use true to block new trades after news.
Use false to allow normal trading after news.
Minutes After News
This sets how many minutes after news the EA should wait before opening new trades again.
Example:
30
This means the EA waits 30 minutes after selected news events before opening new trades again.
Open Trades During News
This controls what the EA does with open trades during news.
Options:
Keep all trades
The EA does not close open trades during news.
Close profitable trades
The EA closes managed trades that are in profit during news.
Close all trades
The EA closes all managed open trades during news.
This setting only applies to trades managed by the EA.
Trade Settings
Magic Number
The EA uses the base magic number to create a separate identifier for every internal strategy.
Change it when running another independent Forex Anvil Breakout instance.
Trade Comment
Sets the comment shown on EA orders.
The strategy symbol is included in the final comment, for example:
Forex Anvil Breakout EURUSD
Set TP/SL After Entry
Controls when stop loss and take profit are applied.
- false : send TP and SL with the pending order.
- true : apply TP and SL after the pending order becomes a position. randomizatio
Backtesting
Use 1 Minute OHLC for faster testing.
Use Every Tick Based on Real Ticks for detailed final testing and broker-specific execution checks.
For a complete portfolio test:
- Enable all six strategies.
- Enter the correct broker prefix or suffix.
- Make sure historical data is available for all six symbols.
- Use a hedging test account.
- Disable Update Panel In Tester for better speed.
Important Notes
Forex Anvil Breakout requires a hedging account.
The EA manages its own orders using magic numbers.
The EA uses pending buy stop and sell stop orders.
Each strategy uses fixed stop loss and take profit settings.
The EA does not use martingale recovery.
The EA does not use grid recovery.
The news filter does not work in the strategy tester because the live MQL5 Calendar is not used during testing.
No EA can guarantee profit. Test carefully before trading live.


