Download MetaTrader 5

Volume return strange values

To add comments, please log in or register
Simha90
23
Simha90  

Hi I'm using metatrader 5 from Alpari, and I have next issue: When I'm trying to get volume it always returning strange values. I'm doing it like:

long v[]; ArrayResize(v, 1000); ArraySetAsSeries(v, true);
CopyRealVolume("EURUSD", PERIOD_M1, 1, 1000, v);
Print(v[0]+"--"+v[300]+"--"+v[500]+"--"+v[700]+"--"+v[999]);
And in the and I'm getting next output:
2015.01.27 23:00:59.343	MyAdvisor (EURUSD,M1)	0--0--0--2326685000--0
What I'm doing wrong? Thanks.
Stuart Browne
6886
Stuart Browne  
Simha90:

Hi I'm using metatrader 5 from Alpari, and I have next issue: When I'm trying to get volume it always returning strange values. I'm doing it like:

And in the and I'm getting next output:
What I'm doing wrong? Thanks.
If you're using Alpari UK or Alpari JP, I'm surprised you're getting any return value at all - they have shut down Alpari.
Simha90
23
Simha90  
Filter:
If you're using Alpari UK or Alpari JP, I'm surprised you're getting any return value at all - they have shut down Alpari.
So what I need to do? Currently now I'm locating in Israel, how to fix it?
Stuart Browne
6886
Stuart Browne  
Simha90:
So what I need to do? Currently now I'm locating in Israel, how to fix it?
Unfortunately, you need to find a new broker sorry
Simha90
23
Simha90  
Thanks
Simha90
23
Simha90  
Filter:
Unfortunately, you need to find a new broker sorry

Hi I downloaded Metatrader from this site and also trying the same thing and I'm getting also strange values like:

2015.01.28 22:11:08     Core 1  2015.01.26 00:12:30   7500000--500000--66400000--72000000--49000000

 What does these numbers mean?

Alain Verleyen
Moderator
34521
Alain Verleyen  
Simha90:

Hi I downloaded Metatrader from this site and also trying the same thing and I'm getting also strange values like:

 What does these numbers mean?


CopyRealVolume().
Documentation on MQL5: Timeseries and Indicators Access / CopyRealVolume
Documentation on MQL5: Timeseries and Indicators Access / CopyRealVolume
  • www.mql5.com
Timeseries and Indicators Access / CopyRealVolume - Reference on algorithmic/automated trading language for MetaTrader 5
Simha90
23
Simha90  
angevoyageur:

CopyRealVolume().
Yes, I read it, but these numbers too big for real volumes!!! It can't be...
Alain Verleyen
Moderator
34521
Alain Verleyen  
Simha90:
Yes, I read it, but these numbers too big for real volumes!!! It can't be...
Why not ?
Alain Verleyen
Moderator
34521
Alain Verleyen  
Simha90:

Hi I'm using metatrader 5 from Alpari, and I have next issue: When I'm trying to get volume it always returning strange values. I'm doing it like:

And in the and I'm getting next output:
What I'm doing wrong? Thanks.

You have to test the returned value of CopyRealVolume(), to check if if copy was correctly executed.

int copied=CopyRealVolume("EURUSD", PERIOD_M1, 1, 1000, v);

if(copied==-1)
  {
    //--- Error processing
  }
...
Simha90
23
Simha90  
angevoyageur:

You have to test the returned value of CopyRealVolume(), to check if if copy was correctly executed.

yes, variable copied returning 1000 in this case.
12
To add comments, please log in or register