Program Properties (#property)
Every mql5-program allows to specify additional specific parameters named #property that help client terminal in proper servicing for programs without the necessity to launch them explicitly. This concerns external settings of indicators, first of all. Properties described in included files are completely ignored. Properties must be specified in the main mq5-file.
#property identifier value |
The compiler will write declared values in the configuration of the module executed.
Constant |
Type |
Description |
link |
link to the company website |
|
copyright |
the company name |
|
version |
program version, maximum 31 characters |
|
description |
brief text description of a mql5-program. Several description can be present, each of them describes one line of the text. The total length of all description can not exceed 511 characters including line feed. |
|
stacksize |
size of the stack for recursive calls |
|
library |
|
a library; no start function is assigned, functions with the export modifier can be imported in other mql5-programs |
indicator_applied_price |
specifies the default value for the "Apply to" field. You can specify one of the values of ENUM_APPLIED_PRICE. If the property is not specified, the default value is PRICE_CLOSE |
|
indicator_chart_window |
|
show the indicator in the chart window |
indicator_separate_window |
|
show the indicator in a separate window |
indicator_buffers |
number of buffers for indicator calculation |
|
indicator_plots |
number of graphic series in the indicator |
|
indicator_minimum |
the bottom scaling limit for a separate indicator window |
|
indicator_maximum |
the top scaling limit for a separate indicator window |
|
indicator_labelN |
sets a label for the N-th graphic series displayed in DataWindow. For graphic series requiring multiple indicator buffers (DRAW_CANDLES, DRAW_FILLING and others), the tag names are defined by the separator ';'. |
|
indicator_colorN |
the color for displaying line N, where N is the number of graphic series; numbering starts from 1 |
|
indicator_widthN |
line thickness in graphic series, where N - number of graphic series, numbering starts from 1 |
|
indicator_styleN |
line style in graphic series, specified by the values of ENUM_LINE_STYLE. N - number of graphic series, numbering starts from 1 |
|
indicator_typeN |
type of graphical plotting, specified by the values of ENUM_DRAW_TYPE. N - number of graphic series, numbering starts from 1 |
|
indicator_levelN |
horizontal level of N in a separate indicator window |
|
indicator_levelcolor |
color of horizontal levels of the indicator |
|
indicator_levelwidth |
thickness of horizontal levels of the indicator |
|
indicator_levelstyle |
style of horizontal levels of the indicator |
|
script_show_confirm |
|
display a confirmation window before running the script |
script_show_inputs |
|
display a window with the properties before running the script and disable this confirmation window |
tester_indicator |
Name of a custom indicator in the format of "indicator_name.ex5". Indicators that require testing are defined automatically from the call of the iCustom() function, if the corresponding parameter is set through a constant string. For all other cases (use of the IndicatorCreate() function or use of a non-constant string in the parameter that sets the indicator name) this property is required |
|
tester_file |
File name for a tester with the indication of extension, in single quotes (as a constant string). The specified file will be passed to tester. Input files to be tested, if there are necessary ones, must always be specified. |
|
tester_library |
Library name with the extension, in single quotes. A library can have extension dll or ex5. Libraries that require testing are defined automatically. However, if any of libraries is used by a custom indicator, this property is required |
Sample Task of Description and Version Number
#property version "3.70" // Current version of the Expert Advisor |

Examples of Specifying a Separate Label for Each Indicator Buffer ( "C open; C high; C low; C close")
#property indicator_chart_window |

© 2000-2010, MetaQuotes Software Corp.