Skip to main content

Tick & ITrade

Low-level types representing individual market ticks and trade data.

Namespace: MZpack

Tick (struct)

A single market tick with price, volume, and bar context.

FieldTypeDescription
PricedoubleTick price
VolumelongTick volume
BarIdxintBar index where the tick occurred
IsFirstTickOfBarbooltrue if this is the first tick of the bar

TickVolume (struct)

Breakdown of volume components for a single tick/price level.

FieldTypeDescription
VolumelongTotal volume
IcebergVolumeintHidden (iceberg) volume detected
DomPressureVolumeintDOM pressure volume
MarketLimitVolumeintLimit portion of Market-Limit orders

ITrade (interface)

Contract for a trade entity — either a single execution or a reconstructed aggregate trade.

Identification

PropertyTypeDescription
IdlongUnique trade identifier (immutable during indicator load-unload cycle)
SideTradeSideTrade side: Ask, Bid, or NA
TimeDateTimeTrade timestamp
Reconstructedbooltrue if the trade is reconstructed from multiple executions
SmartboolSmart order flag

Price & Volume

PropertyTypeDescription
VolumelongTotal trade volume
IcebergVolumeintIceberg volume component
DomPressureVolumeintDOM pressure volume component
DomSupportVolumeintDOM support volume component
StartPricedoubleTrade entry price
StopPricedoubleTrade exit price
HidoubleHighest price level
LodoubleLowest price level
POCdoublePoint of Control (price with highest volume)
RangeTicksintNumber of distinct price levels

Bar Context

PropertyTypeDescription
StartBarIdxintBar index where trade began
StopBarIdxintBar index where trade ended
HiBarIdxintBar index with highest price
LoBarIdxintBar index with lowest price

Data

PropertyTypeDescription
TicksList<Tick>Individual ticks composing the trade
TickProfileDictionary<double, long>Price-to-volume mapping
TradesDictionary<long, ITrade>Sub-trades (for reconstructed trades)
ViewITradeViewChart visualization

Methods

MethodReturnsDescription
Equals(ITrade)boolCompare trades by Id

TradeSide Enum

ValueDescription
AskAsk-side (buy) trade
BidBid-side (sell) trade
NASide not applicable