Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 359

 
YarTrade: The code turns out to be this:
   V1 = (iVolume(NULL, 0, 0) - Volume1)
   Buf_1[0]= (V1 + V2);

Compile error: 'Buf_1' - some operator expected

before this word or at the end of the previous line you should ;

 
STARIJ:

Is it before this word or at the end of the previous line should ;

Thank you, I missed it.

Some obscure note appears: possible loss of data due to type conversion

Please tell me, what does it mean?

 
YarTrade: note: possible loss of data due to type conversion

iVolume type long maximum value 9 223 372 036 854 775 807 is assigned to variable int maximum value 2 147 483 647. possible loss of data

 
STARIJ:

iVolume type long maximum value 9 223 372 036 854 775 807 is assigned to variable int maximum value 2 147 483 647. Possible data loss


Thank you. I'll work on it. I didn't read anything about long type in the textbook for some reason.

 
YarTrade:

Good afternoon.

Very much need your help. I am trying to describe the following logic for the indicator: If a tick is positive (bid-bid1), then the volume of this tick is added to the accumulated volume of all positive ticks for this bar. Volumes for negative ticks are added separately. A histogram is drawn where the accumulated volume of deals with positive ticks is set up and the volume of negative deals for each bar of the selected timeframe is set down.

This is how my code works:

However, it contains compilation errors:
'Buf_1' - some operator expected VolumeCounter.mq4

Something I don't understand at all.


Do you need such an indicator?
TicksVolume
TicksVolume
  • votes: 31
  • 2015.12.11
  • Alexey Viktorov
  • www.mql5.com
Индикатор показывает изменение цены в пунктах и сколько раз за период произошло изменение в течение выбранного периода, к сожалению только от момента запуска до момента остановки. Входящих параметров не имеет. Возможно использование для определения скорости и/или ускорения изменения цены. На скрине видно, что Volume равно 44, индикатор...
 
Gentlemen, am I correct in assuming that iVolume returns the volume of trades made per tick?
 
Alexey Viktorov:
Is this the kind of indicator you need?

I am training to write indicators. So far I am trying to write them without any trading benefit, just for the sake of writing them.

 
YarTrade:
Gentlemen, do I understand correctly that iVolume returns the volume of trades made per tick?

https://docs.mql4.com/ru/series/ivolume

 

That's what I read. I wanted to make sure I understood what was written correctly.

Gentlemen, do I understand correctly that iVolume returns the volume of trades made per tick?

 
YarTrade:

That's what I read. I wanted to make sure I understood what was written correctly.

Gentlemen, do I understand correctly that iVolume returns the volume of trades made per tick?

read it again :-)"Returns the value of the tick volume of the bar (specified by the shift parameter) of the corresponding chart"

Reason: