# Volume Data Missing - How to Skip Calculation When V is missing/ is 0

##### Active Member
Hi,

Can it be coded to skip calculation when data is missing ?

Such as
if (V==0) ; //check volume is 0 or more

Do we need to use "FOR Loop" here for every bar ?? If yes, then my understanding is that then the entire formula will have to placed inside that FOR Loop. That will be a lot of trouble.

Can this be achieved without looping ? Have no clues how can this be done.

Please, if any one can help here.

#### arun_1976

##### New Member
Hi,

Can it be coded to skip calculation when data is missing ?

Such as
if (V==0) ; //check volume is 0 or more

Do we need to use "FOR Loop" here for every bar ?? If yes, then my understanding is that then the entire formula will have to placed inside that FOR Loop. That will be a lot of trouble.

Can this be achieved without looping ? Have no clues how can this be done.

Please, if any one can help here.

the problem with or without looping is that if you skip it will mark that period as 0, and incase you want to calc any moving over this array it will result in an incorrect result

#### colion

##### Active Member
You could set all values of the bar to Null:

V = iif( V == 0, Null, V );
O = iif( V == 0, Null, O );
etc.

Or you might want to set it to the previous value:

V = iif( V == 0, Ref( V, -1 ), V );
O = iif( V == 0, Ref( O, -1 ), O );
etc.

Last edited:

##### Active Member
Going to check the approach now.
If things don't work out, will write back..

Thanks, Colion..