Download MetaTrader 5
To add comments, please log in or register
Follow the news. View our company's official channel!
yhoyo
48
yhoyo 2014.08.13 19:51 

hi how are you?

 

I want to use the VOLUME_REAL in mql4, but I can't

 I'm search some information in documentation:

 https://docs.mql4.com/constants/indicatorconstants/prices

 or chart_volume_real

 https://docs.mql4.com/constants/chartconstants/chart_view

 

someone can help me please??

 

really thanks

 

Diego 

Alain Verleyen
Moderator
28701
Alain Verleyen 2014.08.13 21:30  
YHOYO:

hi how are you?

 

I want to use the VOLUME_REAL in mql4, but I can't

 I'm search some information in documentation:

 https://docs.mql4.com/constants/indicatorconstants/prices

 or chart_volume_real

 https://docs.mql4.com/constants/chartconstants/chart_view

 

someone can help me please??

 

really thanks

 

Diego 

 

 

You can only if a broker provides you the data. To my knowledge there is no such broker currently for MT4.
yhoyo
48
yhoyo 2014.08.14 00:32  
angevoyageur:
You can only if a broker provides you the data. To my knowledge there is no such broker currently for MT4.


really thanks for your help...    why  CHART_VOLUME_REAL always return "2"???

 

thanks again

 

Diego 

Alain Verleyen
Moderator
28701
Alain Verleyen 2014.08.14 10:01  
YHOYO:


really thanks for your help...    why  CHART_VOLUME_REAL always return "2"???

 

thanks again

 

Diego 

Can you provide a snippet of code to show what your are doing ?

By the way, you can't use Real Volume usefully with MT4. It's there for compatibility reason with MT5.

yhoyo
48
yhoyo 2014.08.16 00:44  

hi again..  I already installed MT5...  in order to use the "volume_ real"...  I tested with this  simple code that I put in Ontick...:

 

   double volumenreal = VOLUME_REAL;  //always return 1 or -1

   double volumentics = VOLUME_TICK; // always return 0

   double Chart_volumenreal = CHART_VOLUME_REAL; // always return 2

 

   Print("volumen real: " + string(volumenreal));

   Print("Volumen tick: " + string(volumentics));

   Print("Chart Volumen tick: " + string(Chart_volumenreal)); 

 

 perhaps is it because I use that in backtest... ????

 

 

thanks again

 

Diego 

Alain Verleyen
Moderator
28701
Alain Verleyen 2014.08.16 09:15  
YHOYO:

hi again..  I already installed MT5...  in order to use the "volume_ real"...  I tested with this  simple code that I put in Ontick...:

...

Where did you see you can use VOLUME_REAL, VOLUME_TICK or CHART_VOLUME_REAL this way ? They are constants.

Please read the documentation, for example iVolume.

yhoyo
48
yhoyo 2014.08.16 15:19  

   

angevoyageur:

Where did you see you can use VOLUME_REAL, VOLUME_TICK or CHART_VOLUME_REAL this way ? They are constants.

Please read the documentation, for example iVolume.

hi man

 thanks for reference...   I change that for this:

double volumenreal = iVolumes (_Symbol, PERIOD_CURRENT, VOLUME_REAL);

double volumentics = iVolumes (_Symbol, PERIOD_CURRENT, VOLUME_TICK);

 

Now this is the result I get in the chart... but I need a little help...    how I can return the values that show the indicators??

If I use Print(volumenreal);  that show 12..  and Print(volumentics); that show 13...   I'm confused

 


volume_real and  volume_ticks 


 

thanks again

 

Diego 

Alain Verleyen
Moderator
28701
Alain Verleyen 2014.08.16 16:26  
YHOYO:

   

angevoyageur:

Where did you see you can use VOLUME_REAL, VOLUME_TICK or CHART_VOLUME_REAL this way ? They are constants.

Please read the documentation, for example iVolume.

hi man

 thanks for reference...   I change that for this:

double volumenreal = iVolumes (_Symbol, PERIOD_CURRENT, VOLUME_REAL);

double volumentics = iVolumes (_Symbol, PERIOD_CURRENT, VOLUME_TICK);

 

Now this is the result I get in the chart... but I need a little help...    how I can return the values that show the indicators??

If I use Print(volumenreal);  that show 12..  and Print(volumentics); that show 13...   I'm confused

 


 


 

thanks again

 

Diego 

What is the return value of iVolume ?

By the way this is mql5, it's better to ask on mql5.com forum.

yhoyo
48
yhoyo 2014.08.16 17:56  
angevoyageur:

What is the return value of iVolume ?

By the way this is mql5, it's better to ask on mql5.com forum.



really thanks.. I'm going to ask in mql5 forum....  when I have a solution, I will post here to not leave unfinished business
yhoyo
48
yhoyo 2014.08.19 21:38  

the answer to this topic is here  https://www.mql5.com/en/forum/35471

 

best regards

 

Diego 

/
To add comments, please log in or register