Skip to main content

IVolumeProfileIndicator

IVolumeProfileIndicator provides programmatic access to the mzVolumeProfile chart indicator. It exposes the collection of volume profiles, profile creation settings, stacked profiles, and TPO configuration.

Namespace: MZpack Inheritance: IVolumeProfileIndicator : ITickIndicator, ILevelsIndicator, IIndicator Source: MZpackBase/mzVolumeProfile/IVolumeProfileIndicator.cs

note

ILevelsIndicator is conditionally included (non-FREE builds only), adding interactive price level support.

Key Data Properties

PropertyTypeDescription
ProfilesIEnumerable<IModelItem2>All volume profiles in the indicator

Key Data Methods

MethodReturn TypeDescription
GetProfileByTIndex(int TIndex)IVolumeProfileGet profile by T-index
GetProfile(int index)IVolumeProfileGet profile by sequential index
GetStackedProfile(int n)IVolumeProfileGet stacked profile (1, 2, or 3)
AddProfile()IVolumeProfileAdd a new empty profile
RemoveProfile(IVolumeProfile profile)voidRemove a profile
StackedProfileIsPresent(int index)boolCheck if stacked profile exists
RefreshModel(RefreshModelArgs args)voidForce a model refresh

Profile Creation Properties

PropertyTypeDescription
ProfileCreationProfileCreationCreation mode (Session, Bar, Volume, etc.)
CreationValueintThreshold value for the creation mode
ShowProfileTypeProfileTypeDisplay type: TPO, VP, VP_TPO, or None
ProfileModeProfileModeProfile mode
ProfileAccuracyProfileAccuracyTick or Minute accuracy
ProfilePresentationProfilePresentationVisual presentation
SessionBreakboolBreak profile on session boundary
ShowLastProfilesCountintNumber of recent profiles to display

Trading Hours Properties

PropertyTypeDescription
RTH_BeginTimeSpanRegular Trading Hours start
RTH_EndTimeSpanRegular Trading Hours end
ETH_EnableboolEnable Extended Trading Hours
ETH_BeginTimeSpanExtended Trading Hours start
ETH_EndTimeSpanExtended Trading Hours end

Value Area and VWAP Properties

PropertyTypeDescription
VAPercentagefloatValue Area percentage (e.g. 0.70)
Sigma1doubleFirst standard deviation multiplier
Sigma2doubleSecond standard deviation multiplier
VWAPModeVWAPModeVWAP mode: Last, Dynamic, DynamicStdDev1, DynamicStdDev2, None
POCModeLevelModePOC display mode
VAHVALModeLevelModeVAH/VAL display mode
DevelopingTickPOCboolShow developing Tick POC
TicksPerLevelintNumber of ticks per level

LVN/HVN Properties

PropertyTypeDescription
DetectionLVNHVNDetectionDetection method — PercentOfPOC or LocalExtrema
DetectionNeighborsintNumber of neighbors on each side for LocalExtrema detection
LVNModeNodeLevelModeLVN display mode
LVNThresholdfloatLVN threshold as percent of POC volume
LVNMaxCountintMaximum number of LVN levels
LVNEndOfSessionboolStop naked LVN lines at session boundary
LVNLevelsValuesModeLevelsValuesModeValues displayed at LVN levels
HVNModeNodeLevelModeHVN display mode
HVNThresholdfloatHVN threshold as percent of POC volume
HVNMaxCountintMaximum number of HVN levels
HVNEndOfSessionboolStop naked HVN lines at session boundary
HVNLevelsValuesModeLevelsValuesModeValues displayed at HVN levels

Stacked Profiles Properties

PropertyTypeDescription
StackedProfileCreationProfileCreation[]Creation modes for 3 stacked profiles
StackedShowProfileTypeProfileType[]Display types for stacked profiles
StackedCreationValueint[]Creation thresholds for stacked profiles
StackedProfileModeProfileMode[]Modes for stacked profiles
StackedProfilePresentationProfilePresentation[]Presentations for stacked profiles
StackedPOCVAHVALModeLevelMode[]POC/VAH/VAL modes for stacked profiles
StackedProfileShowDeltabool[]Show delta for stacked profiles

TPO Properties

PropertyTypeDescription
TPOLetterPeriodintMinutes per TPO letter
TPOPresentationTPOPresentationTPO visual style
TPOShowIBboolShow Initial Balance
TPOIBPeriodintInitial Balance period in minutes
TPOShowHalfbackboolShow halfback level
TPOSplitboolSplit TPO display
TPO_VAPercentagefloatTPO Value Area percentage

Example: Read Profile Data

IVolumeProfileIndicator vpIndicator = ...;

// Get the most recent profile
IVolumeProfile profile = vpIndicator.GetProfile(0);

// Read key levels
double poc = profile.POC;
double vah = profile.VAH;
double val = profile.VAL;
double vwap = profile.VWAP;
long totalVolume = profile.Volume;

// Standard deviations
double upperDev1 = profile._1StdDeviationPos;
double lowerDev1 = profile._1StdDeviationNeg;

// Check stacked profile
if (vpIndicator.StackedProfileIsPresent(1))
{
IVolumeProfile stacked = vpIndicator.GetStackedProfile(1);
double stackedPOC = stacked.POC;
}

See Also