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!