Is it ok to have 8-9 bars in a week (for daily periodicity)? and how does data padding and alignment affect it?

Hi everyone,

I created a database from 1 minute data, and am learning AmiBroker by using daily bars. The charts look good, and I am trying to understand more about how daily bars are constructed from 1 minute bars, and how the fact that daily bars have different start/end date for different symbols could affect testing.

When not using pad/align feature, is it ok for "# bars" to be 8-9 in a week? I don't mind having that many, since it's pretty clear those are not full-day bars. But I'm wondering if some other areas of the backtesting process would be affected. And, if it's not ok (i.e. it should be 5), what should I check or do with my data? Maybe I need to import it in a different way? (all I imported was 1 minute CSV files).

When testing individual symbols the # of bars is 5 for both, but when testing multiple symbols as part of a portfolio the # of bars changes to 8 or 9 (see picture below). I think I understand why (there are 8 or 9 intervals that result from the combination of start/end minutes of the component bars of the two symbols), but it's just a guess, so I'd appreciate someone with experience bringing clarify to this matter.

I also tried enabling pad/align, and set EURUSD as the reference, thinking I have the most complete data for that. As seen in the picture below, when using EURUSD as reference the # of bars is shown as 5 (rather than 8 or 9 when not having any reference).

If using a reference is the best approach, I am thinking of creating a CSV file that covers all possible minutes in the historical data base, and use that as reference symbol. That way I will avoid cases where my gaps in EURUSD data affect other symbols.

Below are 2 pictures that I hope clarify what I'm talking about. Thanks in advance for any comments or suggestions.



Your database is a total mess. If you are mixing EOD and Intraday data in the database you MUST turn on "Allow mixed intraday/EOD data". This is obligatory, but your screenshot shows that you have it unchecked. That is wrong. Also wrong are Session start/end times (they MUST NOT be all set to zero)
Carefully and slowly read this:

Thanks for the prompt reply, Tomasz!

I did read that article when initially setting up the database, and it allowed me to fix the alignment to stock market times, so that you for writing it with such detail.

I think I need to give more context:

  • the database only has historical data, without any real-time plug-in used
  • the base time interval is 1 minute, and I only imported 1 minute data from CSV files
  • the symbols are for Forex, and they trade 24 hours a day, and I do have 24 x 5 quotes

So, with that context, I have 2 more questions:

  • if no filtering is used, then why should it matter that I have 00:00 or not in those fields?
  • since I only have 1-minute data bars in the database, does it matter what "allow mixing intraday/EOD data" is set to?

I verified that 1 daily candle is correctly formed, meaning it's Open, High, Low, Close price are those that come from the 1 minute bars, so that part is working well.