The trading engine hierarchy is organized by context. That is, the main offspring nodes—current, last, and exchange orders—describe the context in which their respective offspring live.
For example, the concept of an episode—a whole run of the trading bot— exists only in the context of the current episode, as the system keeps track of one episode at the time only.
However, the concept of a position is tracked both as the current position and the last position. This is possible because the system keeps track of all positions occurring within an episode.
The two concepts that describe a temporal context are current and last, and are covered in the following pages.