This PR fixes a couple of issues, but the main change is to
remove the concept of duration from the command line arguments, and to pick it ourselves. Before, a 1 day duration with bars under 1 day would only return the night session for CME products. Changing this to be 1 day's worth of seconds for all bars under 1 day of length returns the full day.
This was also developed with a 10.19.1 of the TWS API, and so updating the code to deal with timezones was necessary.
Existing bar files should be deleted before attempting to run this, it will not necessarily merge the files well.
This PR fixes a couple of issues, but the main change is to remove the concept of duration from the command line arguments, and to pick it ourselves. Before, a 1 day duration with bars under 1 day would only return the night session for CME products. Changing this to be 1 day's worth of seconds for all bars under 1 day of length returns the full day.
This was also developed with a 10.19.1 of the TWS API, and so updating the code to deal with timezones was necessary.
Existing bar files should be deleted before attempting to run this, it will not necessarily merge the files well.