---
title: "Creating a script - MQL4/MQL5 Wizard - MetaEditor Help"
description: "A template is a basic source code of a script. It contains the standard program header, general properties and workpieces for... - Creating a script - MQL4/MQL5 Wizard - MetaEditor Help"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
url: "https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_script"
---

[MetaEditor Help](https://www.metatrader5.com/en/metaeditor/help) → [MQL4/MQL5 Wizard](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard) → Creating 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](https://www.metatrader5.com/i/help/metaeditor/en/wizard_script.png)

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.

## In this section

- [Creating an EA template](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_ea)
- [Creating a ready-made Expert Advisor](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_ea_generate)
- [Creating an indicator](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_indicator)
- Creating a script
- [Creating a library](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_library)
- [Creating an include file](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_include)
- [Creating a class](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_class)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help", "name": "MetaEditor Help"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/mql5_wizard", "name": "MQL4/MQL5 Wizard"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_script", "name": "Creating a script"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: Creating a script", "acceptedAnswer": { "@type": "Answer", "text": "A template is a basic source code of a script. It contains the standard program header, general properties and workpieces for the launch event..." } }] }
```
