Skip to content

Bar Replay and Simulated Practice

Nine parts of this course have described real-time markets: the architecture, the providers, the intraday database, sessions and time zones, live charts, the quote window, real-time AFL, repeat scanning and alerts. Almost all of it assumed a feed that many readers of this course do not have and should not buy yet. This part is where that debt is settled.

Bar Replay plays your existing database back to you one bar at a time. Every formula in AmiBroker sees only the bars up to the playback position, exactly as it would have on the day. A chart under replay is indistinguishable from a live chart, and so is the uncomfortable feeling of having to decide something without knowing what the next bar does. It costs nothing, it needs no subscription, and it runs in both editions.

That makes it the backbone of the Level A path for the whole real-time track. It is also the single most over-claimed tool in retail trading education, so this part spends as much effort on what replay cannot show you as on how to drive it.

Three pages, one lesson and two laboratory exercises.

The lesson establishes the mechanics — where the tool lives, what pressing each button actually does to your data, how GetPlaybackDateTime() lets a formula know it is being replayed — and then sets out, in specific terms, everything replay does not simulate: the spread you would have crossed, the fill you would have received, the slippage, the gap through your stop, the outage, and the fact that you may already know how the session ended.

The two exercises are the practice itself. They are not “open a chart and have a look”. Each has a defined setup, a log sheet with named fields, a fixed set of decision points, a debrief with questions that have right and wrong answers, and a self-scoring scheme that measures process rather than profit. Working through one properly takes about forty-five minutes; working through one carelessly takes ten and teaches nothing.

The first exercise is about reading market structure and watching an indicator update under uncertainty. The second is about running your own scanner and alert formulas against a replayed intraday session and discovering, in private, the things that would otherwise have surprised you in public: the alert that fires three times, the alert that never fires at all, the higher-timeframe filter that behaves differently when the daily bar is only half formed.

Any edition of AmiBroker, and any database you already have. Bar Replay is not gated behind the Professional edition and does not require a data plugin of any kind.

Daily bars are enough for the first exercise. The second is written for intraday bars and is better with them, but it degrades gracefully: every step names what to do if the finest data you have is end-of-day, and the debrief works either way. If you built a database in Part 19, use it. If you did not, Part 18’s free and end-of-day sources will give you something to replay this afternoon.

You will also need somewhere to write. The log sheet is the exercise. A replay you did not record is an anecdote.

It will not tell you that you are ready to trade. Replay produces a sample of one session, chosen by you, with no costs subtracted, in conditions you controlled, with the ability to pause. That is a rehearsal, and rehearsals are valuable — but the question “does this rule have an edge” is answered by the portfolio backtesting, walk-forward and Monte Carlo machinery in Parts 28 to 33, on hundreds of instruments and thousands of trades, with costs and assumptions written down. Replay and backtest answer different questions and neither substitutes for the other.

It will also not teach automated execution. This course ends where it has always said it ends: an alert, a human reading it, a decision.

Read the lesson first and set up the replay clock formula from it, because both exercises assume you can tell at a glance whether replay is driving your charts. Then do the first exercise on a symbol and a date you have never studied. Then the second, on a different symbol.

Do the debriefs on the same day, while you still remember what you were thinking. Keep the score sheets. When you come back to this part after Part 33, score yourself again on a fresh session and compare — that comparison is worth more than either individual score.

Part26 of 36Level5 — Real-Time AmiBroker UserPages3Estimated time2.0 hours

0 / 3 lessons in this part completed