A bar is a summary: an open, a high, a low and a close, with no record of what happened in between. A backtest that runs on bars has to guess the path inside each one, such as whether a bar that touched both your stop and your target hit the stop first. AlgoLift doesn't guess. It replays every print and builds your bars from them, so the bars your rules read and the prices your orders fill at come from the same record.
What a print is
A print is one resting order filled on the exchange: its time to the nanosecond, its price, its size and the side that was filled. An aggressive order that sweeps three resting orders leaves three prints, and an opening or closing auction leaves one print at the auction's price and size. A quote that changes without a trade isn't a print.
Time bars
A time bar holds every print in a fixed span: the first is its open, the highest its high, the lowest its low, the last its close, and their sizes add up to its volume. Choose the span in Run settings, under each data series: from 5 seconds to 30 days, with presets from 1 minute to 1 week.
- The grid starts at midnight UTC. Bars of an hour or less line up with New York's hours. Longer bars shift by an hour against New York time when daylight saving changes.
- A 1-day bar is a UTC day, from 19:00 or 20:00 New York time to the same time the next day: not the futures session, and not the stock market's day.
- A bar exists only if something traded in it. A quiet minute leaves no bar.
Tick bars
A tick bar holds a fixed number of prints, up to 5,000. Busy markets make them quickly and quiet ones slowly, so they track activity rather than the clock.
- Futures start counting afresh when the session opens at 18:00 New York time, after the daily halt.
- Stocks count on without a break, from the first print the month loads. Because of that, a stock's tick bars can differ slightly between runs over different dates.
When a bar is closed
Your rules read the last completed bar. On your main market, a bar counts as closed when the next one starts; on a second market's time bars, when its time is up. The live price is the exception: it reads each print as it happens.
So a rule built only from bars acts on the first trade after a bar closes. A rule that includes the live price can act inside a bar, and so can a Crossover or a Time Window set to its Intrabar clock.
Orders work on prints, not bars: a stop or a target is checked against every print after the entry, so the tape decides which is hit first. Only when both are crossed on the same print does the stop win.
Other bars you'll see
The engine's bars are built fresh for each run. Two other sets of bars serve faster tools, and can differ from them:
- Research bars behind the Inspector's meters and Signal Research: 1, 5, 15, 30 and 60-minute bars, adjusted for rolls and splits as the engine's prices are.
- Preview bars: recent bars of the market, not adjusted for rolls or splits, at the nearest stored size to yours.