PriceProfile
Where recent closes piled up: the busiest price level and how crowded the current price is.
PriceProfile cuts price into fixed bins, bin_size wide (0.5 dollars by default), and counts how many of the last window bars (1000 by default) closed in each bin. It reports four values: visits in the bin the current price sits in, the centre price of the most-visited bin (the point of control), that bin's visit count, and how many different bins the window touched. Only each bar's close is counted, not its high-to-low range or its volume.
How to read it
- The POC price line is drawn on the price chart. It marks the level where the window's closes bunched up most, and it steps when another level takes over.
- In the panes below, high visit counts mark a dense zone where price has spent a lot of recent time. A count of 1 means the current price is at a level the window has never visited.
- Early on the chart the window is not full, so values cover fewer bars than the setting says. With defaults, 1000 one-minute bars is about 2.5 regular US sessions.
What it outputs
- Current bin visits
- Closes in the window that landed in the same bin as the current price, counting the current bar. On the default sample it ran from 1 to 418, median 76.
- POC price
- Centre price of the most-visited bin in the window, the point of control. On the default sample it stayed between 757.25 and 774.25, with correlation 0.74 to the close.
- POC visits
- Closes in the point-of-control bin. Never below the current bin's count, since the POC is the busiest bin. Median 229 on the default sample.
- Bins visited
- How many different bins the window's closes landed in. Low values mean price has stayed in a narrow band. The default sample ran from 1 to 29, median 14.
Settings
- bin_size
- Width of each price bin in dollars. Raising it (2, say) pools closes into fewer, wider bins, so visit counts grow and the POC becomes a broad zone. Lowering it (0.1) splits closes into narrow levels, so counts thin out and the POC is one sharp price.
- window
- Number of recent bars counted. Raising it (5000, say) gives a slower, longer-history profile with larger counts and a steadier POC. Lowering it (60, about one hour) makes the profile local, so the POC and counts swing quickly as old bars drop out.
Pitfalls
- Only closes count, one per bar. A bar's full range and its volume are ignored, so this is a histogram of closes, not a volume profile.
- The POC is the current maximum, not a stable level. When the busiest bin's visits age out of the window, the POC jumps to whichever bin is busiest now, even if price is far from it.
- A bin_size of 0 raises a division-by-zero error, although the parameter's range includes it. Negative values work but flip which edge each bin includes. Counts depend on bin_size, so compare readings only at one setting.