Learn to use the MT4 - discover the power of Expert Advisor trading using the MetaTrader 4
How to Use MT4 for Expert Advisor Trading
Expert Advisors (EAs) are programs that allow for automated trading on the MT4 platform. While they can help execute strategies without manual intervention, they involve significant risks, including technical failure and market volatility.
Installing customised indicator
- Launch MT4 on your computer.
Click ‘File’ in the top-left corner of the platform's interface. From the drop-down menu, select ‘Open Data Folder.’
In the window that opens, double-click the ‘MQL4’ folder.
To install an Indicator: Open the ‘Indicators’ folder. To ensure the file is displayed in MT4, close and restart MT4.
Installing Expert Advisors (EAs)
Launch MT4 on your computer. Click ‘File’, in the top-left corner of the platform's interface. From the dropdown menu, select ‘Open Data Folder’.
In the window that opens, double-click the ‘MQL4’ folder.
To install an EA: Open the ‘Experts’ folder. Drag and drop your file into the correct folder.
To ensure the file is displayed in MT4, right-click 'Experts' in the Navigator panel and select 'Refresh', or restart the platform.
Backtesting function
The Backtesting function is used to evaluate the performance of an Expert Advisor (EA) trading system.
MetaTrader 4 includes sample Expert Advisors (EAs) such as MACD and Moving Average for demonstration purposes. Here, we will use a sample Moving Average as an example.
Important: Backtesting is not a reliable indicator of future results. Profitability cannot be guaranteed, and historical data does not account for real-time market liquidity or slippage.
So even if backtesting optimizes the EAs, performance is not guaranteed.
- Click ‘Strategy Tester’ in the toolbar, then choose the ‘Settings’ tab.
- Click ‘Expert Advisor’
- Select the sample Moving Average ex4.
- Choose the desired ‘Symbol’.
- Select the ‘Period’.
- Choose the appropriate ‘Model’.
- Select the desired ‘Spread’.
- Click on Use Date and then choose ‘Date and Time’.
- Set the parameters in the ‘Expert Advisor Properties’ section.
- Once all the settings are adjusted, click ‘Start’ to begin the backtesting process.
How to use EA trading
Before you use EA trading, please adjust the following settings:
- Click ‘Options’ in the toolbar.
- Once the Options window appears, click the ‘EA Trading’ tab.
- Check the following options:
- Allow EA trading (mandatory)
- Disable EA trading when the account is changed (optional)
- Disable EA trading when personal information is changed (optional)
- Disable EA trading when the symbol or timeframe of the chart is changed (optional)
- Allow DLL imports (mandatory)
Computer setting before EA Trading
Your computer must remain powered on and connected to the internet for an EA to function.
From the ‘Start’ menu, click ‘Control Panel’.
In the ‘Control Panel’, select ‘Hardware and Sound’.
Under the ‘Hardware and Sound’ options, click ‘Change When the Computer Sleeps.’
In the ‘Put the Computer to Sleep’ section, select ‘Never’.
Click ‘Save Changes’.
Activate EA trading
- Open the ‘EA Trading’ section in the ‘Navigator’ window.
- Click and hold the Moving Average and drag it onto the chart window.
- Click the ‘Inputs’ tab in the pop-up window.
- Enter any value in the ‘Value’ field.
- Click 'OK'.
- A label will be displayed in the top right corner of the chart.
If the label in the top right corner of the chart shows ":)" it means that EA trading is enabled. If the label in the top right corner of the chart shows ":(" , it means that EA trading is no longer active.
To delete the EA, you need to follow the steps in the next section. To update the EA settings, repeat the steps above.
Stop EA trading
Click ‘EA Trading’ in the toolbar. The button color will change. If the label in the top right corner of the chart shows ":(" , EA trading has been deactivated.
Delete an EA from the chart
Right-click on the chart.
Click ‘Expert Advisors' on the drop-down menu.
Click ‘Remove’.
If no label is displayed in the top right corner of the chart, EA Trading has been deleted.
This article and its contents are intended for educational purposes only and should not be considered trading advice.