Creating an Intraday AmiBroker Database
Almost everything in AmiBroker can be undone. You can change a formula, delete a watch list, rearrange a layout, switch data sources, and nothing is lost that cannot be rebuilt in a minute. This part is about the handful of decisions that do not work like that.
The first of them is the base time interval. It is a combo box, it takes four seconds to set, and it determines the finest bar your database will ever be able to show you. Not today — ever. You can compress one-minute bars into five-minute bars, five-minute bars into hourly bars and hourly bars into daily bars, on the fly, at any time, for free. You cannot go the other way. A five-minute bar has already thrown away the information that would tell you what happened in its first minute, and no setting, licence or subscription puts that back.
The second is the number of bars per symbol. It looks like a performance tuning knob. It is really a history limit, expressed in the one unit that does not correspond to anything a trader thinks in, and it is the single most common cause of intraday history that quietly stops part-way back.
What this part builds
Section titled “What this part builds”By the end of it you will have an intraday database you understand rather than one you clicked through: a base interval you can defend, a bar count you sized from arithmetic instead of from a forum post, session and time-shift settings that match the instruments in it, and a completeness check you can run on any database, at any interval, on any exchange, to find out what is actually in there.
What decides what your intraday database can answer
- The question you can askOpening-range breakouts? Tape reading? Hourly regime?
- Chart and Analysis intervalAny interval at or above the base interval, compressed on the fly
- Session filtering and time shiftWhich stored bars are shown, and what clock their timestamps are onchangeable
- Bars actually stored per symbolNumber of bars to load, and how much the vendor was willing to backfillfixable, painfully
- Base time intervalThe finest grain that will ever exist in this databasenot fixable
Why this part sits where it does
Section titled “Why this part sits where it does”Part 17 established the architecture — exchange, vendor, plug-in, database, AFL — and Part 18 worked through who sells what. This part is the layer where those decisions become physical: bytes on your disk, in a directory, at a grain you chose. Parts 20 to 26 all assume it. Session boundaries, real-time charts, intraday scanning and Bar Replay are all operations on the database you build here, and every one of them fails in a confusing way if the database underneath is wrong in a way you have not noticed.
That is the reason for the challenge in the middle of this part. Incomplete intraday history does not announce itself. Charts look right, indicators compute, explorations return rows. The damage only shows up as a backtest whose earliest trade is six weeks later than the range you set, or an opening-range rule that mysteriously produces nothing on a fifth of the days. Learning to detect that before it becomes a conclusion is worth more than any indicator in this course.
You do not need a subscription
Section titled “You do not need a subscription”Everything here can be done without paying anyone for data.
The base-interval reasoning is identical whether the bars arrive from a streaming plug-in or from a comma-separated file you import once. The settings lesson tells you plainly which controls do nothing at all in a local database, so you do not spend an evening tuning something inert. The challenge can be reproduced deliberately, from files, on your own machine. And the lab has two complete routes: one for readers with a live feed, and one — spelled out step by step, not gestured at — that builds the same database from historical intraday files and verifies it the same way.
How the five pages fit together
Section titled “How the five pages fit together”The first lesson is the one that cannot be un-learned: what the base interval controls, and why “I will change it later” is not a plan. The second walks the Database Settings and Intraday Settings dialogs control by control, including the ones that are silently inert in a local database. The third is about getting history in and keeping it correct — backfill on demand versus in bulk, vendor limits, removing bad bars, and what AmiBroker does and does not offer in the way of repair.
Then the challenge, which is a diagnostic exercise with real symptoms and staged hints rather than a quiz, and which leaves you with a completeness check you will keep using. Then the lab, which builds the whole thing.
Keep the record you started in Part 3 open while you work. This part adds five lines to it: base interval, number of bars, days-equivalent, session filtering mode and time shift. When something goes wrong in Part 20 or Part 24, those five lines are the first thing you will want.
0 / 5 lessons in this part completed
Progress tracking needs browser storage, which is unavailable here. The course works exactly the same without it.
- LessonThe Base Interval Decision28 min
- LessonIntraday Database Settings in Detail Pro28 min
- LessonBackfill and Database Maintenance Pro28 min
- ChallengeChallenge: The History That Is Not All There Pro40 min
- LabLab: Build an Intraday Market Database Pro50 min
Sources for this lesson
3 verified · checked 2026-08-31
- 01AmiBroker User's Guide — Database Settings windowamibroker.com/guide/w_dbsettings.html2026-08-31
- 02AmiBroker User's Guide — How to get quotes from various marketsamibroker.com/guide/h_quotes.html2026-08-31
- 03AmiBroker User's Guide — Performance tuning tipsamibroker.com/guide/x_performance.html2026-08-31
Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.