src/Deepdom/Profile/ProfilePoc.cs
The point of control and the value area of the volume profile of the session, as horizontal lines on the price.
What it shows
DailyProfile, the volume by price of the session.HorizontalLineannotations extended to the right edge of the chart.OnEndfor what depends on the whole session.
How it works
The lines are created once per load and moved as the profile changes:OnEnd reads the profile from the lowest price up, finds the level with the most volume and grows the value area from it until it holds the wanted share of the volume:
Things to notice
- The profile is a snapshot of the whole session: during the history it already holds the trades after the current bar. That is why the indicator works in
OnEnd, which describes the session as it is now, and not bar by bar. OnOpenCallis set even ifOnOpenis not overridden: an indicator which asks forOnEndalone would not getOnInitandOnLoad.- The price of a level comes from
FromPinT(level.PriceInTicksLow).
Try
- Add the volume weighted average price of the session as a fourth line.
- Draw the profile itself with one
Rectangleper level, in a vertical area created withVbk.AddCA(true, ...).