An indicator template is a file designed for writing a source code. After it has been created, it is automatically placed in MQL5/Indicators (or MQL4/Indicators) directory. During the creation a user can select event handlers that will be added to the template.
After choosing the corresponding position in the MQL4/MQL5 Wizard and pressing the "Next" button the following window appears:
The following fields should be filled out in this window:
Variables of the "input" class refer to external parameters. In order to create a parameter one should press the "Add" button. There are three fields that should be filled out at the appeared entry:
At this step you can select additional event handlers that will be inserted into the indicator template. All the necessary parameters will also be specified for the selected handlers; it's helpful for programmers.
To select one or more event handlers put a checkmark against them. Here you can also chose a type of the OnCalculate() handler, which will be added to the template. If you hold the mouse cursor over a handler name, a pop-up help containing extended description of the handler will be shown.
Selected handlers are added in addition to the main ones — OnInit(), OnCalculate().
To go to the next step, press the "Next" button.
At this stage one should specify the following parameters:
In order to add a line to the "Plots" box one should press the "Add" button. In the appeared line it is necessary to specify the name, type and color. The type is selected from the dropdown list. Each of the variants chosen means the automatic creation of necessary minimum of parameters and arrays for drawing. As soon as the "Done" button is pressed, the project of the custom indicator will be created and the window for writing its source code will be opened automatically.