Posted By:
30 Jul, 2014 10:26 am PDT

Predefined variables in MetaTrader

Predefined variables in MetaTrader are:

1. Ask

2. Bid

3. Bars

4. Point

5. Digits

Predefined arrays are:

1. High

2. Low

3. Time

4. Open

5. Close

6. Volume

Attachment:None


List of Simple Predefined Names of Variables

Ask last known sell-price of a current security;

Bid last known buy-price of a current security;

Bars - number of bars on a current chart;

Point - point size of a current security in quote currency;

Digits - number of digits after a decimal point in the price of a current security.

 

List of Predefined Names of Arrays-Timeseries

Time - opening time of each bar on the current chart;

Open - opening price of each bar on the current chart;

Close - closing price of each bar on the current chart;

High - maximal price of each bar on the current chart;

Low - minimal price of each bar on the current chart;

Volume - tick volume of each bar on the current chart.

 

Local and Global Variables

Local variable is a variable declared within a function. The scope of local variables is the body of the function, in which the variable is declared. Local variable can be initialized by a constant or an expression corresponding to its type.

 

Global variable s a variable declared beyond all functions. The scope of global variables is the entire program. A global variable can be initialized only by a constant corresponding to its type (and not expression). Global variables are initialized only once before stating the execution of special functions.

External Variables

External variable is a variable, the value of which is available from a program properties window. An external variable is declared outside all functions and is a global one - its scope is the whole program. When declaring an external variable, modifier 'extern' should be indicated before its value type:

extern int Number;// External variable of integer type

Was it useful?  




Please login to reply to this problem.



Related Problems on Fixoncloud