Forex Blog

First-hand Forex trading experience and information about foreign exchange market that will be useful to traders

Archives

MetaTrader Indicators — User’s Tutorial

January 7, 2008 (Last updated on May 9, 2016) by Andriy Moraru

Update 2016-05-09: The tutorial has been completely revamped to reflect the most current and easiest way to install new indicators in MetaTrader — both MT4 and MT5.

This tutorial covers indicator installation for MetaTrader 4 and 5. Since MT4 Build 600, there is no difference in the way it is done in the two versions of the platform.

There are many free MetaTrader indicators available online, but some people still encounter problems in attaching these indicators to a chart or compiling them. This simple tutorial was created for those who want to learn how to install custom MetaTrader indicators. The process is quite similar to installing a new expert advisor, but there are some differences.

1. Download custom MT4/MT5 indicator and save it anywhere on your PC.

2. Launch your trading platform.

3. Open the platform’s data folder via menu File->Open Data Folder:

Open Data Folder in MetaTrader

Alternatively, you can navigate to the folder using Windows Explorer:

C:\Users\<Windows_User_Name>\AppData\Roaming\MetaQuotes\Terminal\<Instance_ID>\

4. Open MQL4 folder (or MQL5 if you are installing an MT5 indicator):

Opening MQL4/MQL5 Folder

5. Open Indicators folder:

Open Indicators Folder

6. Paste your indicator file here:

Copy/Paste the Indicator File

7. If it is an already compiled file (.ex4 or .ex5), then fine. All you need to do is return to your MetaTrader, right-click on Indicators in Navigator subwindow, and click Refresh. The new indicator will appear in the same Navigator subwindow:

Refresh the List of Indicators

8. If it is not a compiled file but a source file (.mq4 or .mq5), then you need to double-click its icon — it will open in MQL Editor (it is included in MetaTrader package). Now, either press F7 or click Compile button:

Compile the Indicator

Normally, there should not be any errors during compilation. However, if some errors appear in the Toolbox subwindow, you can either try fixing them or contact the indicator’s developer to help with the issue. Usually, it takes some MQL knowledge and coding skills to fix such errors. No errors output looks like this:

No Compilation Errors

Compilation errors look like this:

Compilation Errors

9. After you compile or copy an executable MetaTrader file (.ex4 or .ex5), you can start using the indicator in your platform. All you have to do is attach it to the chart:

Insert Custom Indicator

If you know what you are doing, you might also want to change some of the indicator’s input parameters:

Input Parameters

OK. Now you can enjoy your new MetaTrader indicator and hopefully — better Forex trading results.

If you have any questions about installing custom indicators in MetaTrader, please free to ask using the commentary form below.

