Detected Country () : English
Default Variable - codingforex.com

Welcome to CodingForex.Com!

Knowledge portal where you can learn how to create forex indicators and robot.

Click button below to choose level that suite you:

Default Variable

Level Active [2017-11-08 12:22:51] - by hillzx
Featured Image

Previously we have learned about what the meaning of the variable in this article. Actually Metatrader also has included some default variables that are initialized at the beginning of the running program, these variables include the following:

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

_RandomSeed

Current status of the generator of pseudo-random integers

_StopFlag

Program stop flag

_Symbol

Symbol name of the current chart

_UninitReason

Uninitialization reason code

Ask

The latest known seller's price (ask price) of the current symbol

Bars

Number of bars in the current chart

Bid

The latest known buyer's price (offer price, bid price) of the current symbol

Close

Series array that contains close prices for each bar of the current chart

Digits

Number of digits after decimal point for the current symbol prices

High

Series array that contains the highest prices of each bar of the current chart

Low

Series array that contains the lowest prices of each bar of the current chart

Open

Series array that contains open prices of each bar of the current chart

Point

The current symbol point value in the quote currency

Time

Series array that contains open time of each bar of the current chart

Volume

Series array that contains tick volumes of each bar of the current chart



Example :

 

   Print("Symbol name of the current chart=",_Symbol);
   Print("Timeframe of the current chart=",_Period);
   Print("The latest known seller's price (ask price) for the current symbol=",Ask);
   Print("The latest known buyer's price (bid price) of the current symbol=",Bid);   
   Print("Number of decimal places=",Digits);
   Print("Number of decimal places=",_Digits);
   Print("Size of the current symbol point in the quote currency=",_Point);
   Print("Size of the current symbol point in the quote currency=",Point);   
   Print("Number of bars in the current chart=",Bars);
   Print("Open price of the current bar of the current chart=",Open[0]);
   Print("Close price of the current bar of the current chart=",Close[0]);
   Print("High price of the current bar of the current chart=",High[0]);
   Print("Low price of the current bar of the current chart=",Low[0]);
   Print("Time of the current bar of the current chart=",Time[0]);
   Print("Tick volume of the current bar of the current chart=",Volume[0]);
   Print("Last error code=",_LastError);
   Print("Random seed=",_RandomSeed);
   Print("Stop flag=",_StopFlag);
   Print("Uninitialization reason code=",_UninitReason);   


Good luck, do not forget to share and follow our official facebook and youtube, happy trading!



Next Article

Featured Image

General Function




- Provided by HiLLzSoft Studio -