Download MetaTrader 5

Volume[1] multi value returned ?

To add comments, please log in or register
seemore
70
seemore  

Hi there,

I'm trying to get the value of Value[1] but as a result I'm getting 2 different values like 1203 and 735 ...

The same is for Volume[2] ... [3] etc.

Is it not supposed to be just a single value returned ??

qjol
3243
qjol  

double Volume[]

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

Alain Verleyen
Moderator
31183
Alain Verleyen  

Please don't double post.

Your other message on the same subject will be deleted....again.

Simon Gniadkowski
Moderator
18003
Simon Gniadkowski  
seemore:

Hi there,

I'm trying to get the value of Value[1] but as a result I'm getting 2 different values like 1203 and 735 ...

The same is for Volume[2] ... [3] etc.

Is it not supposed to be just a single value returned ??


What exactly do you men . . . 2 values ? variable = Volume[2] returns a single long value . . . how are you getting 2 ?
Keith Watford
Moderator
9641
Keith Watford  
seemore:

Hi there,

I'm trying to get the value of Value[1] but as a result I'm getting 2 different values like 1203 and 735 ...

The same is for Volume[2] ... [3] etc.

Is it not supposed to be just a single value returned ??


We have no idea what the array variable Value[1] equates to. But it cannot hold more than 1 value at the same time.

The only way that you are getting 2 different values is if the value has changed since last retrieving the value.

Volume[2] will only have 1 value until a new bar is opened, then shift 2 will become shift 3 and so you will find that Volume[3] will hold the value that was previously stored in Volume[2]. Volume[2] will now hold the value that was previously stored in Volume[1].

Alain Verleyen
Moderator
31183
Alain Verleyen  
angevoyageur:

Please don't double post.

Your other message on the same subject will be deleted....again.


Ok I will let both posts this time, as people answered both side. It's a waste of time for you and other people, this is why you should avoid this double post an other time.


Thank you.

To add comments, please log in or register