104 Responses to “MetaTrader Indicators — User’s Tutorial”

  1. bob dawes

    when i follow these instructions to compile i always get a pop up that says compiler could not be opened. tried with several files and they all do the same thing. Please advise thanks

    Reply

  2. Andrei

    Bob.

    What a strange error. Maybe your MT4 wasn’t installed properly. Try re-installing it or download it from a different broker.

    Reply

  3. tony

    pls how long does the compilation process take

    Reply

    Andrei Reply:

    Almost instantly.

    Reply

    Carl Reply:

    ok.. thanks

    Reply

  4. Andy

    is it possible to have a begginer indicator with an alert? your help will be appreciated guys

    Reply

    Andrei Reply:

    Please, ask all Beginner related questions in its dedicated forum:
    http://www.earnforex.com/forum/f12/beginner-5/

    Reply

  5. Codex

    You’re confusing people by giving them too much information by telling them they have to install mq4 files and then open the editor and compile them. The platform will do this automatically when the mq4 file is used for the first time.

    Reply

    Andrei Reply:

    Yeah, but if there are compilation errors in the code they won’t even know it.

    Reply

  6. frank

    Compiled a mq4 with no error, but where’s the ex4? don’t see it showing on my custom indicator column?

    Reply

    Andrei Reply:

    Did you put it in experts/indicators folder? Did you restart MT4 after compiling it?

    Reply

  7. heisamit

    Thank you for the indicators and the valuable information that you have provided on your website. I tried installation of the fisher indicator you have provided on your website for the MT5 platform, however was not able to get it to work, infact I wasnt able to see it in my Navigator column. Could you please let me know how once installs it on the MT5 platform. Thanks in advance.
    PS: I saved the MT5 fisher indicator to the C:\Program files\Metatrader5\MQL5\Indicators\Examples
    Am I doing it right or do I need to save it in some other folder

    Reply

    Andrei Reply:

    For MT5 you have to save Fisher indicator (.mq5 file) into C:\Program files\Metatrader5\MQL5\Indicators\Fisher\
    Then restart MT5.

    Reply

  8. heisamit

    Thanks Andrei, got it. Have a great day

    Reply

  9. Shoofeer

    Hi Andrei, I have tried to download the resistance and support indicators.however when ever I unzip the files, I cant open them. it looks like when you have a word document but microsoft office is not installed in your PC. Kindly help me out as I need this very urgently.Many thanks in advance

    Reply

    Andrei Reply:

    You don’t need to open any files. Just unzip them into experts\indicators\ folder of your MetaTrader 4 terminal folder and restart MetaTrader. But, judging from your description (the type of files isn’t recognized), you don’t have MT4 installed. And you won’t be able to use any of MT4 indicators without installing MT4 platform.

    Reply

  10. Bobo

    It work for me really well,thanks man!

    Reply

    Andrei Reply:

    I am glad that it’s useful.

    Reply

  11. Joe

    I followed the instruction and I can see the price alert ea in the navigator box but I cant drag it into the chart to set price alerts, can some one please help me? Not sure If I’m doing it right. Thank you!

    Reply

    Andrei Reply:

    Actually you shouldn’t be seeing an EA, because it’s an indicator. Are you sure that you’ve copied it to “experts/indicators” folder of your MT4?

    Reply

  12. adeyemi

    pls i can not be able to install this fisher indicator pls, i need easy procedure that it can thought me easily frm begining their insallation.pls i need the indicator urgently.

    Reply

    Andrei Reply:

    What step you can’t understand?

    Reply

  13. adeyemi

    pls from the starting of d installation

    Reply

    Andrei Reply:

    Just follow the tutorial.

    Reply

  14. Ebere

    i tried to install the metatrader 4 trading assistant indicator, but instead of getting the parameters showing buy and sell notification, i got drawn line signals. so i don’t know what could be wrong, please help me resolve this. thanks

    Reply

  15. Drew

    Hey Andrei
    A quick question regarding Amazing EA
    Does my computer need to be switched on for it to operate?
    If I want it to trade with comp switched of do I need to set my entries before I shut down?
    Thanks
    Drew

    Reply

    admin Reply:

    It won’t work if you turn off your computer. You should use VPS hosting to host your MetaTrader platform with an expert advisor if you want it to work with your own computer switched off.

    Reply

  16. Ajagbe-Balogun Kamoru Abefe

    How can i attach alert to beginner?
    Seceondly, I find that beginner triger after the seconld bar , is that how it works?

    Reply

    admin Reply:

    There’s a separate thread in the forum about Beginner indicator: http://www.earnforex.com/forum/f12/beginner-5/

    Reply

  17. singh

    I wnat to know about your indicators alsor for MACD BB BALL. Please call me any time at 818-792-8031
    Thanks.
    Sincerely,

    Satnam Singh

    Reply

  18. victor

    I tried downloading arroow magic indicator mt4

    Reply

  19. Mold forex

    Very good manual, will try find in russian lang

    Reply

  20. victoria

    gracias, me funciono…

    Reply

    admin Reply:

    De nada.

    Reply

  21. Jay

    I did what you instructed. It compiled with no error, but still it does not attach. what should i do next ?

    Reply

    admin Reply:

    What do you mean “does not attach”? What happens when you try attaching it?

    Reply

  22. Martin

    I copied the file to the indicators folder. When I press compile it just says compiling but nothing happens. It doesn’t create the ex4 file.

    Reply

    admin Reply:

    Are you sure that you are compiling the file you’ve copied to indicators folder and not the one that is in some other folder?

    Reply

  23. Martin

    When I tried to change the file in other folder it created the .ex4 file. In indicators folder it does not even change the date of the modification when I modify the source file. I copied the .ex4 file from other folder to the indicators folder and this solved the problem.

    Reply

  24. Leanne

    It worked instantly! Thanks!

    Reply

    admin Reply:

    You are welcome!

    Reply

  25. Jackie

    This is the first time I have ever used MQL editor and within a few minutes I was using the indicator on my charts. Thanks so much.

    Reply

    admin Reply:

    You are welcome! I hope it wasn’t the last time too :-).

    Reply

  26. murali

    same here….Thank you so much…. we can only try….cant we??

    Reply

  27. wiseman

    How must I install dotted indicators in iPad? I already installed MetaTrader4 Platform now I only need to install dotted indicators(red & blue) How must I perform this as I tried and I downloaded a zip folder but it ddnt work.

    Reply

    admin Reply:

    Custom indicators do not work on iPad version of MetaTrader 4.

    Reply

  28. Peter Oldfield

    I have just installed the latest version of the Lot Size Calculator & NO pairs show the “ASK PRICE” – is that correct?
    Cheers Peter

    Reply

    admin Reply:

    What is Lot Size Calculator?

    Reply

  29. Jay Dee

    Yeah, it works fine. accurate indeed! but, I just have a problem. If I wanted deleting the indicator from a chart, its not highlighting.

    Reply

    admin Reply:

    How do you do that? You can always press Ctrl+i and delete indicator from the list.

    Reply

  30. Elder solano

    Hola un cordial saludo. Quiero utilizar el MArket Profile pero no me funciona. He instaldo otros y funciona perfecto. Ya hice lo que dice el manual en ingles y me sale una Alerta luego de compilaren la línea 19 que es esta:
    extern datetime StartFromDate = D”;
    Alguna ayuda por favor?

    Reply

    admin Reply:

    ¿Con qué periodicidad utiliza el Market Profile? Trabaja sólo con M5, M15 y M30.

    Reply

  31. Pam

    Is there a way to introduce the Position Size Calculator on every chart and is it possible to store the calculator on the tool bar?

    Reply

    admin Reply:

    Do you mean “with one click”? As far as I know, no. The best you can do is to save a chart template with this indicator on and apply it to different charts.

    Reply

  32. gintakgabui

    how do I save it if I am using window8. I can’t find the program files in win8.any suggestion?

    Reply

  33. Raj

    I’m having problems in correctly downloading indicators. When I download an indicator it downloads straight into the “download section”, how do I move this indicator to the local disk c drive/programme section…
    When I right click on an indicator to “save” in does not give me the option to save into the c drive local disk section.

    Your assistance will be appreciated.
    Thanks

    Reply

    Andriy Moraru Reply:

    Try right-clicking the download link and choosing “Save Link As” then browsing to your /experts/indicators/ folder.

    Reply

  34. Raj

    Hi Andriy,
    I tried your suggestion and the indicator still downloads into the “download section”…
    thanks.

    Reply

    Andriy Moraru Reply:

    Then open your Downloads folder and copy the indicator to your MetaTrader’s indicators folder.

    Reply

  35. Raj

    This does not work unfortunately. When I copy and paste, the MT4 indicators folder does not accept it, unless I’m doing something wrong…
    Thanks for all you help, will continue to try…

    Reply

    Andriy Moraru Reply:

    What do you mean by “does not accept it”?

    Reply

  36. Raj

    It does not paste the indicator into the mt4 indicator section, unless I am doing it wrong…

    Reply

    Andriy Moraru Reply:

    So, what happens when you try to paste it?
    1. There is no “Paste” option on the right-click menu?
    2. You click “Paste”, but the file does not appear there?
    3. The file appears in the folder, but is not present in MT4?

    Reply

  37. Raj

    I think the easiest way around this for me, is if you to show me how to cut and past an indicator in the mt4 platform, step by step. I haven’t done this before and I seem to be lost.
    Your kind assistance and time is greatly appreciated.

    Reply

    Andriy Moraru Reply:

    Doesn’t this tutorial (above) show just that?

    Reply

  38. Raj

    The instructions show where and how to find the downloaded indicator in the Local Disk C then go to Programme Files then Broker etc. etc. until you install the indicator onto your mt4 platform.
    My problem is that when I download the Indicator I cannot save it into my Local Disk C but instead goes straight into the download section and this seems to be my problem.
    My indicator download goes right in the download section and I cannot find a way to move it from there into the Local Disk or the indicator section of the mt4.
    I have tried all your suggestion above and it does not work for me.
    Maybe I am doing something wrong when downloading the indicator.

    Reply

    Andriy Moraru Reply:

    Do you know where your Downloads folder is? Can you open it and find the indicator there? What browser/plugin are you using to download the indicator?

    Reply

  39. Raj

    Yes, I can see it in my download section.
    I am using the internet explorer browser.

    Reply

    Andriy Moraru Reply:

    IE (version 11 at least) offers an opportunity to “Save As” by clicking the down-arrow next to “Save” in download dialog. Please see screenshot:
    http://www.earnforex.com/blog/images/downladoing-indicator-in-ie.jpg

    Reply

  40. Raj

    Yipppeeee at last I got it.

    I can’t thank you enough for your time and patience in assisting me with this indicator download.
    Thank You and take care.

    Reply

  41. Damian

    Hi Andriy
    I’ve saved the MQL4 source file to experts/indicators, clicked on the file which opened MetaEditor and clicked Compile and received this error message…

    C:\ICMarkets MetaTrader 4\experts\indicators\MarketProfile.mq4;19:34;” – date literal string is incomplete

    MT4 was closed when i did the compilation.

    The line of code that it was pointing to as erroring was:

    #property indicator_chart_window
    extern datetime StartFromDate = D”

    Any thoughts on how to get this to compile correctly?
    Thanks
    Damian

    Reply

    Andriy Moraru Reply:

    Is it an error or just a warning?

    Reply

    Damian Reply:

    It’s a warning only.

    An .exe file is initially created in experts/indicators folder after the compilation but when MT4 is opened, the .exe file disappears (is deleted?) and a .txt file replaces it in the folder containing the same warning message.

    Thanks
    Damian

    Reply

    Andriy Moraru Reply:

    Do you see MarketProfile under Custom Indicators inside MT4? Warning message is OK. It should not cause any problems.

    Reply

    Damian Reply:

    Hi Andrij
    I’ve checked the Custom Indicator list in MT4 and Market Profile is not listed?
    Thanks
    Damian

    Reply

    Andriy Moraru Reply:

    Now that’s strange, because that warning is normal and shouldn’t prevent compilation. Try copying it to MT4 installation of some other broker.

    Reply

    Damian Reply:

    Strange is a good word!
    I’ve loaded Market Profile onto another broker MT4 platform with no problems. Went back to my current broker MT4, cleared the original files, followed the same process to re-load the file in experts/indicators, compiled with the same warning message, and now it’s working fine.
    Thanks again Andriy for your support and patience.
    Btw, which country are you based in?
    Cheers
    Damian

    Andriy Moraru Reply:

    I am glad that you have solved this problem.
    I am based in Ukraine.

  42. Damian

    Hi Andrij
    Kiev, L’viv, Odessa??? Ukraine is blessed with many treasures (which are mostly kept secret from foreign travelers). But that’s another discussion!
    Дякую
    Damian

    Reply

  43. chrismemo

    great, your post is my saviour after struggling to install indicators.

    Thanks,
    Chris

    Reply

  44. thinkfast

    Hi!

    I receive a mq4 file and tpl file. I put mq in to indicators, and tpl to template folder MT4). Now when i want to drag indicator to the chart, nothing happens. Any ideas what is wrong. Do I need ex4 file? When i compile, I receive 12 errors. :(

    Thanks
    S

    Reply

    Andriy Moraru Reply:

    Yes, you need to compile mq4 to ex4, but considering that you have that indicator in the list (you said you drag it to the chart), it is already compiled. Perhaps, the indicator is visible only with its template. Try loading template instead of adding the indicator: Right click on the chart->Template->Load Template.

    Reply

  45. rabzy

    Thanks so much, i was able to compile it and it reflected on my chart. but how do i use it to calculate my lot size before i even place the trade. that is what i need it for.

    thanks.

    Reply

    Andriy Moraru Reply:

    It would help to know what you are talking about.

    Reply

  46. benjamin

    can you put a decimal point in

    Reply

    Andriy Moraru Reply:

    What do you mean?

    Reply

  47. LaNard

    Hi,

    The indicator is install and on the chart but I don’t see any lines… and solutions for this.

    Thank yoiu

    Reply

    Andriy Moraru Reply:

    Which indicator do you mean?

    Reply

  48. obed

    Nice trend I gues it helps slove my problems..I downloaded 2 indicators 1 of them was an mq file nd I moved it to my mt4 indicators..nd d 2nd was an Ex file did d same it showed up bt wen I tried to attach to chat it dint show up..how u sugest I convert to mq file ? Tnx admin..

    Reply

    Andriy Moraru Reply:

    There is no need to convert ex4 file to mq4 (besides, it is not possible). mq4 files are compiled into ex4 and then can be attached to the chart. If you already have an ex4 file and nothing happens when you attach it to the chart, then I suggest checking the Experts tab of the Terminal subwindow for any output about errors.

    Reply

  49. Myron

    When I try to compile, I get an “EX4 write error”. Any suggestions on how to change that?

    Reply

    Andriy Moraru Reply:

    Please make sure that your MQL4 folder is writable for SYSTEM user.

    Reply

  50. Mitchell

    When I click on the indicator and it pulls up a window it won’t let me click okay or cancel or anything. I can only click the red x

    Reply

    Andriy Moraru Reply:

    At what point does that happen? Could you please show a screenshot?

    Reply

  51. Mitchell

    I dont know how to upload a screenshot but any indicator undere the customs tab, you click, then it pulls up the window with all the options and then it wont let me click ok, cancel, or reset. only the red x will work

    Reply

    Andriy Moraru Reply:

    That’s really strange. Try reinstalling MetaTrader.

    Reply

  52. Mathew

    I have read so many forums on this and watched you tube videos on how to set up the MT4 Indicators. I have followed every instruction word for word. But when i reopen my MT4 it doesnt show the indicators that i have added that should be in the Navigator of MT4 when its running. I click on the “Open Data Folder” click on “MQL4” then on “Indicators” and my Indicators are inside it but unzipped. Each Indicator shows a logo/ icon of a zip and a creamy back page. Does anyone know what i have to do to get these indicators to work ? I thought by following the same instruction on every MT4 self help site that the files automatically unzipped when copied and dragged into the indicators. Any suggestions would be greatly appreciated.

    Reply

    Andriy Moraru Reply:

    Try opening the .mq4 file and compiling it in the MQL Editor. Does it give any errors?

    Reply

  53. okpro obaro

    Do you have office or agent in Nigeria?

    Reply

    Andriy Moraru Reply:

    No, I do not have an office in Nigeria (or any other country if we are at it). Would you want to come to an office to talk about installing MetaTrader indicators?

    Reply

  54. Victor

    What I do with the .mqh file that comes with the indicator PositionSizeCalculator_Main?

    Reply

    Andriy Moraru Reply:

    Same thing you do with the .mq4 file – copy it to MQL4/Indicators/ folder.

    Reply

  55. golden boy

    When I compile the marketprofile indicator I get a warning “date literal string is incomplete” line 36 column 34.

    input datetime StartFromDate = D”; // StartFromDate – lower priority

    Not sure why but it will not give me the ex4 file.
    Then if I click resume debugging, it the indicator popup comes up in a completely different MT4 platform. I can’t get it to come up on the terminal I am using???

    Reply

    Andriy Moraru Reply:

    That warning is OK, you should be getting it.
    To get .ex4 file, make sure you click Compile (F7), not Start/Resume debugging (F5).

    Reply

Leave a Reply

required
required (will not be published)
optional