Follows a strategy's bars and says which bar opens its session and which closes it, by the session window, whatever the bar interval.
More...
Follows a strategy's bars and says which bar opens its session and which closes it, by the session window, whatever the bar interval.
Bar-driven: a bar is known at its period end, so the bar that opens a session is known at the end of its first period (a minute after the open on minute bars, at the close on a daily bar), and the bar that closes it at the close or after. A session with no bar reaching its close has no closing bar. A daily bar is both the opening and the closing bar of its session; a daily bar stamped at the open (a point) before one stamped at the close opens the session, and the second closes it.
Which minute bar closes depends on its stamp: of start-stamped KRX minute bars, the 15:29 bar (its period, 15:29 to 15:30, holds the close), and the 15:30 auction bar after it closes nothing more; of end-stamped ones, the bar stamped 15:30. Bars wholly before the open or after the close count in outside() and close nothing. Under the KRX window a close-stamped daily bar at midnight UTC is a point at the open (09:00 KST), which opens the session and closes nothing; one at midnight KST ends before its session opens and is neither edge.
Feed it the bars of one series, or the first bar of each BarSlice (one interval), in time order.
Definition at line 450 of file event.hpp.