MetaTrader 4 Platform MetaEditor Tutorial: Adding Custom Indicators
The MetaEditor language Editor is a programming environment on the MetaTrader 4 that traders can use to add new Custom Indicators, Scripts, Libraries and Include Files which are used in programming. The MT4 platform MetaEditor is commonly used by Traders who use Automated Expert Advisors to place trades. This tutorial we shall look at how to add a custom indicator on the MT4 platform using the MetaEditor, to learn how to add a new Expert Advisor you can navigate to the: Adding a new MT4 Expert Advisor Tutorial.
The MetaTrader 4 online Forex platform MetaEditor environment is shown below.
MT4 Online Forex Trading Platform MetaEditor Environment
On the MetaTrader 4 Forex trading platform, after adding an Indicator a trader will require to compile this newly added item so that it can now be recognized by the MetaTrader 4 Platform and start to appear on the MT4 Forex platform Navigator Window.
Adding a New Custom Indicator
After you have opened the MetaQuotes Language Editor on your Forex trading platform as shown above (Short Cut Key - Press F4), you can then follow the steps below:
Step1: Go To File Menu, Then Select “New”
Adding Custom Indicators on MT4 Platform
Step2: On the Popup window that appears on your screen select “Custom Indicator” and then click next
Adding Custom Indicators on The MT4 Online Forex Trading Platform
Step3: Choose and Enter a Name as Shown Below and then Click Next
Creating Custom Forex Indicator on MetaTrader 4 Platform
Step4: Specify if it is to appear on a separate window or not, Then Click Finish
Creating Custom MT4 Indicator
For an MT4 indicator that is a price overlay - do not check this box, and for an oscillator like the RSI or Stochastic Oscillator - check the above option.
The Following Code will appear on the Forex trade platform MetaEditor Window
Adding Custom Indicator on MT4 Trading Platform
To program a customized MT4 indicator it requires that you are a programmer who knows the C++ Object Oriented Programming Language, which is the programming language that the MQL4 programming language uses in the programming of the MT4 Forex trading software. Or you can find the community of MQL4 Programmers and they can program the it for you.
Do not forget to compile, for the MT4 Forex indicator to be recognized by the MetaTrader 4 FX trading platform; one must compile the program, then close and restart the FX platform, just like restarting your computer - you will restart MT4 platform so that the newly added custom MT4 indicator can start appearing and be listed on the MT4 Navigator Window.
Compile New Custom Indicator on The MT4 Online Forex Trading Platform
If there are no Errors, it will be compiled successfully without any error as shown above.
Step5: Restart MetaTrader 4 Forex online platform and it should now be listed on the MT4 Navigation Menu as shown below and you can start trading with the newly added indicator.
New MT4 Indicator Added To The Forex Trading Platform
How To Add a Downloaded Custom Indicator
If you download an indicator from a source on the internet for example on www.tradeforextrading.com, and it is now on your computer - to add it to the Forex trading platform, follow the steps below:
Step1: On the File Menu of the MetaEditor, Select “Open”
Open a Downloaded Forex Indicator Using MetaEditor
Step2: Locate the Download Folder from the Popup window that appears as shown below.
Step3: Once you open the downloaded custom indicator it will be displayed on the MetaEditor Work Space - you can then follow the above procedure for compiling the downloaded MT4 indicator, once it is compiled without errors, restart your MT4 Forex platform and it will now be added on the Forex platform navigator menu and you can start to trade with it on your MetaTrader 4 FX Platform.