Skip to main content

Module tpo

Module tpo 

Source
Expand description

TPO (Time Price Opportunity) / Market Profile chart model.

Market Profile charts show price distribution over time by placing a letter (A, B, C, …) at each price level touched during successive time periods (typically 30-minute brackets). The resulting profile reveals key structural levels:

  • POC (Point of Control) – price with the most TPOs.
  • Value Area – price range containing the configured share of TPO activity.
  • Initial Balance – range established during the configured opening period.
  • Single Prints – levels touched during only one TPO period.

Use to_tpo_profiles to transform OHLCV bars into per-session TPOProfiles.

Structs§

TPOConfig
Configuration for TPO chart generation and rendering.
TPOLetter
A single TPO letter placed at a price level during one time period.
TPOProfile
A complete TPO profile for one trading session.

Enums§

ProfileShape
Market profile shape classification.
SessionType
Session classification for splitting TPO profiles.
TPOColorMode
Color-mapping strategy for TPO letters/blocks.
TPODisplayMode
How to render TPO entries on the chart.

Functions§

derive_tick_size
Derive a sensible TPO row size (price-bin height) from a price range and a target number of rows.
to_tpo_profiles
Transform bars into TPO profiles