Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time offset #8

Merged
merged 4 commits into from
Jan 6, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove what was thought as a bug, may only be an anomality for a
particular day
  • Loading branch information
kohnech committed Jan 6, 2020
commit bbf953566933666c52d1ac07acd6b040e6daf38f
33 changes: 2 additions & 31 deletions test/test_read_bi5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,37 +178,8 @@ int main(int argc, char* argv[]) {
for (auto file : all_files) {
std::string filename = test_data_prefix + test_data_asset + "/" + test_data_date + "/" + file;
std::cout << "Reading data from file " << filename << '\n';
Date date = parse_date(test_data_date);
// Bug in dukascopy, the 10h_ticks.bi5 is actually a continuation of 09h_ticks.bi5


if (hour == 11) {
date.hour = 10;
}
else if (hour == 12){
date.hour = 11;
}
else if (hour == 13){
date.hour = 12;
}
else if (hour == 14){
date.hour = 13;
}
else if (hour == 15){
date.hour = 14;
}
else if (hour == 16){
date.hour = 15;
}
else if (hour == 17){
date.hour = 16;
}
else if (hour == 18){
date.hour = 17;
}
else {
date.hour = hour;
}
Date date = parse_date(test_data_date);
date.hour = hour;
const std::string out_file = "output" + file + ".csv";
read_file(filename, out_file, date);
std::cout << "Data saved to file " << out_file << '\n';
Expand Down