Need help with Volume request !

 

Hello,



I want to get the volume information per tick. I can't seem to find a command in MQL4 that enables me to request this information. Can anyone help?



Nate

 

MetaTrader volume is tick count, so volume per tick = 1.

#property indicator_chart_window

int ticks;
int oldTime;
bool startup = true;




int start(){

if (startup == true){
   ticks = Volume[0]-1;
   startup = false;
}

if(oldTime != Time[0]){
   oldTime = Time[0];
   ticks = 0;
}

ticks++;
Comment("Ticks = ", ticks, "\nVolume = ", Volume[0]);
return(0);

}

Run that on a 1 minute chart.

Ignore the first minute, when you freshly apply an indicator it executes erratically.

Reason: