Historical Data

Posted By: byakuren81

Historical Data - 05/18/15 19:43

Hello,

I am trying to compare historical data uploaded by Zorro with the one I can read in MetaTrader, my broker is FXCM.

When comparing hourly data using the following code :

function run()
{
StartDate = 20150511;
EndDate = 20150518;
asset("EUR/USD");
BarPeriod = 60;

printf("\n");
printf("%d %d %d %d %f",year(0),month(0),day(0),
hour(0),priceClose(0));
}

The results I obtained are very different. I know that MT4 shows the bid price whereas Zorro uploads the ask price but still the difference is pretty big.

My question is how does Zorro aggregate data ? When choosing 60 minutes period does it build a bar with 60 bars of one minute or does it aggregates only the one belonging to the same hour ?
Posted By: byakuren81

Re: Historical Data - 05/18/15 19:56

also these data from priceClose() on EUR/USD for instance have sometimes six figures after the coma, how can this be possible given that FXCM quotes only 5 ?
Posted By: byakuren81

Re: Historical Data - 05/19/15 15:04

I have used the code shown in the manual to export data in order to compare them with the data provided by FXCM through MetaTrader :

function run()
{
BarPeriod = 60;
StartDate = 20150511;
EndDate = 20150518;
LookBack = 0;

char line[100];
sprintf(line,"%02i/%02i/%02i %02i:%02i, %.5f, %.5f, %.5f, %.5f\n",
day(),month(),year()%100,hour(),minute(),
priceOpen(),priceHigh(),priceLow(),priceClose());

if(is(INITRUN))
file_delete("C:\\Users\\Olivier\\Documents\\export.csv");
else
file_append("C:\\Users\\Olivier\\Documents\\export.csv",line);
}

and once again these data are completely different, which should not be the case as the source is supposed to be the same and both Zorro and MetaTrader are at UTC.

I had purchased in the past a tool to download data from FXCM, the historical data downloader and they are almost the same than the one loaded in MetaTrader, I am very concerned by this difference, could you please give me an explaination ?

thanks
Posted By: jcl

Re: Historical Data - 05/22/15 08:30

There can be many reasons of differences, for instance a different start/end time of your bars, some local time or daylight saving time.

The data in the History folder consists of 1 minute ticks that are put together to the bar period. It is identical to the data that you get with real trading. So it can serve as reference data. Data from other sources must be similar or something is wrong with the source or the conversion.

For finding where your data is different, you can simply compare the raw data by using BarPeriod=1. Look especially at the time stamp.

The number of decimals depends on your print format, not on the broker's pip size. Use %.5f for 5 digits.
Posted By: piper

Re: Historical Data - 08/15/15 12:38

Hello,

just a short info to ZORRO download page.

Link for dl History data: SPX500 1010-2015 seems to have wrong download adress, it's connected to XAUUSDt1.zip.

... sorry entering this issue here, I'm new to this forum and it's my first post to get more safety with it.

thanks
© 2024 lite-C Forums