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:

Saving MetaTrader 4 Expert Advisor

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.

Compiling MetaTrader 4 Expert Advisor

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:

Adding MetaTrader 4 Expert Advisor

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: , , , ,

AddThis Social Bookmark Button

Similar Posts:

52 Responses to “Metatrader Expert Advisors — User’s Tutorial”

  1. Isiaka Says:

    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.

    [Reply]

  2. Andrei Says:

    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.

    [Reply]

  3. Hassan Says:

    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

    [Reply]

  4. Andrei Says:

    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.

    [Reply]

  5. Hassan Says:

    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.

    [Reply]

  6. Andrei Says:

    Hassan, yes that means that there is no way to add a stop-loss without modifying the code of this EA.

    [Reply]

  7. lucky Says:

    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

    [Reply]

  8. Andrei Says:

    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.

    [Reply]

  9. lucky Says:

    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?

    [Reply]

  10. Andrei Says:

    lucky, some expert advisors trade very rarely. Maybe they didn’t met any position entry conditions yet.

    [Reply]

  11. Marie Says:

    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.

    [Reply]

  12. Andrei Says:

    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.

    [Reply]

  13. jatin Says:

    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

    [Reply]

  14. Andrei Says:

    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.

    [Reply]

  15. Kevin Tan Says:

    Thank for sharing, this is very helpful for a novice like me!

    [Reply]

  16. ray Says:

    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?

    [Reply]

  17. Andrei Says:

    Ray, I can help, but you can also look into some other indicator’s .mq4 files and learn from the examples.

    [Reply]

  18. peter Says:

    how can i code an EA so that it works in live a/c

    [Reply]

  19. Andrei Says:

    Peter, any EA can work with live account.

    [Reply]

  20. onyeka Says:

    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

    [Reply]

  21. Andrei Says:

    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.

    [Reply]

  22. Louay Says:

    Thank you very much. Please, how can add this Neural Networks to Moving Average

    http://www.arabictrader.com/vb/attachments/forum4/154889d1222450782-svm.zip

    [Reply]

  23. Andrei Says:

    Louay, You want to add a Neutral Network to the Moving Average? I don’t know how’s that. Sounds really stupid to me.

    [Reply]

  24. onyeka Says:

    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

    [Reply]

  25. Andrei Says:

    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

    [Reply]

  26. Michel Says:

    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?

    [Reply]

  27. Andrei Says:

    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.

    [Reply]

  28. zulkifli mohd noor Says:

    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.

    [Reply]

  29. Andrei Says:

    Zulkifkli,

    That depends on what EA are you using.

    [Reply]

  30. zulkifli mohd noor Says:

    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

    [Reply]

  31. Andrei Says:

    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.

    [Reply]

  32. rotimi Says:

    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.

    [Reply]

  33. Bimbson Says:

    Hi,
    Where can i get a reliable EA for GBP/USD and USD/CAD

    [Reply]

  34. Ska77 Says:

    Thanks for sharing all of this, your EA are very good 1, better than others,
    Recommended for every 1.

    Very good..

    [Reply]

  35. Ska77 Says:

    I can say, that’s your EA are perfect.

    [Reply]

  36. han Says:

    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

    [Reply]

  37. GMann Says:

    Please advise – how do you load the saved EA file into the MT4 platform?

    [Reply]

    Andrei Reply:

    Isn’t the blog post you are commenting explaining that?

    [Reply]

  38. Jeff Moore Says:

    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

    [Reply]

    Andrei Reply:

    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.

    [Reply]

  39. Jeff Moore Says:

    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

    [Reply]

  40. Jeff Moore Says:

    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

    [Reply]

    Andrei Reply:

    You can increase the Interval input parameter to reduce the frequency of pyramiding the lots. Other things would require a dramatic code change.

    [Reply]

  41. Adez Says:

    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.

    [Reply]

    Andrei Reply:

    You can create a thread asking for this favor at the forum:
    http://www.earnforex.com/forum/f12/

    [Reply]

  42. pyan Says:

    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

    [Reply]

  43. Andrei Says:

    Pyan, please, discuss Framework EA at this forum:
    http://www.earnforex.com/forum/f13/framework-17/

    [Reply]

  44. Ron Zhao Says:

    Hi, Andrei,
    I tested Framework. It produced profits quite well. However, when the profits reached the peak, I got a lot of “close at stop”, which closed out all open positions at huge losses. Why was that happening? I noticed that some open position should have been closed out by “TP”, but it didn’t happen. Please help!

    [Reply]

  45. Andrei Says:

    Ron, please ask all Framework related questions in its separate forum thread here:
    http://www.earnforex.com/forum/f13/framework-17/

    [Reply]

  46. danilo Says:

    chiedo scusa, ma questi EA scaricabili, aprono e chiudo le posizioni da soli? o bisogna farlo manualmente??grazie..!

    [Reply]

  47. Sridhar Says:

    HI All,
    Can some one help me in getting the EA

    [Reply]

    Andrei Reply:

    Sridhar, and what’s the problem?

    [Reply]

Leave a Reply



Forex-Metal

Know where oil is heading? Trade oil via Forex brokers. Don't show me this offer ×