CSVtoHistory Sunday data

Posted By: quandr

CSVtoHistory Sunday data - 05/27/22 13:07

I used CSVtoHistory script to ingest ES m1 data from tradestation, all seems well, except the Sundays. The time stamps are in EST timezone,
Globex opens at 18:00 EST, in the CSV file ... (O,H,L,C)

1200105.00,2020-01-05 18:01:00,3136.25,3138.50,3134.50,3135.50,2660,3162
1200105.00,2020-01-05 18:02:00,3135.75,3137.00,3134.75,3135.25,756,786
1200105.00,2020-01-05 18:03:00,3135.25,3136.00,3133.50,3134.25,867,948
1200105.00,2020-01-05 18:04:00,3134.25,3135.00,3133.25,3133.25,744,892
1200105.00,2020-01-05 18:05:00,3133.25,3134.25,3132.50,3133.50,794,1009

On Zorro chart with BarPeriod = 30
2020-01-03 17:00:00 3151.00000 3151.75000 3150.25000 3151.50000 30.00000
2020-01-05 23:00:00 3136.25000 3141.75000 3132.25000 3141.00000 3240.00000
2020-01-05 23:30:00 3141.25000 3146.00000 3140.25000 3145.00000 30.00000
2020-01-06 00:00:00 3145.00000 3145.00000 3142.75000 3144.50000 30.00000
2020-01-06 00:30:00 3144.25000 3145.00000 3142.50000 3143.25000 30.00000

11pm bar is in fact a 5hr bar, the low of 3132.25 comes from 18:18 minute bar.

If BarPeriod =1

2020-01-03 17:00:00 3151.25000 3151.75000 3151.25000 3151.50000 1.00000
2020-01-05 23:00:00 3136.25000 3141.75000 3132.25000 3141.00000 3240.00000
2020-01-05 23:01:00 3141.25000 3141.25000 3141.00000 3141.25000 1.00000
2020-01-05 23:02:00 3141.00000 3141.25000 3141.00000 3141.25000 1.00000
2020-01-05 23:03:00 3141.25000 3141.25000 3140.75000 3140.75000 1.00000

11pm bar on Sundays still represents 5hr of data between 6pm and 11pm.


What is causing this behavior, and how can I fix it?

Thanks!
Posted By: quandr

Re: CSVtoHistory Sunday data - 05/27/22 15:15

Here's the content of run() function

set(LOGFILE);
Verbose = 2;
StartDate = 20200103;
EndDate = 20200130;
BarPeriod = 1.;
set(PLOTNOW);
plot("Open", priceOpen(), NEW, BLUE);
plot("High", priceHigh(), NEW, BLUE);
plot("Low", priceLow(), NEW, BLUE);
plot("Close", priceClose(), NEW, BLUE);
plot("minutesAgo(1)", minutesAgo(1), NEW, BLUE);
Posted By: Petra

Re: CSVtoHistory Sunday data - 05/28/22 07:00

Its no 5 hr gap. Its a 2.5 days gap and is called "weekend".

You can set up the weekend time, or if you want a weekend at all with BarMode.

https://zorro-project.com/manual/en/barmode.htm
Posted By: quandr

Re: CSVtoHistory Sunday data - 05/28/22 20:47

Thanks, Petra.

The settings below produced the expected result.
StartWeek = 71801;
EndWeek = 51701;
BarMode = BR_WEEKEND; //+BR_SLEEP;


I was wondering if Zorro maintains holiday lists for major markets in yyyymmdd format going back 10-20 years?
© 2024 lite-C Forums