MetaEditor HelpMQL4/MQL5 WizardCreating a script

Creating a script

A template is a basic source code of a script. It contains the standard program header, general properties and workpieces for the launch event handler – OnStart. A template is created in the directory corresponding to a program type – MQL5/Scripts (or MQL4/Scripts). When creating a template, you can define the program inputs beforehand.

Creating a script

Fill in the following fields:

  • Name – script name. The same name is assigned to a script file. Here you can also change the path to a destination file. For example, create it in the new \Scripts sub-directory.
  • Author – author name.
  • Link – developer's email address or website.
  • Parameters – set of script input parameters (external variables).

To create a parameter, click Add and fill in three fields:

  • Name – input variable name
  • Type – type of an input variable selected from the list.
  • Initial value – initial value of a variable. It can be changed before a program launch or during operation.

Click Finish to complete template creation. A generated file is immediately opened for editing.