Metatrader Expert Advisors – User’s Tutorial
Using Metatrader expert advisors is simple, but sometimes people get confused with it and after downloading a file with the expert advisor a user might get stuck with it without knowing what to do next. This a simple tutorial on how to attach an expert advisor to Metatrader 4 char and activate it.
1. Download your MT4 expert advisor or copy it and save it to your Metatrader’s ‘experts’ folder:
2. Double click it with your mouse and it will be opened in MQL editor (this editor comes with MT4). There will be a button ‘Compile’ at the center top of the window. Click it and your expert advisor will be compiled and ready to use. There might be some errors or warnings during the compilation, but in most cases there shouldn’t be any. You can try and fix those errors, but it takes time and some programming skills, usually.
3. Now, all you need to do is add your expert advisor to the preferred chart and activate it. You can also change some input parameters for the advisor in the Inputs tab:
That’s it! Now you can enjoy your expert advisor – its signals or its trading (if it is designed to perform trading). Good luck with them!
Tags: expert advisors, MetaTrader, MetaTrader expert advisors, MT4, tutorial


March 15th, 2008 at 2:44 pm
Thank you so much for the EA installation tutorial. I find it usefull, I can now intall any EA to my MetaTrader Platform.
May God continue to bless you amen.
Please, I downloaded BINARIO EA, and you said it is only good for Manual Trading, my question now is, how can I trade with the Binario EA or any EA manually?
Secondly, do you host EA for clients?
I am waiting for your response to both questions.
Thanks.
Isiaka from Nigeria.
March 15th, 2008 at 3:41 pm
If you don’t allow EA to trade when attaching it, it will not perform any trading, but will signal for a trade.
As for the second question – no, I don’t host EAs for clients yet.
April 4th, 2008 at 10:17 am
Thank you very much. Please, how do we set stop loss, trailing stop and take profit in using an EA like Moving Average and MACD? Thanks
April 4th, 2008 at 12:01 pm
Hassan, if EAs have input paramters that correspond to stop-loss, take-profit or trailing stop-loss then you can set them via these parameters (when you attach EA, or opening EA’s properties when it’s already attached). If it has no such parameters then you’ll need to modify EA’s code – and that’s different for each EA.
April 4th, 2008 at 3:55 pm
Thanks, I attached Moving average to GBP USD H1. It gave me profit of 50 pips.(It executed ‘buy’ when MA cross upward), but when there was a reversal) downward, the long position was not closed to execute a short position. I realised that I would have to close the trade myself.
But on the properties I saw lots, maximum risk, decrease factor, etc, but did not know which one to alter. Does it mean that the MA of metatrader 4 did not come with stops.
April 4th, 2008 at 4:22 pm
Hassan, yes that means that there is no way to add a stop-loss without modifying the code of this EA.
April 7th, 2008 at 1:18 pm
Please, I am a novice trader who is emotionally inclined. I want to know if I should depend on Expert advisor to trade on my behalf rather than consistently making loss from my manual trading. i.e is the probability of my making positive returns from expert advisor higher than manual trading?
Regards
April 7th, 2008 at 2:19 pm
lucky, trading with EA makes your results almost completely independent of yourself. So, if you are constantly losing from manual trading and can’t find a way to improve your skills, I’d recommend using the automated expert advisors.
April 9th, 2008 at 10:20 am
Hello, Mr Andrei,
Why are my Expert advisors not executing trades? Is it because I shut down my computer system before they execute trades, despite that i allowed trading and enabled them.
If experts are more than one can’t trade be executed?
April 9th, 2008 at 12:15 pm
lucky, some expert advisors trade very rarely. Maybe they didn’t met any position entry conditions yet.
May 27th, 2008 at 6:12 pm
Hello. I have noticed the option for expert advisors on my platform, but Im not sure how to activate it?? Also, I was wondering if this is something you have to apply to each time frame and pair? Im confused. Would someone help me please? Thank you so much for your time.
May 27th, 2008 at 6:49 pm
Marie, if your platform is MetaTrader 4, then reread the whole tutorial. It describes in details how to activate expert advisors.
Expert advisor is added to a chart. Each chart has only one currency pair and timeframe associated with it. So if you want to use EA on another pair/timeframe open another chart and add EA to it.
August 10th, 2008 at 10:26 am
hi, i am jatin . i just download ur all EA’s and put them into expert folders. but whenever i double click on it it shows a error of unknown file extension. how can i open EA with MQL to proceed to next step of compiling?
thanx in advance
August 10th, 2008 at 10:56 am
jatin, do you have MT4 properly installed? Your MQL Editor should automatically recognize .mq4 files and open them on double click. Alternatively, you can open Editor manually from MT4 (a yellow rhombus sign under the main menu) and then open your EAs from the Editor.
September 7th, 2008 at 8:36 am
Thank for sharing, this is very helpful for a novice like me!
September 12th, 2008 at 11:59 pm
Hi I am trying to code some indicators for my own use, but cannot find any guidance on the MT4 parameters required or how to access another time frame; can you help?
September 13th, 2008 at 9:12 am
Ray, I can help, but you can also look into some other indicator’s .mq4 files and learn from the examples.
September 15th, 2008 at 11:21 pm
how can i code an EA so that it works in live a/c
September 16th, 2008 at 9:19 am
Peter, any EA can work with live account.
October 4th, 2008 at 10:57 am
Thanks for your effort, I am having a little problem, with the AMAZING EA that I downloaded, this news trading software requires that I input the exact hour of the news trading, I don’t know how to go about it, manually I use to change the forexfactory time to suit my Nigerian local time which is GMT+1, now how do I get the time of the news or do I will my manual method still of time still work, secondly what is one standard lot, 1.0, 0.1 or 0.01, how do I remove the EA from the chart if am done with the trading.
Thanks
Onyeka from Nigeria
October 4th, 2008 at 11:45 am
Onyeka:
1. You need to set the time depending on the news’ time and your MT4 server’s time. E.g. if the news come outs at 15:00 GMT and your server time is GMT+3, you have to set Hour to 18. It doesn’t matter what’s your local time is, only your MetaTrader server’s time matters.
2. One standard lot (1 lot) is 100,000 units of trading volume (you have to use $1,000 margin to trade 1 standard lot with 1:100 leverage). 0.1 standard lot is 10,000 units of trading volume or mini lot – it requires $100 margin on 1:100 leverage. 0.01 is 1,000 units of trading volume or micro lot – it requires $10 margin on 1:100 leverage.
3. To remove an expert advisor from a chart you have three options:
a) Right click on the chart, select Advisors->Remove. It will remove your EA from the chart.
b) Right click on the chart, select Advisors->Properties, General tab and remove the mark from “Allow advisor to trade”. It will disable trading for this EA.
c) Click the Advisors icon button under the main menu. It will turn red and it will disable all advisors in the MetaTrader platform.
October 6th, 2008 at 2:05 am
Thank you very much. Please, how can add this Neural Networks to Moving Average
http://www.arabictrader.com/vb/attachments/forum4/154889d1222450782-svm.zip
October 6th, 2008 at 8:26 am
Louay, You want to add a Neutral Network to the Moving Average? I don’t know how’s that. Sounds really stupid to me.
October 9th, 2008 at 2:52 pm
sir, the Amazing EA refused to perform any action on the trade I attached it to, even after it showed me some figures on the chart like stop loss and take profit, which indicates that the EA is on, my brokers server time is G.M.T+ 2, and the news was to come out at 12.30 G.M.T, so I used the time 14.30, so what could have been wrong
Onyeka from Nigeria
October 9th, 2008 at 3:17 pm
Onyeka, What did it output to Experts and Log tabs of your MT4? This post is not about AmazingEA, so, please, reply via http://www.earnforex.com/contact.php
November 8th, 2008 at 4:44 am
Hello,
I placed my EA (mql4 file) into the experts folder, compiled it and it said 0 errors, but the executable file was not created, so I cannot run it.
The same thing is happening when I try to run the period_converter for the M1 historical data. It says that it cannot open the period_converter.ex4… I checked the folder and that file does not exist, only the period_converter.mql4 exists and when I compile it it does not create the executable. Can you help me?
November 8th, 2008 at 9:31 am
Michel,
If you have more than one MT4 platform installed then it’s possible that you compile the files with the one, but try to run them with another MT4 instance.
November 27th, 2008 at 10:22 am
Dear Expert advisor,
I’ve installed my MA3 dan MA12 into my chart and i’ve also installed ma expert advisor. The system did take position automatically but it can’t close automatically when the price cross my MA3. Can you help me how to add into the program to make my position close when it cross my MA3.
Thanks a lot bro.
November 27th, 2008 at 11:41 am
Zulkifkli,
That depends on what EA are you using.
November 27th, 2008 at 1:33 pm
Dear Andrei,
I’m using MA expert advisors and it’s really open position automatically, but it can’t close position when the price were at the cross between 2 ma’s. How can it be done?
Thanks
November 27th, 2008 at 3:23 pm
Zulkifli,
I didn’t see this EA, but I guess you have to edit its code to make it close the positions when you want.
December 12th, 2008 at 1:10 pm
hi,pls i need to know how to install expert advisors & where can i get a reliable expert advisor.your assistance will be appreciated.am a complete novice about forex.
January 2nd, 2009 at 2:10 pm
Hi,
Where can i get a reliable EA for GBP/USD and USD/CAD
January 6th, 2009 at 7:57 am
Thanks for sharing all of this, your EA are very good 1, better than others,
Recommended for every 1.
Very good..
January 6th, 2009 at 7:59 am
I can say, that’s your EA are perfect.
February 19th, 2009 at 10:40 pm
i want to set ea on my setting where can i learn how to set ea setting to my parameter. which books or website do you recommend.qqq thanks
April 2nd, 2009 at 11:30 pm
Please advise – how do you load the saved EA file into the MT4 platform?
April 2nd, 2009 at 11:59 pm
Isn’t the blog post you are commenting explaining that?
May 13th, 2009 at 11:06 am
Hi Andrei,
I’ve just started to test the following two EAs.
Have you any answers for the following questions.
1) I’m testing Framework on GBPJPY on the 15 minute chart.
Do you need to copy the indicators onto the chart to ensure
the EA performs correctly. for example, does the CCI need
to be on the chart, and are there any indicators which need
to be on the Phoenix chart I am testing on GBPUSD.
2) Does the EA place trades based on the timeframe you are
using. For example I have framework running on the 15 minute
and when I switch the chart over to the 1 minute, it executes
multiple trades repeatedly, although now that I am running it on
the 15 minute it has executed 3 trades. Is this correct.
Thanks
Jeff
Phoenix and Framwork
May 13th, 2009 at 1:09 pm
1) No, you don’t have to add any indicators to the chart for the EAs to work properly they use all needed indicators internally.
2) Yes, most EAs trade based on the timeframe to which they are attached.
May 19th, 2009 at 4:35 pm
Hi Andrei,
I see very good results from GBPUSD, however the others such as USDJPY, USDCHF and EURJPY don’t seem to have the same precison. I have found some settings on the web which I have changed for those pairs. I will let you know the results. I’ve found GBPUSD to be very precise on the 15 minute chart.
Thanks
Jeff
May 19th, 2009 at 4:49 pm
FrameWork,
Hi Andrei, I’m testing Framework on GBPJPY at the moment. It executes the trades very well and always has a good run or closes the positions quickly if the signals change. Where I see it can cause a problem though is with the code itv++ where it adds to the position during a trend. I had it running last night and today. It had an excellent entry, but added 20 lots to the position from the bottom of the trend before the move. Then at the top of the move it added another 20 positions which were all closed automatically when the market and CCI indicators turned. Do you know of any method by which you can change the settings to ensure that the position isn’t added to as the market trends and a selection of how many positions can be opened on the initial signals. I would like to try and stop it from opening positions when the trade has already initiated, and also stop it from opening positions 200 points into a move.
Thanks
Jeff
May 19th, 2009 at 7:38 pm
You can increase the Interval input parameter to reduce the frequency of pyramiding the lots. Other things would require a dramatic code change.
June 17th, 2009 at 5:20 pm
Hello there,
Can I get an expert advisor that will always alert me whenever RSI crosses its 50/50 line up or down?
And I pray it works with all periods and all time frames.
June 17th, 2009 at 5:29 pm
You can create a thread asking for this favor at the forum:
http://www.earnforex.com/forum/f12/
June 25th, 2009 at 6:40 pm
Hi, Andrei, I am using Framework EA, I just want the EA to make a trade max of not more than 3 trades, how can I change the setting? because the EA keep enter the trade and seem to be no ending…. Is this EA is Hedging? Thanks a lot
June 25th, 2009 at 11:01 pm
Pyan, please, discuss Framework EA at this forum:
http://www.earnforex.com/forum/f13/framework-17/