Skip to main content

ChartProfilesModel

ChartProfilesModel manages the collection of volume profiles for a chart indicator. It controls when new profiles are created through creation mode delegates. StackedProfileModel extends it for stacked (overlapping) profiles.

Namespace: MZpack Inheritance: ChartProfilesModel : Model | StackedProfileModel : ChartProfilesModel Source: MZpackBase/mzVolumeProfile/ChartProfilesModel.cs, MZpackBase/mzVolumeProfile/StackedProfileModel.cs

warning

Do not modify ChartProfilesModel directly — use the indicator interface (IVolumeProfileIndicator) to read and manage profiles.

Properties

PropertyTypeDescription
ProfilesList<IModelItem2>All profiles in the model
SlotintProfile slot index
TicksPerLevelintLevel aggregation
ProfileTypeProfileTypeDisplay type: TPO, VP, VP_TPO, None
CreationProfileCreationCreation mode
CreationValueintThreshold for the creation mode
VWAPModeVWAPModeVWAP calculation mode
HasTPOboolWhether TPO data is being calculated
HasVPboolWhether volume profile data is being calculated

Creation Delegates

The model uses two delegates to determine when to create a new profile:

  • IsAddModelItemOnDataItemDelegate — evaluated per bar; returns true to start a new profile
  • IsAddModelItemOnDataEventDelegate — evaluated per market data event; returns true to start a new profile

The active delegate depends on the ProfileCreation mode. Time-based modes (Session, Daily, Weekly) use the data item delegate. Volume-based modes (Volume, Delta, Tick) use the data event delegate.

ProfileCreation Enum

Controls how profiles are segmented. Set via IVolumeProfileIndicator.ProfileCreation.

ValueDescription
CustomUser-defined profile boundaries
CompositeComposite profile across the entire chart
ContinuousSingle continuous profile that grows indefinitely
SessionOne profile per trading session
SessionsOne profile per N sessions
BarOne profile per bar
BarsOne profile per N bars
DailyOne profile per day
DaysOne profile per N days
WeeklyOne profile per week
WeeksOne profile per N weeks
MonthlyOne profile per month
MonthsOne profile per N months
QuarterlyOne profile per quarter
YearlyOne profile per year
VolumeNew profile when total volume reaches threshold
DeltaNew profile when absolute delta reaches threshold
TickNew profile when tick count reaches threshold
RTH_ETHSeparate profiles for Regular and Extended Trading Hours
NoneNo automatic profile creation

StackedProfileModel

StackedProfileModel extends ChartProfilesModel to support up to 3 overlapping profiles on the same chart. Each stacked profile has independent creation settings.

PropertyTypeDescription
StackedProfileIModelItem2The current stacked profile
AgointProfile offset (0 = current)
LastNintNumber of historical profiles to keep
public enum ProfileType { TPO, VP, VP_TPO, None }

public enum VWAPMode { Last, Dynamic, DynamicStdDev1, DynamicStdDev2, None }

See Also