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

# Creating a class

A template is a basic source code of a class. It contains the standard program header, general properties and a workpiece for the class: class definition, a workpiece for public and private methods, constructor and destructor. When creating a class, you can specify its basic class which is also appropriately formatted in the template. The template is created in the MQL5/Include (or MQL4/Include) directory.

![Creating a class](https://www.metatrader5.com/i/help/metaeditor/en/wizard_class.png)

Fill in the following fields:

- Class Name – name for a created class.
- Include File – name of an mqh file to be created for describing a class, as well as the path to it, relative to /MQL5 (/MQL4) folder.
- Base Class – if a created class is to be inherited from another one, specify this in the field. Next, select the inheritance type from the base class.
- Author – author name.
- Link – developer's email address or website.

> Depending on the conditions of MQL4/MQL5 Wizard launch, the appropriate path is automatically substituted in the MQH file:If there are no open documents at the moment, /Include path is specified.If there are open documents, the path is similar to an active file's one.If MQL4/MQL5 Wizard is launched from the Navigator window, the path of the selected folder is substituted.

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](https://www.metatrader5.com/en/metaeditor/help/mql5_wizard/wizard_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

```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_class", "name": "Creating a class"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: Creating a class", "acceptedAnswer": { "@type": "Answer", "text": "A template is a basic source code of a class. It contains the standard program header, general properties and a workpiece for the class: class..." } }] }
```
