Hello.

I was wondering how the marketVol function is supposed to be used. When invoked, it returns unexpectedly small values only. When looking at daily asset data from stooq, market volume numbers are very large, going into hundreds of millions, whereas Zorro returns values in the ones and tens. Upon investigation, it looks like the application returns only the first minute volume value, and not the sum of all values within a bar. Consider this script:

Code:
#include <default.c>
#include <contract.c>

void main()
{
	BarPeriod = 1440;
}

void run()
{
	DATE date = wdate(0);
	long yyyymmdd = ymd(date);
	double vol = marketVol(0);
	printf("n%d volume: %f", yyyymmdd, vol);
}



And the attached image.

I am using the data from the Zorro website. But even if marketVol would return the sum, the number would still be relatively small. Like lets say 5 (approx. volume per minute) * 1440 (minutes) = 7200 (volume per day). This is far from the expected volume of hundereds of millions. In what unit are the Zorro data volume numbers?

The Manual says "trade volume per minute":
http://zorro-project.com/manual/en/price.htm
But if this is really only ever returning minute volume, how can the user access the daily/hourly/etc volume, when the given function argument takes a bar (as per BarPeriod) only?

I don't understand this. Any help appreciated. Thanks.

Attached Files
marketVol.png (26 downloads)
Last edited by pascalx; 11/02/17 18:24.