just now

Liquidity Finder Ltd is incorporated in England and Wales, company number 10610740, registered address 167-169 Great Portland Street, Fifth Floor, London W1W 5PF, United Kingdom.
Published: just now

TL;DR – Key Takeaways
In our previous guides, we showed you how to connect Gemini AI to MT5 for free and how to activate MT5's built-in native MT5 AI assistant. We also introduced our Gold (XAUUSD) Price Action Strategy Framework to scan live charts using AI prompts.
Scanning charts manually is great, but active traders face one major challenge: time. Key market breakouts on Gold or major currency pairs often happen during session overlaps when you are away from your screen or unable to monitor multiple timeframes.
This guide takes your trading workflow to its natural conclusion: turning your strategy into a 24/7 automated Expert Advisor (EA). Using our two-step AI workflow, you don't need any programming background—your Web AI creates the master prompt, the MT5 Terminal AI generates and saves the EA file automatically, and MetaEditor compiles it with one click.
First, let's understand the difference between an MQL5 Script and an Expert Advisor (EA):
Every automated trading bot is built on four core building blocks that AI handles for you:
To ensure seamless code generation, we follow the exact Two-Step Prompt Engineering method established in our strategy training guide.
First, open your preferred Web AI (ChatGPT, Claude, or Gemini Web) and feed it an educational strategy guide, such as ACY Securities' Gold Price Action Strategy guide along with the prompt instructions below:
(EXAMPLE ONLY)
| Act as an expert MQL5 prompt engineer. | Read the technical strategy guidelines from the following reference: | [Paste your educational strategy notes, rules, or reference text here] | Convert these guidelines into a structured, single-block MT5 Master Prompt designed to instruct an MT5 Terminal AI to generate a complete Expert Advisor (.mq5 file). | --- STRATEGY SPECIFICATIONS TO INCLUDE --- | 1. SYMBOL & TIMEFRAME: XAUUSD (Gold), execution on H1 chart with Daily trend bias. | 2. ENTRY LOGIC: | - BUY: Daily trend is Bullish (Price above 20 EMA) AND H1 price breaks above Resistance with a Bullish Engulfing candle. | - SELL: Daily trend is Bearish (Price below 20 EMA) AND H1 price breaks below Support with a Bearish Engulfing candle. | 3. RISK MANAGEMENT: | - Risk per trade: 1% of account balance (calculate lot size automatically). | - Stop Loss: 15 pips outside recent swing high/low. | - Take Profit: Minimum 1:2 Risk-to-Reward ratio. | 4. MQL5 CODE REQUIREMENTS: | - Use native CTrade library (#include <Trade\Trade.mqh>). | - Implement OnInit(), OnDeinit(), and OnTick() functions. | - Restrict execution to ONE trade per candle setup. | - Add error reporting via GetLastError(). |
Pro Tip: Terms like "swing high" or "engulfing candle" can be coded in multiple ways. For the cleanest code output, tell your Web AI exact bar references—such as "use the highest high of the previous 10 completed bars for swing reference" and "confirm engulfing on bar close (Bar 1 vs Bar 2)."
Copy the formatted Master Prompt generated by your Web AI, switch to MetaTrader 5, and paste it directly into your active MT5 Terminal AI Chat Window (whether using Gemini 3.5 Flash-lite API or the native MQL5 Lite model).
Important Note: The Major Advantage: When you prompt the MT5 Terminal AI to build an Expert Advisor, MT5 automatically generates and saves the .mq5 file directly into your platform's MQL5/Experts folder. You do not need to manually create a blank template file or write any code from scratch.
Because MT5 automatically creates the Expert Advisor file for you upon prompt submission, bringing your trading bot to life takes just a few quick clicks:
In your MT5 terminal top menu, click Tools -> MetaQuotes Language Editor (or press shortcut key F4).
In MetaEditor's left-hand Navigator panel, expand the Experts folder. You will see your newly generated EA file (e.g., XAUUSD_AI_PriceAction_EA.mq5) already created and waiting for you. Double-click to open it.
Click the green Compile button in the top menu bar (or press F7). Check the Toolbox panel at the bottom of your screen to confirm:
Result: 0 errors, 0 warnings
Your Expert Advisor is now fully compiled and visible under Navigator -> Expert Advisors inside MT5, ready to be attached to your live or demo chart
💡 Pro Tip for Automated Trading: Once your EA is running, make sure your MT5 connection is fast and your spreads are low. Fast execution ensures your robot enters trades at the exact price the AI intended.
If you run into technical hurdles during setup, follow these quick solutions:
If clicking Compile (F7) triggers red error icons in MetaEditor, copy the exact error log and submit it back to your AI assistant with this debugging prompt:
| My MetaEditor compiler returned this error: | "Error: 'CTrade' - undeclared identifier at line 24" (Example Only) | Here is my current MQL5 code: | [PASTE YOUR CODE HERE] | Please identify the missing directive or syntax error, fix the code, and provide the updated MQL5 script. |
The AI will identify missing header files (such as #include <Trade\Trade.mqh>) and re-issue clean code ready for compilation.
We strongly recommend testing any newly generated Expert Advisor on a demo account first or verifying historical performance using the MT5 Strategy Tester before risking real capital.
If you want your EA to trade continuously around the clock without leaving your home computer running, deploy your MT5 platform on a Virtual Private Server (VPS).
To pause execution, click the Algo Trading button in the top MT5 toolbar to toggle it off. To remove the EA completely, right-click on the chart, hover over Expert Advisors, and click Remove.
Now that your Expert Advisor is compiled and ready, the next essential step is validating its historical performance.
In our final installment, Article 5: Stress-Testing Your AI EA: How to Backtest and Optimize Automated Strategies in MT5.
We will cover:
Put Your AI Trading Bot to the Test for Free!
Now that your Expert Advisor is compiled, don't risk capital right away. Deploy your AI-generated EA on an ACY Securities Free MT5 Demo Account to monitor its live chart execution, entry triggers, and trade management in real-time market conditions with zero risk.
Follow John Rey Cercado for practical AI trading guides, strategy automation, and MT5 tips on LinkedIn.
Disclaimer:
Trading Forex, Gold, CFDs, cryptocurrencies, commodities, indices, and other leveraged financial instruments involves a high degree of risk and may not be suitable for all investors or traders. Market conditions can change rapidly, and leveraged trading can result in losses that occur quickly.
Before trading, carefully consider your investment objectives, level of experience, and risk tolerance. Only trade with capital you can afford to lose and seek independent financial or professional advice where appropriate.
All market analysis, price forecasts, technical commentary, trading scenarios, educational materials, and opinions presented in this content are provided solely for general informational and educational purposes. They do not constitute financial advice, investment advice, a recommendation, solicitation, or an offer to buy or sell any financial instrument.
Past performance and historical price movements are not reliable indicators of future results. Any price levels, targets, scenarios, or market outlooks discussed should be viewed as analysis rather than guarantees of future market performance.
ACY Securities is one of Australia's fastest growing multi-asset online trading providers, offering ultra-low-cost trading, rock-solid execution, technologically superior account management and premium market analysis.
Select the categories and companies you wish to follow directly to your person rss feed.
Create Custom RSS FeedSign up and join over 5,000 professional members who receive personalized news alerts, curated professional connections, and more for free!
ESMA has published an opinion stating that MiCA-authorised crypto-asset service providers should cease services tied to non-MiCA-compliant stablecoins for EU clients across MiCA crypto-asset services. National authorities should require remediation of existing exposures within three months, by early January 2027.
Nasdaq Ventures has made a strategic investment in Amsterdam-based derivatives and crypto exchange One Trading, with both firms to explore 24/7 trading of equity futures. The undisclosed investment follows Nasdaq's US$100 million investment in Payward, the parent of Kraken, and CME Group's move to 24/7 trading.
cTrader has opened multi-platform plugins to brokers and prop firms, which can pre-install their own tools for clients or list them in cTrader Store. The plugins run across Mobile, Web, Windows and Mac, and can be built and launched independently of core-platform releases, including trading journals and calculators.
Institutional brokerage and financial infrastructure provider Clear Street has joined TradingView’s broker network, allowing its clients to trade US stocks, exchange-traded funds and options directly through the charting and analysis platform.
Learn how to improve trading psychology, manage fear and greed, avoid revenge trading, and follow your trading strategy with discipline and a trading journal.
GTC Prime has announced a strategic partnership with Centroid Solutions to manage and distribute its liquidity through CS 360 Bridge, Centroid's multi-asset connectivity and execution engine, giving brokers and institutional clients access to tailor-made pricing, low-latency execution and real-time risk management.
CMC Markets Founder and CEO, Lord Peter Cruddas, discusses the structural evolution of the Group, the accelerating opportunity across B2B and institutional markets, major global partnerships including Revolut, Westpac, and ASB, and his outlook for the remainder of the financial year ahead.
Clear Street has announced an exclusive partnership with Seawolf Capital to bring market commentary from Danny Moses, Vincent Daniel and Porter Collins to its clients and the wider investing community, including live market calls, digital content and events. New programming will sit alongside Seawolf's podcast.
Yields are surging. But is inflation really the reason? This week’s BitDelta Pro Weekly Outlook looks beyond the headline explanation to examine what is actually driving the move in rates, and what that could mean across equities, credit and commodities. We also explore the growing importance of balance-sheet quality, the signals emerging from the AI infrastructure cycle, and what oil and gold may be telling markets about the current macro regime. Read the full Weekly Outlook. BitDelta Securities Financial Services LLC, regulated by the Capital Market Authority under Category 5 (Introduction Only), acts solely as an introducer and does not provide trading, execution, dealing, advisory, portfolio management, or custody services. All trading, execution, and investment-related services are provided by BitDelta Limited, Mauritius, a licensed Investment Dealer. All trading and investments involve risk. The value of investments may fluctuate, and you may receive less than your initial investment.
Devexperts has appointed Rainer Fuchsluger as Global Group Chief Executive Officer, effective immediately. His career spans LSEG, Wolters Kluwer, SS&C and Thomson Reuters, and he follows Ben Hurley, who was CEO for two years. His mandate covers international growth, cloud computing and AI across the portfolio.