• A PriceLevels phase classifier from a calendar, so the four extended-hours levels need no host code: a bar in the pre-open reads pre, and so on. Extended hours of their own, closed hours and holidays read as unknown, since those levels describe the hours either side of one session.

    The levels ask about every bar of a session on every frame, so the spans of about a week are kept and walked in time order, and the calendar is asked again only when a bar falls outside them. A calendar that cannot answer leaves the phase unknown rather than stopping the frame.

    Parameters

    Returns MarketPhaseFn