| Haven Gold Miner v2.0 - User Manual |
This is the official user manual for the Expert Advisor Haven Gold Miner.
The EA is designed for automated gold trading (XAUUSD / GOLD) in MetaTrader 5. The core concept of the product is trend-following gold trading with clear risk control, a modern information panel, Telegram notifications, and a dedicated protection mode for prop firms.
Haven Panel, status and error codes: https://www.mql5.com/en/blogs/post/771952
Telegram setup guide: https://www.mql5.com/en/blogs/post/772070
Live Signal: https://www.mql5.com/en/signals/2349195
| Important Risk Warning |
Haven Gold Miner does not guarantee profit and cannot eliminate trading risks. Past backtest results do not guarantee future performance.
Live trading may differ from the Strategy Tester due to spread, commission, swap, slippage, VPS latency, liquidity, trading sessions, and the specific quotation characteristics of a particular broker.
The EA is a trend-following system. In strong directional movements of gold, it may perform better, whereas in a prolonged sideways market (flat), the profit may temporarily stagnate, decrease, or fluctuate around the current level. This is normal behavior for a trend-following model.
| Key Points to Understand About the Trading Style |
Haven Gold Miner is not a scalper, HFT robot, or latency arbitrage system, and it is not based on ultra-fast sub-second entries.
The EA makes its primary trading decisions on the working M15 bar. Therefore, such a system is generally less dependent on factors that are critical for scalpers:
- micro-spread of a few points;
- minor tick noise;
- millisecond VPS latency;
- reaction speed to every single tick;
- highly frequent order execution;
- sub-second spread widening.
This does not mean that broker conditions are completely irrelevant. Spread, commission, slippage, swap, and quotation quality still affect the final result. However, the system is not designed to trade tiny price impulses where every fraction of a spread can destroy the strategy's edge.
| Quick Start |
- Install the Expert Advisor in MetaTrader 5.
- Open the gold chart at your broker: XAUUSD, GOLD, XAUUSD+, XAUUSD.pro, or another real gold symbol.
- Set the timeframe to M15.
- Drag and drop the Haven Gold Miner Expert Advisor onto the chart.
- In the Common tab, allow algorithmic trading for the Expert Advisor.
- Enable the main AutoTrading / Algo Trading button in the terminal.
- Verify that there is no red error status on the EA panel.
- Start with the Safe profile and minimal risk.
If the EA does not open trades immediately after installation, this is not an error. It only opens trades when there is a valid trading signal and all protective checks have been passed.
| Account And Broker Requirements |
| Platform | MetaTrader 5 |
| Account type | Hedging |
| Netting account | Not suitable |
| Symbol | XAUUSD / GOLD only |
| Timeframe | M15 |
| Minimum lot | 0.01 preferred |
| VPS | Recommended for stable 24/5 operation |
| AutoTrading | Must be enabled |
Why a Hedging account is required: The EA uses multiple internal systems. To correctly separate positions by Magic Number, a Hedging-type account is required, where separate positions can coexist on a single symbol.
On a Netting account, positions on the same symbol are consolidated by the terminal into a single net position. This mode is not suitable for this EA.
Which symbol to choose: Use the exact gold trading symbol of your broker: XAUUSD, GOLD, XAUUSD+, XAUUSD.pro, XAUUSDm, etc. If the symbol is not tradable or the panel shows a symbol-related error, open Market Watch, find the correct gold symbol, and check its Specification.
| Important: Gold Is An Expensive Asset |
- if the deposit is small, the actual risk may be higher than specified in Risk %;
- if the broker does not allow opening a lot smaller than 0.01, the EA will not be able to reduce the position below the minimum lot;
- with multiple enabled systems, the risk and deposit load accumulate;
- large candles and rapid movements are normal for gold.
Practical guideline: It is advisable to have a minimum of about 500 USD for each enabled system.
| Active Systems | Conservative Deposit Guideline |
| 1 system | from 500 USD |
| 2 systems | from 1000 USD |
| 3 systems | from 1500 USD |
| 4 systems | from 2000 USD |
This is not a guarantee of safety or a hard rule. It is a guideline to help users understand that gold is not a cheap instrument for a small deposit. If your deposit is smaller, use Fixed Lot = 0.01, the Safe profile, and do not over-leverage risk.
| Core Operational Principles |
Haven Gold Miner utilizes four internal systems, a risk profile, an information panel, and dedicated account protection settings.
The systems on the panel and in the Risk Profile are listed in increasing order of aggressiveness:
- S1 - the most conservative system.
- S2 - a balanced system.
- S3 - a more active system.
- S4 - the most aggressive system.
If you are using a .set file from a beta build or another version of the EA, please review all Inputs carefully first. Do not load settings automatically if you do not understand what exactly is configured.
Before replacing the EA on a live account, it is advisable to wait for open HGM positions to close. This reduces the risk of confusion regarding Magic Numbers, settings, and open positions.
| Risk Profile |
Risk Profile controls which internal EA systems will be active.
| Safe | S1 + S2 Fewer trades, calmer behavior, lower load on the deposit. |
| Standard | S1 + S2 + S3 More trades, higher activity, medium risk. |
| Aggressive | S1 + S2 + S3 + S4 Maximum systems, more trades, higher potential return, and higher drawdown. |
| Manual | The user manually selects systems via Manual Strategy Switches. |
The more aggressive the profile, the more trades there typically are, the higher the potential profit, the higher the deposit load, and the higher the probability of a deeper drawdown. For the first run, Safe is recommended.
Manual Strategy Switches are only used when Risk Profile = Manual. If Safe, Standard, or Aggressive is selected, manual strategy switches do not control system activity.
Magic Number is required for the EA to distinguish its positions from others and to separate positions of different internal systems. Do not set the same Magic Number for different systems. Do not change the Magic Number if there are already open positions under the old Magic Number.
| Position Sizing |
The Position Sizing section handles trade volume calculation.
| Fixed Lot | Always uses a manually specified lot size. For a small deposit, this is the most straightforward mode. |
| Risk % Of Balance | Calculates the lot size based on a risk percentage per trade. |
| Lot Per Balance Step | Increases the lot size as the balance grows. |
Manual Lot Size: Used only in Fixed Lot mode. For example, Manual Lot Size = 0.01 means the EA will open trades with a minimum lot of 0.01, provided the broker allows it.
Risk Per Trade Percent: If the calculated lot size is smaller than the broker's minimum lot size, the EA may round the volume up to the minimum allowed value. Therefore, on small deposits, the actual risk might be higher than configured.
Lot Per Balance Step / Balance Step For Lot Mode: A gradual scaling mode. For example, Lot Per Balance Step = 0.01 and Balance Step For Lot Mode = 500 means that for every 500 units of balance, the EA adds 0.01 lots according to the logic of this mode.
| Trading Settings |
- Order Comment: comment for the EA's orders. Usually, you can leave it as HGM.
- Max Total HGM Positions On This Symbol: maximum number of open HGM positions on the current symbol. 0 = unlimited.
- Max Slippage, Points: maximum allowed slippage in points.
- Max Spread, Points: maximum spread filter. 0 = filter disabled.
- Trade Direction Filter: Both, Buy only, or Sell only. Both is generally recommended.
- Gold Decimal Format: adaptation to brokers with different decimal formats for gold. Usually, use Auto.
| Drawdown Protection |
Drawdown Protection is responsible for monitoring daily and overall account drawdown.
The main parameter is Drawdown protection mode.
| Off | DD protection is disabled. New entries are not blocked by DD, and positions are not closed by DD. |
| Block entries only | When the limit is reached, the EA blocks new entries but does not close open positions. |
| Prop firm protection | When the limit is reached, the EA blocks new entries and attempts to close HGM positions on the current symbol. |
The EA only closes its own positions based on the HGM systems' Magic Numbers. Manual positions and positions of other Expert Advisors should not be closed by this mechanism.
Daily loss limit % - daily drawdown limit in percent. If set to 0, the daily limit is disabled. If set to a value greater than zero, the EA compares the current Equity against the daily baseline.
Daily reset hour / Daily reset minute - the daily baseline reset time based on the broker's server time.
| Daily Baseline |
The daily baseline determines the starting amount from which the EA calculates daily drawdown after the daily reset. Daily drawdown is always monitored against the current Equity, as Equity accounts for open positions. The only difference between the modes is which starting base is selected at the moment of the reset.
| Balance at reset | Takes the Balance at the moment of the daily reset. Suitable if you need to calculate the daily limit from a locked balance without considering open floating profit/loss at the reset time. |
| Equity at reset | Takes the Equity at the moment of the daily reset. Suitable if the rules of the account or prop firm calculate the daily limit based on actual equity, taking open positions into account. |
| Higher balance/equity at reset | Takes the higher value between Balance and Equity at the moment of reset. A stricter option if there is floating profit at the reset time and you want to calculate the daily limit from a higher base. |
Balance = 10000, Equity = 10000. All three modes will yield a baseline of 10000.
Balance = 10000, Equity = 9900.
Balance at reset will yield a baseline of 10000.
Equity at reset will yield a baseline of 9900.
Higher balance/equity at reset will yield a baseline of 10000.
With a 5% daily limit, a baseline of 10000 sets a limit of around 500, while a baseline of 9900 sets a limit of around 495.
Balance = 10000, Equity = 10300.
Balance at reset will yield a baseline of 10000.
Equity at reset will yield a baseline of 10300.
Higher balance/equity at reset will yield a baseline of 10300.
If you are not trading a prop account and simply want basic protection, it is usually easier to start with Balance at reset. If the prop firm's rules explicitly state that daily loss is calculated from the equity at the moment of reset, use Equity at reset.
Use total loss limit enables the overall loss limit. The baseline is always configured manually via Initial balance, and the current drawdown is calculated against the current Equity. The practical formula is: Initial balance - current Equity.
If Use total loss limit is enabled, Initial balance must be greater than zero. For total DD, it is impossible to reliably guess the correct starting date automatically, especially if there were deposits, withdrawals, manual trading, or other EAs on the account.
Starting prop account: 10000 USD.
Initial balance = 10000.
Total loss limit % = 10.0.
Hard loss limit = 1000 USD.
If current Equity drops near 9000 USD, total loss is considered reached.
Safety buffer % is applied only in Prop firm protection mode. The EA cannot guarantee position closure exactly at the official limit due to spread, slippage, closing commission, VPS latency, trading server latency, lack of liquidity, or market gaps.
Example: Official daily DD = 5.0%, safety buffer = 0.25%. Protective closure will start at approximately 4.75%. In Block entries only mode, the buffer is not applied because the EA does not close positions.
| You do not want to use the DD filter | Off |
| Need to simply stop new entries after the limit | Block entries only |
| Emergency protection needed for a prop account | Prop firm protection |
For prop firms, do not rely on pre-configured guesses. Verify your firm's specific rules: how daily DD is calculated, what time daily reset occurs, whether there is a total DD, what amount total DD is calculated from, if there is a trailing drawdown, whether EAs are permitted, and if there are news restrictions or consistency rules.
Haven Gold Miner helps manage risk but does not guarantee passing a challenge.
| Trading Time Filter |
Trading Time Filter restricts new entries based on the broker's server time.
| Off | Time filter is disabled. |
| Trade only between | New entries are only allowed between Start time and End time. Outside this window, status E12 will be shown. |
| Skip between | New entries are prohibited between Start time and End time. Inside this window, status E11 will be shown. |
Time is set in HH:MM format based on the broker's server time. The time filter affects new entries only. It does not mean the EA is forced to close already open positions outside the window.
Examples: 'Trade only between 01:00 - 23:00' allows new trades only within this window. 'Skip between 22:45 - 00:00' prevents new trades during the rollover period or before the daily close.
| Trading Days |
Trading Days allows you to enable or disable new entries on specific days of the week. For instance, you can disable trading on Fridays or Sundays if your broker offers unfavorable conditions during those times.
| Information Panel |
The information panel displays key data directly on the chart: server time, time until the end of the trading session, broker name, account number, spread, active risk / lot mode, balance, equity, all-time profit, current position profit, daily loss, total loss, active systems, and EA status.
If the EA cannot open new trades, check the status next to the SYSTEM section.
| Trading allowed | No global blocks are active. |
| E02: Market closed | The trading session is closed. |
| E03: Enable AutoTrading | The AutoTrading button is disabled. |
| E09 / E10 | Daily or total drawdown limit reached. |
| E11 / E12 | Time filter is active. |
| E15: Spread too high | Spread is above the allowed limit. |
| E17: Insufficient margin | Insufficient free margin. |
Full guide to panel codes: https://www.mql5.com/en/blogs/post/771952
| Telegram Notifications |
Telegram notifications allow you to receive messages about trades and reports directly in Telegram.
- Create a Telegram bot via @BotFather.
- Obtain the Bot Token.
- Obtain your Chat ID.
- Allow WebRequest in MetaTrader 5 for https://api.telegram.org.
- Fill in the Telegram Notifications section in the EA's Inputs.
Full Telegram setup guide: https://www.mql5.com/en/blogs/post/772070
Important: Do not share your Bot Token and Chat ID on screenshots, forums, or in any public domain.
| Chart Appearance |
Apply HGM visual style enables the Haven visual theme for the chart. This does not affect trading logic. If you use your own chart template and do not want the EA to alter your colors, you can disable this parameter.
| Recommended First Setup |
| Risk Profile | Safe |
| Lot mode | Fixed Lot or conservative Risk % Of Balance |
| Manual Lot Size | 0.01 if the deposit is small |
| Max Spread, Points | 0 initially, then adjust after observation |
| Drawdown protection mode | Off or Block entries only for a standard account |
| Prop firm protection | Use only after carefully studying the prop firm's rules |
| Telegram Notifications | Enable after verifying trading and the panel |
| Apply HGM visual style | Optional |
For a small deposit, do not start with Aggressive. Test Safe first on a demo account or with the minimum lot size.
| Strategy Tester |
- Select your broker's gold symbol.
- Timeframe: M15.
- Verify that the correct history period is selected.
- For initial verification, you can use "Every tick based on real ticks" if high-quality history is available.
- Compare not only the net profit but also the drawdown, trade count, max losing streak, recovery factor, and monthly performance.
Do not expect the backtester and live results to match exactly. Live trading is subject to actual quotations, floating spread, commission, swap, slippage, execution latency, trading sessions, missed ticks, and specific broker environments.
| FAQ / Troubleshooting |
The EA is not opening trades.
Check the status on the panel. If an E01-E25 code is present, refer to the Haven Panel guide. Verify AutoTrading, M15 timeframe, XAUUSD/GOLD symbol, Hedging account, and Risk Profile. If the status is "Trading allowed" but there are no trades, it means there is currently no trading signal.
Why is the risk on a small deposit higher than configured?
The broker does not permit opening a lot size below their minimum. If the calculated lot size is below 0.01 and the broker's minimum is 0.01, the actual risk becomes higher than calculated.
Why is M15 required?
The EA's logic is specifically tailored for the M15 timeframe. Please use the M15 chart to avoid any confusion when monitoring the EA.
Why is a Hedging account required?
The EA runs multiple systems and separates positions using Magic Numbers. This requires Hedging-style position accounting.
Can the EA be used on EURUSD, GBPUSD, or BTC?
No. Haven Gold Miner is designed exclusively for gold (XAUUSD / GOLD).
Can all systems be enabled at once?
Yes, that corresponds to the Aggressive profile. However, it is not suitable for everyone. It delivers more trades and higher potential returns, but also increases the deposit load and drawdown risk.
Why is Telegram not sending messages?
Verify Telegram notifications, Bot Token, Chat ID, WebRequest settings for https://api.telegram.org, ensure you have clicked "Start" in your Telegram bot, and check for errors in the Experts tab.
Why does the backtester show one result and live trading another?
This is normal within reasonable limits. Live trading is subject to execution speed, spread, commission, slippage, and specific broker feeds. This is particularly noticeable on gold.
Can the EA be used with a prop firm?
Yes, provided your prop firm's rules allow Expert Advisors and the settings are configured correctly. Utilize "Prop firm protection", specify the Daily loss limit, enable "Use total loss limit" if needed, fill in the Initial balance, and make sure to include a safety buffer.
| What to Send to the EA Author If You Need Help |
Please provide the following core details first:
- screenshot of the EA panel;
- the initial diagnostic log from the Experts tab that appears immediately after launching the EA on the chart;
- a few lines from the Experts tab around the exact moment the issue occurred, if the problem did not appear immediately;
- broker name and symbol name;
- account type: Hedging or Netting;
- EA version.
The initial diagnostic log usually begins with these lines:
| HGM INFO: STARTUP | ... HGM INFO: SYMBOL | ... HGM INFO: EXECUTION | ... HGM INFO: RISK | ... HGM INFO: STRATEGIES | ... HGM INFO: DRAWDOWN | ... HGM INFO: TIME FILTER | ... HGM INFO: SERVICES | ... HGM INFO: READY | ... |
These lines already contain key technical information: symbol, timeframe, account type, spread, risk settings, active systems, drawdown mode, time filter, panel, Telegram, and retry settings.
If this data is insufficient, the author may ask for additional files: the .set file, a screenshot of the Inputs, a strategy tester report, or a longer log file.
Do not share your full Telegram Bot Token publicly.
| Quick Summary Checklist |
- Use only XAUUSD / GOLD.
- Working timeframe: M15.
- Hedging account required.
- Use Safe for the first launch.
- Gold is expensive: a small deposit can lead to higher risk than expected.
- Guideline: around 500 USD for each enabled system.
- Do not enable Aggressive unless you are prepared for a larger drawdown.
- Drawdown protection mode = Block entries only solely blocks new entries.
- Drawdown protection mode = Prop firm protection can close HGM positions of the current symbol.
- Total loss is calculated based on the manual Initial balance against the current Equity.
- If the EA is not trading, first check the status on the panel.
- If the status is unclear, refer to the Haven Panel guide.
- Do not expect the backtester and live performance to match exactly.
Haven Gold Miner is an automated trading and risk control tool. The responsibility for choosing the broker, deposit size, risk levels, and settings always remains entirely with the user.


