Home Products Custom Indicator Builder for MT5 Custom Indicator Builder Tutorial
 
Custom Indicator Builder Tutorial E-mail

These three short tutorials explain how you can create Custom Indicators for MetaTrader 5 without writing a single line of code. This is only possible with the Custom Indicator Builder for MT5. Try it for FREE.


1. High - Low Indicator

This custom indicator plots two lines, high and low. Note that each line has its own type and width. Also, each line correspond to a signal that can be used when creating Expert Advisors with the EA Visual Wizard for MT5. You will find the High Low indicator file for the Custom Indicator Builder at the end of this page. Download it to learn more.

 

To create the High Low indicator follow these steps:

  • Execute the Custom Indicator Builder clicking on the MolanisCIB315 icon.

Custom Indicator Installer

  • Click on the icon START and set the desired location of the indicator.

Start icon

  • You can chose between on top of the chart (In the chart indicator) and below the chart (In a separated window indicator).

Indicator Location

  • Drag a TI icon (Technical Indicators) into the Indicator Diagram.

Technical Indicator

  • Click on the TI icon to create an Indicator. Please note that each TI icon has the calculation for one indicator. If you want an indicator with two different lines (signals), you need to use two TI icons.
  • Use the Indicator Editor to create your Indicator Calculation. In this example we want to get the current High (Click on high to get the equation high[i]).

Indicator Editor

  • Note that the Indicator Editor allows you to set the indicator's color and style. Chose the color Green, the DRAW_LINE style and a width of 1.
  • Add another TI icon and set the calculation to low[i] (Click on the low button). Chose the color Red, DRAW_LINE, Width of 2 and under Line Type select STYLE_DASH
  • You have finished the indicator. Now you need to generate the indicator's code to be used in MetaTrader 5. Go to the Indicator Diagram menu and click on Generate MQL5 Code

    Generate Indicator

  • You will see the following window. Please note that the indicator has two signals (or lines), high and low, represented by high[i] and low[i]. Click on Create Custom Indicator for MetaTrader.

Indicator Code

Note that commercial versions of this product show the MQL5 code. Demo versions do not show the code and only give you access to the compiled indicator (.ex5 file). Later in 2011 we will be releasing a Standard version for this product.

  • The indicator was generated and is ready to be used in MT5.

Generated MQL5 Indicator

  • If you open the MetaTrader 5 terminal you will see the indicator in the Navigator window

Indicator Navigator

  • If you attach the indicator to a chart you will see the indicator description and signals.

MT5 Indicator Signals

  • After you click ok, you will see the High Low indicator in the screen

High Low Indicator


2. Basic Moving Average

This custom indicator plots a simple moving average indicator of the close price. Note that it plots an arrow instead of a line. This example shows how to use one of the advanced calculations features. The custom indicator builder for MT5 has three advanced formula features: Highest, Lowest, and Average; that are used on the indicator calculation. You will find the moving average indicator file for the Custom Indicator Builder at the end of this page. Download it to learn more.

 

  • Open the Custom Indicator Builder for MT5. Add one TI icon to the Indicator Diagram. Click on the TI icon and set the parameters as the graph below:

MA Options

  • The Advanced Formula Average with an Advanced Period of 9 calculates a simple moving average of close[i] with a period of 9
  • After clicking on Generate MQL5 code you will see the following graph that tells you about the signal. Note that it mentions a MT5 variable called AvgPeriod1

MA MT5 Variable

 

  • When you attach the indicator to a chart, under the indicator input, you will find the AvgPeriod1 variable with a value of 9. Use this variable to control the period of the average. This variable can be used during backtesting.

MA MT5 Input Variable

  • The final result:

MA indicator


3. Donchian Channel
The Donchian Channel indicator is used to capture volatility. Its calculation uses the recent high and low price and is displayed as high and low bands creating a channel.
Calculation: Upper line is the Highest high, Lower line is the lowest low over a specific number of previous high and lows. You will find the Donchian Channel indicator file for the Custom Indicator Builder at the end of this page. Download it to learn more.

  • Add two TI icons to the indicator diagram. Set the following calculations:

Highest Option

Lowest Option

  • Generate the MQL5 code and you will have the indicator:

Donchian Ind

  • You can adjust the calculations periods in MT5 under the indicator inputs

Donchian Variables

 


Volume and Tick Volume

MetaTrader 5 has two different volumes. As per MT, Tick volume contains the number of ticks that came for a bar. Real volume contains volume of trade operations made on this bar (i.e. for stock exchange).

How should I use the Min_Bars variable ?

When you use the advanced features you need a minimum number of bars to calculate the indicator. For example, if you want a moving average with a period of 10, you need 10 bars to calculate the indicator. If your advanced period is higher than 80 you need to set Min_Bars to the advanced period.


What is i?

i is used to identify bars. i means current bar. i-1 means previous bar. Thus close[i-1] means the close price of the previous bar. Note that in our MT4 product the way to identify bars is different (i+1 is used to identify the previous bar).

MQL5-bar-index

 

MT5 Indicator Download

The following files are for the Custom Indicator Builder for MT5. If you want to use the indicator in MT5, you need to download the Custom Indicator Builder here, then open the files and generate the MT5 indicators.

 

Download the High Low indicator here

 

Download the Moving Average indicator here

 

Download the Donchian Channel indicator here

 

MT4 tutorials: Our product for MetaTrader 4 is similar to the Custom Indicator Builder for MT5. Just bear in mind that the way to refer to bars is different. In MT4 i+1 is used for the previous bar, in MT5 i-1 is used. You may want to look at our MT4 video tutorial or read the MT4 manual.

 

 

Quick Links