View Single Post
  #5 (permalink)  
Old 11-03-2005, 01:14 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Ask, Bid, Bars, Close, Open, High, Low, Time and Volume are functions not variables!

Quote:
Originally Posted by newdigital
I have a question.

What are the Ask, Bid, Bars, Close, Open, High, Low, Time and Volume?

Variables?
It was not mentioned in your lessons. May you describe about that?
What is the difference between Ask - Bid and other above mentioned variables?

Current bar is Bars = 0. Right?
And previous bar is Bars = 1.
And what is Bars = -1. Is it 10 or Is it the future bar?
Ask, Bid, Bars, Close, Open, High, Low, Time and Volume are functions Although MQL4 called them predefined variables.

Variable means a space in memory and data type you specify.
Function means do something and return some value, For example Bars collects and returns the number of the bars in chart. So, is it a variable?

Another example will proof for you that they are not variables:

If you type and compile this line of code:
Bars=1;
You will get this error:
'Bars' - unexpected token
That’s because they are not variables hence you can’t assign a value to them.

Please leave their description to lesson 11 (Today )
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote