Setting Up AmiBroker and IQFeed on a New Computer

Two databases, set up the right way from the start - one for backtesting, filled by ASCII import, and a small one for real-time trading
Published Nov 15, 2026 | Amibroker

Moving to a new computer is the best time to set AmiBroker up the way you'd do it if you were starting over. The most important decision is the databases: use two of them, not one.

  • The backtesting database holds lots of data: years of 1-minute bars for every symbol. It doesn't need to be fast.
  • The real-time database holds only the bars your strategies need to calculate their filters. It needs to be fast.

When you're backtesting, time is not of the essence. When you're trading in real time, a signal you can't generate in time to take the trade is worse than worthless. A single large database used for both makes real-time trading slow: explorations crawl, charts load slowly, and everything else on the machine slows down with them.

Start with the backtesting database

If you're just getting started, set up only the backtesting database. It's a lot less complicated: no data plugin, no real-time feed, just data you download and import.

Wait until you have a strategy you want to trade in real time. That's a very reasonable choice, and only then do you need to set up the real-time database and IQFeed.

What to install

For backtesting:

  • AmiBroker Professional Edition, 64-bit. Professional gives you the multi-threaded analysis window, automatic MFE/MAE in backtests and Wait for backfill in analysis windows, which real-time trading relies on. The 64-bit version matters for backtesting lots of symbols. Ultimate adds nothing you need.
  • A Massive subscription with flat files, for the backtesting data.

When you're ready to trade in real time, add:

  • IQFeed with a valid login.
  • The IQFeed plugin for AmiBroker. Use a version with the bad tick filter, which filters ticks in real time the way IQFeed builds its historical bars, so charts don't show wicks that vanish on a Force Backfill. It's on the AmiBroker forum.

The backtesting database

Create it as a local database, with no data plugin, and a base time interval of 1 Minute. Fill it with the Massive Flat Backfiller and File > Import ASCII..., step by step, in Downloading Massive Data into AmiBroker.

Massive is the data I prefer for the backtesting database. The big advantage is that its bars can be adjusted for splits with the backfiller's --adjust option, so a stock's history before a split lines up with its prices after it. If you already have IQFeed, the IQFeed Backfill Tool fills the same kind of database: see Backfilling Historical Data with IQFeed.

A local database ignores the Number of bars setting. That setting only tells a data plugin how many bars to request when it backfills a symbol. The backfill tools instead download every symbol from the same start date, so the oldest data isn't sparse: each symbol goes back to the same date, if it traded then, however many bars that is.

Only load the years you backtest. A backtest reads every bar in the database, even when its Range is a single day, so 25 years of bars when you only test 10 makes every backtest slower for nothing. If your computer can't handle a full-size backtest, split the data across databases by years (say, 5 years each), run the backtest on each and merge the CSV files.

The real-time database

Once you have a strategy to trade, create it with the IQFeed plugin as its data source and a base time interval of 1 Minute.

How many bars

Set Number of bars to just enough to calculate the longest-term filter across all your strategies. No more.

Count the pre- and post-market: between the 4am pre-market open and the 8pm post-market close there can be up to 960 1-minute bars a day. So if the longest filter you use is the change from the 10-day SMA, you need at least 960 × 10 days = 9,600 bars.

If there aren't enough bars, the filter's values come out blank, so it's easy to spot when you need more.

The setting is a number of bars, not minutes. A symbol that trades every minute, like SPY, reaches back fewer days with the same number of bars than a symbol that trades less often.

Changing it later

Don't change Number of bars on a database you've already created; create a new database instead. The setting only affects how many bars a backfill requests:

  • Increasing it doesn't add history to symbols already backfilled. A backfill only fills in bars newer than the latest one it has.
  • Decreasing it doesn't remove old bars or free disk space.

Keep the symbol list small

The fewer symbols an exploration scans, the faster it finishes. Use a scanner to narrow the universe down to the symbols worth looking at, and point your exploration's Apply to at that watch list. Using Trade-Ideas for Real-Time Trading in AmiBroker shows how to sync Trade Ideas alerts with an AmiBroker watch list.

Check Wait for backfill in the analysis windows you trade from, so a symbol's bars are filled in before the exploration calculates its signals.

When a backfill hangs, see Troubleshooting IQFeed.

Opening a database from the command line

AmiBroker can open a specific database when it starts, which is handy for a shortcut per database:

"C:\Program Files\AmiBroker\Broker.exe" /database "E:\AmiData\realtime01"