A template is a basic source code of a trading robot. It contains the standard program header, general properties and workpieces for the main event handlers: new tick arrival (OnTick), launch (OnInit) and EA deinitialization (OnDeinit). A template is created in the directory corresponding to a program type – MQL5/Experts (or MQL4/Experts). When creating a template, you can define the program inputs beforehand, as well as add them to the workpiece code for additional event handlers.
Fill in the following fields:
The input parameters are "input" class variables. To create a parameter, click Add and fill in three fields:
After specifying all the necessary data, click Next.
At subsequent stages, select additional event handlers. The workpieces for them are to be inserted into the EA template:
To view an extended handler description, move the cursor over it.
Selected handlers are added in addition to the main ones – OnInit, OnDeninit and OnTick.
Click Finish to complete template creation. A generated file is immediately opened for editing.