Fortune MT5 – The Breakout Expert Advisor With Full MQ5 Source Code
Table of Contents
- Introduction
- What Makes Fortune MT5 Different?
- How the XAUUSD Breakout Logic Works
- Risk Management in Fortune MT5
- Step-by-Step Installation Guide
- Backtesting and Forward Testing Tips
- Understanding the Included MQ5 Source Code
- Best Practice Settings
- Frequently Asked Questions
- Final Thoughts
Introduction
Trading gold on MetaTrader 5 can be demanding. Price moves fast, spreads widen without warning, and emotional decisions creep in at the worst time. Fortune MT5 + MQ5 Source Code is an automated XAUUSD breakout Expert Advisor that tackles these hurdles with a clear, rule-based process. By combining selective entries, a single trade per signal, and predefined exit levels, it aims to give traders more structure without removing control.
Throughout this guide we break down how Fortune MT5 operates, why the source code matters, and how you can set the EA up on your own MetaTrader 5 terminal. Everything is explained in plain language, so you don’t have to be a programmer or a seasoned professional to follow along.
What Makes Fortune MT5 Different?
Many Expert Advisors rely on aggressive methods such as grid trading or martingale scaling. While these can show strong equity curves in short backtests, they often carry hidden risk. Fortune MT5 takes a cleaner route:
- No grid, no martingale, no recovery stacking – each position stands alone.
- Single-entry approach – the EA opens one position per valid breakout, then manages it to completion.
- User-defined risk – you choose exactly what percent of your equity is at risk per trade.
- Full MQ5 source code – inspect, verify, and adapt the program to your own ideas.
Because the logic is transparent, you are free to learn from it or tweak it. That is a sharp contrast to many “black-box” robots.
How the XAUUSD Breakout Logic Works
Fortune MT5 is designed around the idea that price sometimes pauses in a range, then breaks out with energy. By waiting for a clear breakout of recent structure rather than guessing, the EA seeks to catch those moves while avoiding random spikes.
3.1 Structured Market-Structure Analysis
- Detect recent highs and lows – the EA scans the last n candles on the H1 chart.
- Set breakout zones – a small buffer is added above resistance and below support.
- Confirm momentum – only when price closes beyond a zone with enough candle body does the EA consider an entry.
- Open position – long for a breakout above resistance, short for a breakdown below support.
3.2 Single-Entry Model
After a position is opened:
- A pre-calculated Stop Loss and Take Profit are attached instantly.
- The lot size is derived from the risk percentage you set in the inputs.
- No additional trades are taken until the current one is closed, so drawdown remains easy to track.
The aim is to reduce clutter on the chart and keep risk per idea well defined.
Risk Management in Fortune MT5
4.1 User-Defined Percentage Risk
Inside the settings you will find RiskPercent. Set it to the share of account equity you are comfortable risking. For example:
- Account balance: $2,000
RiskPercent: 1.5%- Calculated risk per trade: $30
The EA then sizes the position so that the distance from entry to Stop Loss equals roughly $30, adjusted for the broker’s contract value. If your broker applies variable spread, the final lot size can differ slightly, which is normal on MetaTrader 5.
4.2 Fixed Stop Loss and Take Profit
Fortune MT5 uses pip-based exit levels rather than trailing stops or dynamic partial closes. Typical default values on XAUUSD H1 might be:
- Stop Loss: 300 points (30 pips)
- Take Profit: 450 points (45 pips)
You can change them, but keep in mind that broader Stop Losses reduce position size while narrower stops increase it. Always retest after making adjustments.
Step-by-Step Installation Guide
- Download the package – you receive both the
.ex5file and the full.mq5source. - Open MetaTrader 5 and click File ▸ Open Data Folder.
- Navigate to MQL5 ▸ Experts and copy the two files there.
- Restart MetaTrader 5 or right-click Navigator ▸ Experts ▸ Refresh.
- Drag Fortune MT5 onto your XAUUSD H1 chart.
- In the Inputs tab, set:
RiskPercent– e.g.,2.0StopLossPoints– e.g.,300TakeProfitPoints– e.g.,450
- Tick Allow Algo Trading at the top of the platform and on the EA settings window.
- Watch the smiley face in the chart corner. A happy face means the EA is active.
Tip: Use a VPS with stable latency if you plan to run the EA 24/5. https://www.mql5.com/en/vps offers an integrated MT5 hosting service.
Backtesting and Forward Testing Tips
Backtesting XAUUSD can be tricky because tick data size grows fast. Here is a workflow that keeps things light yet useful:
| Task | Description |
|---|---|
| Download history | In MT5, open the Symbol window, find XAUUSD, press Bars to download full H1 data. |
| Use “Every Tick Based on Real Ticks” | This mode is slower but reflects spread changes. |
| Test at least 3 years | A longer sample helps show sideways, trending, and volatile phases. |
| Log to file | Fortune MT5 writes trade info to the Journal. Save the log for later review. |
| Check drawdown | Focus not only on net profit but also the depth and length of losing streaks. |
Once you have a backtest that looks acceptable, move to a demo account. Let the EA run live for a few weeks. Compare live fills to Strategy Tester fills. If slippage or spread is higher than expected, adjust your risk or talk to support at your broker.
For more on backtesting, see MetaQuotes’ official guide: https://www.metatrader5.com/en/terminal/help/algotrading/strategy_tester.
Understanding the Included MQ5 Source Code
The source code is neatly split into sections:
- Inputs – User settings such as risk, SL/TP, session filter.
- OnInit() – Parameter validation when the EA loads.
- OnTick() – Main entry logic; checks if a new H1 candle closed and then calls
CheckBreakout(). - CheckBreakout() – Looks for breakouts in either direction.
- PlaceTrade() – Calculates lot size and sends the order with SL/TP.
- OnTradeTransaction() – Handles updates on open positions and prints outcomes.
Because everything is commented, even a beginner can trace the decision flow. If you want to add, say, a trailing stop, you could insert your code in OnTrade(). Just remember to retest extensively.
Key reason to keep source: you remain independent. If MetaTrader 5 changes in the future or you shift to a broker with different contract size, you can adapt without waiting for a third-party update.
Best Practice Settings
Below is a starting point used by many early adopters. Treat it as reference, not as financial advice.
| Parameter | Value | Why? |
|---|---|---|
| Timeframe | H1 | Balance between noise and signal on gold. |
| RiskPercent | 1–2% | Leaves breathing room for losing streaks. |
| StopLossPoints | 300 | Wide enough to allow breakout pullback. |
| TakeProfitPoints | 450 | Roughly 1.5R reward-to-risk. |
| Trade Hours Filter | 01:00–22:00 platform time | Avoid roll-over spread spikes at midnight. |
| MaxSpread | 40 points (4 pips) | Skip entries when spread is abnormally high. |
Feel free to experiment, but keep a testing log each time you modify a variable. Consistency beats constant tinkering.
Frequently Asked Questions
Q1: Can I run Fortune MT5 on other symbols?A: The logic is tuned for XAUUSD. You may try on majors like EURUSD, but performance is not guaranteed. Always test first.
Q2: Is the EA FIFO compliant?A: Yes. It opens only one trade at a time and closes it fully. US brokers that enforce FIFO should accept it.
Q3: Does it use hedging?A: No. Only one direction is active at any given moment.
Q4: What leverage is required?A: Moderate leverage such as 1:100 is enough because risk is defined by percentage, not by lot size alone.
Q5: How do I update the EA?A: If you code your own edits, re-compile in the MetaEditor and replace the .ex5 in the Experts folder.
Q6: Can I withdraw profits while the EA runs?A: Yes. The EA recalculates risk based on current equity each time it places a trade.
Q7: What happens during high-impact news?A: The EA has no built-in news filter. You can pause auto-trading manually or add a filter in the source code if desired.
Final Thoughts
Fortune MT5 offers a simple, transparent way to approach gold breakout trading on MetaTrader 5. With single-entry logic, user-set risk, and full MQ5 source code, you stay in charge while letting the platform handle the heavy lifting. Whether you keep the EA as is or build upon it, the goal remains the same: clear rules, measured risk, and a strategy you understand from the inside out.
Ready to give it a try? Download Fortune MT5, load it on a demo XAUUSD H1 chart, and see how the breakout logic fits your trading style. If it clicks, you can move on to a live account at your own pace.
Happy trading, and always manage your risk carefully.



















Reviews
There are no reviews yet.