How to Install an EA on MT4
BY TIOmarkets
|June 8, 2026An Expert Advisor (EA) is an automated trading program that runs on a chart in MT4 and executes trades according to coded rules. Installing an EA on MetaTrader 4 involves placing the EA file in the correct platform folder, attaching it to a chart, and enabling AutoTrading. Once configured, the EA monitors the market and places, modifies, and closes orders without manual input.
This guide covers how EAs work in MT4, where to place the EA file, how to attach it to a chart, how to enable AutoTrading, and the practical considerations that affect how an EA runs in live conditions at TIOmarkets.
What Is an EA in MT4?
An Expert Advisor is a program written in MQL4 that runs inside the MT4 terminal. EAs come as compiled files with the .ex4 extension or source code files with the .mq4 extension. Once attached to a chart, an EA reads incoming price data and can place market or pending orders, modify open positions, and close trades automatically based on the rules in its code.
EAs run only while the MT4 desktop terminal is open and connected. If you close MT4, the EA stops. This is why many traders run EAs on a Virtual Private Server (VPS) so the terminal can remain online continuously.
EAs are supported on MT4 across all TIOmarkets account types. They are not available on MT4 mobile or web; EA execution requires the desktop terminal on Windows or macOS.
How to Install an EA on MT4
To install an EA on MT4, you place the EA file in the platform's MQL4/Experts folder. The easiest way to find this folder is through the platform itself.
Open MT4. From the top menu, select File > Open Data Folder. A file explorer window opens at the root of your MT4 data directory.
Inside the data folder, navigate into the MQL4 subfolder, then into the Experts subfolder. The full path is MQL4/Experts. This is where MT4 looks for Expert Advisors.
Copy the EA file (.ex4 or .mq4) into the MQL4/Experts folder.
Return to the MT4 terminal. Open the Navigator window using Ctrl+N if it isn't already visible. Right-click on "Expert Advisors" in the Navigator and select "Refresh." The newly installed EA appears under the Expert Advisors section.
If the EA doesn't appear after refreshing, close and reopen MT4. The platform reloads the contents of the MQL4 folders on startup.
How to Attach an EA to a Chart
Once installed, the EA needs to be attached to a chart for it to run. Open the chart for the instrument you want the EA to trade. Make sure the timeframe matches the one the EA was designed for, since many EAs are tuned for a specific timeframe.
From the Navigator window, drag the EA onto the chart, or double-click the EA name. The EA settings dialog opens.
The dialog typically has Common, Inputs, and Dependencies tabs. On the Common tab, ensure "Allow live trading" is enabled. Without this, the EA will load on the chart but will not place trades. Other options on the Common tab control whether the EA can modify alerts, send notifications, or import functions.
The Inputs tab shows the EA's parameters. These vary by EA and may include risk percentage, lot size, stop-loss distance, take-profit distance, indicator periods, and trading hours. Configure these to match your trading plan.
Click OK. A smiley face icon appears in the top right corner of the chart. This confirms the EA is loaded and active. A frown or "x" icon means the EA is loaded but not trading; this usually indicates AutoTrading is disabled on the toolbar or the "Allow live trading" checkbox was not ticked.
Enabling AutoTrading
In addition to the per-EA "Allow live trading" checkbox, MT4 has a global AutoTrading button on the main toolbar. This button must be enabled before any EA on any chart can place trades.
Look for the "AutoTrading" button in the toolbar. When AutoTrading is enabled, the button appears with a green play icon. When disabled, it shows a red stop icon. Click the button to toggle the state.
You may also need to check the global settings. Go to Tools > Options > Expert Advisors. Ensure "Allow automated trading" is checked. Other options on this tab include "Disable automated trading when the account has been changed" and "Disable automated trading when the profile has been changed," which can be useful safety controls.
Once both the global AutoTrading button and the per-EA "Allow live trading" checkbox are enabled, the EA will begin trading according to its coded rules when its conditions are met.
Practical Considerations
EAs run only while the MT4 desktop terminal is open and connected to the trading server. If your computer sleeps, loses internet, or shuts down, the EA stops. For continuous operation, a VPS is the standard solution. MT4 includes integration with the MetaQuotes Virtual Hosting service, accessed via the Tools menu. Running an EA on a VPS through this service requires a valid MQL5 community account. The MetaQuotes service automatically selects the geographically closest server.
Test any EA on a demo account before running it live. Demo accounts often execute instantly and may not fully replicate live slippage or spread conditions, but they allow you to verify that the EA loads correctly, accepts your input settings, and produces orders consistent with your expectations. Orders are executed at the best available market price, which may result in positive or negative slippage. Spreads are variable and are typically higher than minimum figures shown.
MT4 also includes a Strategy Tester (View > Strategy Tester or Ctrl+R) which can backtest the EA against historical data. The MT4 Strategy Tester is single-threaded, so testing complex EAs across long periods can take time.
EAs are supported on all TIOmarkets MT4 account types. EA execution is desktop only; the MT4 mobile and web platforms do not run EAs.
A poorly configured or untested EA can lose money rapidly. Understand the strategy the EA is based on, the conditions under which it places trades, and the maximum drawdown it can incur. Set risk per trade conservatively and monitor the EA's behaviour regularly, especially in the first weeks of live use.
Trading at TIOmarkets
TIOmarkets offers MetaTrader 4 and MetaTrader 5 on desktop, web, and mobile, across four account types. The Standard account is created automatically on registration with a minimum deposit of $20 or currency equivalent. The Raw and VIP Black accounts are opened separately through the client area. The Nano account is MT5 only with a $20 minimum deposit, USD only. Hedging is supported on all accounts. A swap-free Islamic account is available; contact TIOmarkets for eligibility and instrument requirements. Copy trading is available on both MT4 and MT5.
Orders are executed at the best available market price, which may result in positive or negative slippage. Demo accounts often execute instantly and may not fully replicate live slippage conditions. Spreads are variable and are typically higher than minimum figures shown. Leverage on each instrument is subject to change depending on market conditions and applicable regulatory requirements. You can review the full list of account types on the TIOmarkets accounts page.

FAQ
Risk disclaimer: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. Never deposit more than you are prepared to lose. Professional client’s losses can exceed their deposit. Please see our risk warning policy and seek independent professional advice if you do not fully understand. This information is not directed or intended for distribution to or use by residents of certain countries/jurisdictions including, but not limited to, USA & Countries included in the OFAC sanction list. The Company holds the right to alter the aforementioned list of countries at its own discretion.
TIOmarkets offers an exclusively execution-only service. The views expressed are for information purposes only. None of the content provided constitutes any form of investment advice. The comments are made available purely for educational and marketing purposes and do NOT constitute advice or investment recommendation (and should not be considered as such) and do not in any way constitute an invitation to acquire any financial instrument or product. TIOmarkets and its affiliates and consultants are not liable for any damages that may be caused by individual comments or statements by TIOmarkets analysis and assumes no liability with respect to the completeness and correctness of the content presented. The investor is solely responsible for the risk of his/her investment decisions. The analyses and comments presented do not include any consideration of your personal investment objectives, financial circumstances, or needs. The content has not been prepared in accordance with any legal requirements for financial analysis and must, therefore, be viewed by the reader as marketing information. TIOmarkets prohibits duplication or publication without explicit approval.
Join us on social media
Authors BIO

Behind every blog post lies the combined experience of the people working at TIOmarkets. We are a team of dedicated industry professionals and financial markets enthusiasts committed to providing you with trading education and financial markets commentary. Our goal is to help empower you with the knowledge you need to trade in the markets effectively.





