Attaching indicators to indicators outside of the main price chart
You can attach moving averages and other indicators to indicators on other than the main chart. For example, if you want to use a moving average to smooth RSI, do the following:
1) Create a lower window with RSI in the normal manner.
2) Open the navigator window (press Ctrl-N).
3) Click on the "Indicators" heading in the Navigator window, if necessary, to expand it.
4) Move the mouse to the "Moving Average" item, then (holding down the left button), drag it (a rectangle appears under the arrow cursor) into the RSI window.
5) In the ensuing dialog box, got to the "Apply to" drop down, and set this to "First indicator's data". This will cause the MA to be attached to the first indicator in this window, i.e. the RSI.
6) Adjust other parameters as desired, and press Enter.
NOTE:
-- To create an indicator in a separate window, right-click on its name in the Navigator, and select "Attach to a chart".
-- To create an indicator in the same window as another, drag it's name into the relevant window.
Adding custom-defined indicators to MT4
One of the most powerful MT4 features is that it has a comprehensive but friendly programming language that allows custom-defined indicators, scripts and expert advisors to be written. Here's how to import an already written indicator into MT4's charting facility:
1) Go to a web resource that has the source code for the indicator. A good one is
http://www.xeatrade.com/trading/11.html
Note the "# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" index.
So if you want to add (for example) the PPCI indicator to your charts, click on "P" to see all the custom-developed indicators starting with a "P".
Left-click on the PPCI hyperlink. The source code for PPCI appears in the middle of the screen. Left-click inside this window, then press Ctrl-A to select all of the text, then Ctrl-C to copy it.
2) Return to MT4, and press F4 to load the MetaEditor, a tool which allows to create and compile your own indicators, scripts and experts.
3) In MetaEditor, press Ctrl-N to create a new indicator using the Expert Advisor Wizard.
Select the "Custom Indicator" radio button, and click Next.
Type in the name (e.g. PCCI) that you want to use to reference your indicator in MT4, ignore the other fields, and click Next.
On the final dialog window, ignore all fields, and click Finish.
4) Now left-click in the body of the screen, press Ctrl-A to select all the text, and then press Ctrl-V to paste the text you copied back in step 1, completely overwriting the previous text.
5) Then press F5 to save and compile your indicator.
Hopefully, the message "0 error(s), 0 warning(s)" will appear, indicating a "clean compile", i.e. that the programmer wrote the source code correctly, without syntax errors. Press Esc to close the dialog box.
Presto! If you now return to MT4, the new custom indicator should automatically appear both in the Navigator, and also under the menu option "Insert > Indicators > Custom" if you prefer to add it to your chart in this manner.
You can also add scripts and experts in the same way.
In step (1), select the "MQ4 Scripts" or "MQ4 Experts" hyperlink in the left menu.
In step (3), select the appropriate radio button.
Note that these objects are stored in the following folders:
Experts: c:/program files/<mt4 broker name>/experts
Scripts: c:/program files/<mt4 broker name>/experts/scripts
Custom indicators: c:/program files/<mt4 broker name>/experts/indicators
Include (program code, e.g. .MQH) files: c:/program files/<mt4 broker name>/experts/include
Templates: c:/program files/<mt4 broker name>/templates
Data files: c:/program files/<mt4 broker name>/experts/files
NOTE: As an alternative to the above, if you simply copy the .MQ4 file into the relevant folder, and then (exit and) re-start MT4, the expert, script or indicator will automatically be recompiled, and appear in the Navigator.