Skip to main content

OrdferflowBarMetricsSignal

Evaluates order flow metrics of a footprint bar (volume, delta) against thresholds. All conditions must be met (AND logic) for the signal to fire. The direction is fixed at construction.

Namespace: MZpack.NT8.Algo.Signals Inheritance: OrdferflowBarMetricsSignal : Signal Data source: Level1 | Calculate: OnBarClose Indicator: StrategyFootprintIndicator Source: [INSTALL PATH]/API/Signals/OrderflowBarMetricsSignal.cs

Class name

The class name contains a typo (Ordferflow instead of Orderflow) in the source code. Use the exact name OrdferflowBarMetricsSignal when referencing this class.

Constructor

new OrdferflowBarMetricsSignal(strategy, footprintIndicator, ago, barMetricsDesc)
ParameterTypeDescription
footprintIndicatorStrategyFootprintIndicatorFootprint indicator instance (required)
agointBars ago to evaluate (0 = current bar)
barMetricsDescOrderflowBarMetricsDesc[]Array of metric descriptors

Signal Logic

The signal retrieves the footprint bar from StrategyFootprintIndicator.FootprintBars and evaluates each metric. If any condition fails, the signal returns no direction. When all conditions pass, it returns the allowed direction configured in the descriptor. The signal does not produce an entry price.

OrderflowBarMetrics Enum

ValueDescription
VolumeTotal footprint bar volume
AbsDeltaAbsolute delta: `
DeltaPercentDelta as a percentage of volume (absolute value)

MinMax Enum

ValueDescription
MinValue must be >= threshold
MaxValue must be <= threshold

Example

var fpIndicator = new StrategyFootprintIndicator(strategy);

var desc = new OrderflowBarMetricsDesc[]
{
new OrderflowBarMetricsDesc
{
OrderflowBarMetrics = OrderflowBarMetrics.Volume,
MinMax = MinMax.Min,
Value = 1000
},
new OrderflowBarMetricsDesc
{
OrderflowBarMetrics = OrderflowBarMetrics.DeltaPercent,
MinMax = MinMax.Min,
Value = 30
}
};

var signal = new OrdferflowBarMetricsSignal(strategy, fpIndicator, 0, desc);

pattern.Signals.Root.Add(signal);