Skip to main content

IFootprintBar / ISession

IFootprintBar represents a single footprint bar with per-price-level bid/ask volumes, delta, imbalance, absorption, and bar statistics. ISession extends IFootprintBar with session-level aggregations.

Namespace: MZpack Inheritance: IFootprintBar : IModelItem, IBaseVisual Source: MZpackBase/mzFootprint/IFootprintBar.cs

OHLC and Time Properties

PropertyTypeDescription
OpendoubleBar open price
ClosedoubleBar close price
HidoubleBar high price
LodoubleBar low price
TimeDateTimeBar close time
OpenTimeDateTimeBar open time
BarIdxintBar index in the chart
RangeTicksintBar range in ticks
RangeLevelsintNumber of price levels in the bar
DurationMsdoubleBar duration in milliseconds
IsFirstBarOfSessionboolWhether this bar starts a new session

Volume and Delta Properties

PropertyTypeDescription
VolumelongTotal volume
BuyVolumelongBuy (ask) volume
SellVolumelongSell (bid) volume
DeltalongDelta (BuyVolume - SellVolume)
POCdoublePoint of Control price
POCVolumelongVolume at POC
POCVolumeslong[]POC volumes for left/right footprint
VAHdoubleValue Area High
VALdoubleValue Area Low
TradesNumberlongNumber of trades
TradesNumbersSortedDictionary<double, int>Trade count per price level
SessionISessionParent session

Per-Level Data

PropertyTypeDescription
VolumesSortedDictionary<double, long>Total volume at each price level
BuyVolumesSortedDictionary<double, long>Buy volume at each price level
SellVolumesSortedDictionary<double, long>Sell volume at each price level
DeltasSortedDictionary<double, long>Delta at each price level

Advanced Delta Properties

PropertyTypeDescription
MinDeltalongMinimum delta reached during bar
MaxDeltalongMaximum delta reached during bar
DeltaPercentagedoubleDelta as percentage of volume
AbsoluteDeltaAveragelongAverage absolute delta per level
DeltaCumulativelongCumulative delta from session start
DeltaChangelongDelta change from previous bar
DeltaRatelongDelta rate of change
COTHighlongCOT value at bar high
COTLowlongCOT value at bar low
RatioNumbersdoubleRatio of buy to sell trade counts
UnfinishedAuctionHighdoubleUnfinished auction at high
UnfinishedAuctionLowdoubleUnfinished auction at low

Imbalance and Absorption

PropertyTypeDescription
ImbalancesSortedDictionary<double, long>[]Imbalance levels [0]=buy, [1]=sell
BuyImbalanceCountintNumber of buy imbalance levels
SellImbalanceCountintNumber of sell imbalance levels
AbsorptionsSortedDictionary<double, long>[]Absorption levels [0]=buy, [1]=sell
BuyAbsorptionCountintNumber of buy absorption levels
SellAbsorptionCountintNumber of sell absorption levels
ImbalanceSRZonesIBarSRZonesImbalance-based S/R zones
AbsorptionSRZonesIBarSRZonesAbsorption-based S/R zones

Predicted Values

These properties extrapolate current bar data to estimate final values:

PropertyTypeDescription
VolumePredictedlongPredicted total volume
BuyVolumePredictedlongPredicted buy volume
SellVolumePredictedlongPredicted sell volume
DeltaCumulativePredictedlongPredicted cumulative delta
TradesNumberPredictedlongPredicted trade count
VolumePerSeconddoubleCurrent volume rate
VolumePerSecondPredicteddoublePredicted volume rate

Bar Direction Methods

MethodReturn TypeDescription
IsBullish()boolClose > Open
IsBearish()boolClose < Open
IsDoji()boolClose == Open

Example: Iterate Over Footprint Levels

IFootprintBar bar = footprint.FootprintBars[CurrentBar];

// Read each price level
foreach (double price in bar.Volumes.Keys)
{
long totalVol = bar.Volumes[price];
long buyVol = bar.BuyVolumes.ContainsKey(price) ? bar.BuyVolumes[price] : 0;
long sellVol = bar.SellVolumes.ContainsKey(price) ? bar.SellVolumes[price] : 0;
long delta = bar.Deltas.ContainsKey(price) ? bar.Deltas[price] : 0;
}

// Check imbalance levels
if (bar.BuyImbalanceCount >= 3)
{
// Stacked buy imbalances — aggressive buying
foreach (var kvp in bar.Imbalances[0]) // [0] = buy side
{
double price = kvp.Key;
long volume = kvp.Value;
}
}

ISession

ISession extends IFootprintBar with session-level aggregated data. A session represents a full trading session (defined by Trading Hours) and inherits all footprint bar properties — its Volume, Delta, POC, etc. are aggregated across all bars in the session.

Inheritance: ISession : IFootprintBar Source: MZpackBase/mzFootprint/ISession.cs

Session-Specific Properties

PropertyTypeDescription
BeginTimeDateTimeSession start time
EndTimeDateTimeSession end time
BeginBarIdxintFirst bar index in the session
EndBarIdxintLast bar index in the session
POCsSortedDictionary<int, double>Developing POC by bar index
VAHsSortedDictionary<int, double>Developing VAH by bar index
VALsSortedDictionary<int, double>Developing VAL by bar index
DeltasCumulativeSortedDictionary<int, long>Cumulative delta by bar index

Example: Read Session Data

ISession session = footprint.GetSession(DateTime.Now);

// Session-level aggregates (inherited from IFootprintBar)
double sessionPOC = session.POC;
double sessionVAH = session.VAH;
double sessionVAL = session.VAL;
long sessionDelta = session.Delta;
long sessionVolume = session.Volume;

// Developing POC history
foreach (var kvp in session.POCs)
{
int barIdx = kvp.Key;
double pocAtBar = kvp.Value;
}

See Also