How to Load Expert Advisors in Metatrader

How to Load Expert Advisors in Metatrader

How to Load Expert Advisors in Metatrader Follow these 11 steps to fastly load Expert Advisors in MetaTrader.

Summary:

1. Copy the expert advisors files

2. Open Metatrader

3. Enable 'Automatic Trading'

4. Open MetaEditor => Open 'Experts' folder => paste here the Experts Advisor => Reset MT4 to compile it automatically or open them in metaeditor and click 'compile open files'.

5. Add the Symbols you will trade from 'MT4 Symbol List' in 'Market Watch'. Now you will see the expert in 'Navigator' and you can drop them to their relative chart. Open 'Navigator' from menu-> go to 'Expert' folder -> and double click on the expert or drop the expert advisor to the chart.

6. (BacktestMarket EA - fastly process) Add to 'MQL4\Files' the folders 'drawdown' and 'Templates'. Check if the 'Common Options' that allow trading and other EA functions are correctly setted. Then run on EURUSD chart 'Open All Chart and Templates' and wait few minutes. The expert will configure all, then close this EURUSD chart.

7. Check if the 'Common Options' that allow trading and additional EA's features are correctly setted.

8. Configure the expert advisors input parameters. BacktestMarket EA: set the contracts rollover (see step 11) just the first time if you are not trading with Activtrades broker. The others input field: -'backtest_mode' is set by default to false to allow live trading and performance monitoring. (To backtest the experts set backtest_mode=true, to trade live set backtest_mode=0). -'risk per operation' is max 1.5% of equity. Some expert like Gold Accumulators has 0.5%.

9. How to know if the EA is working: the smiling face of EA in the top right means that trading is activated.

10. During trading activity check that everything is working in Metatrader Terminal => ‘Experts’, especially if you're not going to use a virtual private server.

11. Additional function: the automatic rolloverof the contract if you're not trading continuous futures contracts.

How To Load EAs in MT4, details:

1. Copy the Expert Advisors files

2. Open Metatrader

3. Enable Automatic Trading:

The enabled icon is the green one. If you don't see the icon in your MT4 menu, add it by right clicking on menu => select ‘AutoTrading' and click 'Insert'.

3-enabled-trading 

4. Open MetaEditor to open Expert folder

Open Metaeditor (it's the yellow icon similar to a block notes).

4-open-metaeditor

Then open the Navigator of Metaeditor --> right clic on 'Expert' folder --> 'Open Folder' => and paste inside the Experts. Then I suggest you to create a shortcut of Mt4 'Expert' folder on your desktop to open it fastly the next time.

Metatrader folders

Opened Experts's folder in Metaeditor

6-1-bot-in-folder

Reset MT4 (quickly) now close and re-openMetatrader to compile all Expert Advisors automatically otherwise they would not appear in Metatrader's Navigator. Or open them on Metaeditor and 'compile all open files'.   Now if you have our experts, activate the drawdown and performance recording system. Open 'Files' folder (it is the folder below 'Expert') and paste here the folder containing the .txt files where the experts will register each operation from a starting capital.

DrawDown Then when each one will open the next trade he will check if his performance is above the drawdown setted in input parameters. If it is over he will trade just virtually, not with real or demo money. When and only if he will come back under its max_drawdown he will start trading again using account's money. Paste here even the 'Templates' folder.

5. Add the symbols you're going to trade from 'MT4 Symbol List' to 'Market Watch'

In Symbol list's window, search the symbols in your broker's folders --> double clic above the symbol you want to add. 'Symbols' icon:

7-symbols

Add a symbol to 'Market Watch'

7-symbols-marketwatch 

6. Open Symbol's charts where you want run the expert

From 'Navigator' find in 'Experts' folder the .ex4 files => double click or drop the expert to charts. Open a chart from Market Watch:

8-gold-open-chart

Drop it to the chart:

Drag Expert Advisors in chart

7. Check EA 'Common Options' parameters

Select these settings to allow automatic trading and eventual features of experts: => 'Long & Short' positions, => Check 'Allow Live Trading', => 'Enable Alerts, => 'Allow DLL imports' and => 'Allow import of external experts'.   Expert advisor - common parameters

common settings 

8. Set the input parameter

a) in our experts if you are going to backtest the strategy, set the value of backtest_mode = 1 . To backtest High Potential Days expert advisors, import the data in GMT+1 timezone, so set shift -7 shift when you're importing GMT-6 data (US futures, forex, commodities, not european indices that are GMT+1). In live trading HPD experts will open the trades at right hour of the day automatically.   b) if you are going to trade live --> set backtest_mode = 0. In this mode the experts will record performances so it is necessary to import the 'drawdown' folder, otherwise the expert will return 'zero divide' error. In both of the mode it's possible to increase or decrease the risk for each operation (percentual of loss in account equity if the stop loss would be hit) by modifying ‘risk’ parameter. If you modify the 'risk', modify also and proportionally ‘max drawdown’ parameter.   Example of expert advisor input parameters:

11-ea-inputs 

9. The smiling face means that the expert advisor is active

12-click-ok-and-smiling-face-expert-advisor 

10. Check your trading workstation

During trading activity check that everything is working fine in Metatrader ‘Experts’ section especially if you're not going to use a virtual private server. There could be a problems due to internet connection, PC updates etc.   Just check once a day from 'Terminal' menu --> 'Experts' that everything is fine: the experts are running, that your computer (or better, vps) is on, that the internet connection is ok etc. An error is a red circle icon, the yellow triangle is a notification (not a problem).   Terminal-->Experts

13-check-experts-in-metatrader-terminal

11. Final automations: automatic rollover function of cfd/futures contracts

We implemented the automatic rollover function and it is very convenient if you trade in a broker that has not continuous cfd. It would be very boring to update manually the new contracts when they expire. The robots will do automatically the rollover when a new contract will be quoted. If you don't want to use this function leave the default inputs, the function will not cause errors even if it is not setted well.   For example Dax futures contract expire around the 20th day of March, June, September and December. Few days ago, for example on 15th day of these months, the expert reload automatically the chart with the new contract. And so on year over year.

Expert Advisor inputs

Each CFD of a instrument, quoted in different broker, has always the same expiration months because every of these CFD are underlying of the same futures contract (example: Dax30Mar16, Ger30Mar16, DaxH16, GDaxH6 etc).   The problem is that every broker call its CFD almost always with a different name from another brokers. So in input parameter insert in the 'cfd' string field, the name your broker give to its CFD (Dax, Ger30, Dax, GDax). The default name of our experts are the ActivTrades’s CFD names.

Example: CFD= "Dax30"; Month= "Mar"; Year_digits= 2;  (if year is 2017) Dax30Mar17

These are the month letters of the futures contracts, that will help you to write the right rules: Jan: F     Feb: G     Mar: H     Apr: J     May: K     Jun: M     Jul: N     Aug: Q     Sep: U     Oct: V     Nov: X      Dec: Z

To create the name of the Symbol the function use this string concatenation: "CFD"+"Month"+"Year_digits"    



Related Products