Documentation
The long-awaited program of the website beta testing has been launched. For some time the website operation may be inconsistent. The website developers are filling up its contents now doing their best to make it maximum convenient for you. Please accept our apologies for the temporary inconvenience.
MQL5 ReferencePredefined Variables 

The predefined Variables

For each executable mql5-program a set of predefined variables is supported, which reflect the state of the current price chart by the moment a mql5-program (Expert Advisor, script or custom indicator) is started.

Values of predefined variables are set by the client terminal before a mql5-program is started. Predefined variables are constant and cannot be changed from a mql5-program. As exception, there is a special variable _LastError, which can be reset to 0 by the ResetLastError function.

Variable

Value

_Digits

Number of decimal places

_Point

Size of the current symbol point in the quote currency

_LastError

The last error code

_Period

Timeframe of the current chart

_StopFlag

Program stop flag

_Symbol

Symbol name of the current chart

_UninitReason

Uninitialization reason code