Skip to main content

Built-in Strategies

MZpack includes three built-in strategies for NinjaTrader 8: two trading strategies and one data export utility. All built-in strategies support Auto and Manual operating modes, the Control Panel, trading times, and logging.

Footprint Action Strategy

Footprint Action is an order flow strategy built entirely on the mzFootprint indicator. It provides 10 delta and order flow signals that can be combined using AND or OR logic to form trading patterns.

Signals

Each signal can be individually enabled or disabled. Every signal has its own bar filter overrides (Min bar Volume, Min bar Delta, Min bar Delta %) and can be marked as Mandatory (always required regardless of the tree logic).

SignalDescription
Delta DivergenceTrend reversal signal — price makes a new extreme while delta moves in the opposite direction
Delta TailBar has negative delta across all levels except the bottom (or vice versa), indicating absorption at the extreme
Delta Surge/Drop4-bar signal tracking consecutive increasing or decreasing delta, indicating momentum buildup
Delta Flip2-bar reversal signal showing a sudden delta shift from positive to negative (or vice versa)
Delta Trap3-bar signal identifying a delta reversal followed by renewed strength in the original direction
Delta SlingshotTrend reversal when an extreme delta reading gets overrun by the opposite extreme delta within a lookback range
Above/Below POCTrade when a bar opens and closes on the same side of its Point of Control
Stacked ImbalancesMultiple imbalances stacked at consecutive price levels (configurable number and direction)
Volume SequencingMultiple price levels with increasing volume, indicating large trader activity
Hammer with AbsorptionAbsorption (trapped sellers/buyers) detected in the wick of a hammer candle pattern

Bar Filters

Each signal applies bar-level filters to the bars it analyzes. The bars that filters apply to depend on the signal:

SignalMin bar VolumeMin bar DeltaMin bar Delta %
Delta DivergenceClosedClosedClosed
Delta TailClosedClosedClosed
Delta Surge/DropClosedClosedClosed
Delta FlipClosed, Closed-1Closed, Closed-1Closed, Closed-1
Delta TrapClosedClosed, Closed-1, Closed-2Closed
Delta SlingshotLookbackLookbackLookback
Above/Below POCClosedClosedClosed
Stacked ImbalancesClosedClosedClosed
Volume SequencingClosedClosedClosed
Hammer with AbsorptionClosedClosedClosed

"Closed" = the just-closed bar. "Closed-1" = one bar before. "Lookback" = all bars in the lookback range.

Signal Logic

  • AND — all enabled signals must validate in the same direction
  • OR — at least one signal must validate. Use Min # validated signals to require a minimum number (e.g., 2 of 5 enabled signals)

Each signal also has an Override filters option that lets it bypass the global bar filters when its own per-signal filters are configured.

Strategy Settings

SettingDescriptionDefault
Logic of signalsAND or OR combination of enabled signalsOR
Min bar VolumeGlobal minimum bar volume filter100
Min bar DeltaGlobal minimum absolute bar delta filter100
Min bar Delta %Global minimum bar delta percentage filter0
Min # validated signalsMinimum signals that must validate (OR mode only)0
Opposite Pattern ActionWhat to do when an opposite signal occurs while in a position: None, Close, or ReverseNone
Suspend after tradePause trading after a position is closed until manually re-enabledOff

Position Settings

SettingDescriptionDefault
DirectionAllowed trading direction: Long, Short, or AnyAny
Quantity (entries 1-3)Number of contracts per entry (up to 3 entries for scaling)1
Stop Loss (entries 1-3)Stop loss in ticks per entry20
Profit Target (entries 1-3)Profit target in ticks per entry40
Break-even afterMove stop to entry price after this many ticks of profit10
Break-even shiftTicks added to break-even stop (positive = additional profit)1
TrailEnable trailing stopOff
Trail after / distance / stepTrail activation threshold, trailing distance, and step size in ticks15 / 10 / 1
Enter by limit orderUse limit orders instead of market orders for entriesOff

Source Code

See Footprint Action Source Code for a developer-level walkthrough of the class structure, decision tree construction, all 10 signal implementations, and data export schema.


GhostResistance Strategy

GhostResistance is a reversal strategy that targets liquidity traps — situations where price pushes beyond support or resistance levels, triggering stop orders and breakout entries from trapped traders, then reverses sharply back into the prior value area.

The strategy combines absorption zones, big trade detection, bar metrics, and volume profile levels to identify these reversal setups.

How It Works

Short setup: Price spikes above resistance with aggressive buying. Absorption builds at the extreme as sellers absorb the buying pressure. Price reverses downward as trapped longs exit.

Long setup: Price drops below support with aggressive selling. Absorption builds at the extreme as buyers absorb the selling pressure. Price reverses upward as trapped shorts cover.

Confirmation Signals

GhostResistance uses AND logic — all enabled signal groups must confirm before a trade is taken. One entry per bar maximum.

Signal GroupDescription
Bar MetricsBar must meet minimum volume, delta, delta %, wick %, and optionally be a hammer pattern
AbsorptionAbsorption S/R zones from mzFootprint — configurable percentage, depth, consecutive levels, and zone volume
Big TradeSignificant trades detected by mzBigTrade — configurable minimum size, iceberg detection, and aggression (sweep) filter
Profile LevelsPrice must be approaching a volume profile level (session or weekly) from mzVolumeProfile — optional, can be disabled for pure order flow mode

Bar Metrics Settings

SettingDescriptionDefault
Min bar VolumeMinimum bar volume500
Min bar DeltaMinimum absolute bar delta20
Min bar Delta %Minimum bar delta percentage10
Min wick %Minimum wick size as percentage of bar range30
HammerRequire hammer candle patternOn

Absorption Settings

SettingDescriptionDefault
Absorption %Minimum absorption percentage threshold200
Absorption depthNumber of price levels to check for absorption2
ConsecutiveMinimum consecutive absorption levels required2
Zone volumeMinimum volume in the absorption S/R zone50

Big Trade Settings

SettingDescriptionDefault
Trade filterMinimum trade size (contracts)200
Iceberg filter: enableDetect iceberg ordersOn
Iceberg filterMinimum iceberg volume20
Aggression filter: enableRequire aggressive (sweep) tradesOn
Aggression filter, ticksMinimum sweep range in ticks3

Profile Levels Settings

When enabled, the strategy only takes trades near selected volume profile levels. Price must be within the approaching distance (in ticks) of a selected level.

Session levels (overnight and RTH):

SettingDefault
Overnight POCOn
Overnight VAH/VALOn
Overnight High/LowOn
RTH POCOn
RTH VAH/VALOn
RTH High/LowOn
Approaching distance8 ticks

Weekly levels:

SettingDefault
Weekly POCOn
Weekly VAH/VALOn
Weekly High/LowOn
Approaching distance20 ticks

RTH/ETH session times are configurable (default RTH: 08:30–15:15, ETH: 17:30–08:30).

Operating Modes

GhostResistance can be configured for different trading styles:

  • Level-based trap trading — profile levels enabled with stricter absorption and big trade thresholds for selective setups near key levels
  • Pure order flow reversals — profile levels disabled, relying only on absorption and big trade activity to identify turning points
  • Conservative mode — enable Wait for bar close for bar-close confirmation with higher thresholds for fewer, higher-quality trades

Position Settings

GhostResistance supports up to 3 entries for position scaling, each with independent quantity, stop loss, and profit target. The same break-even and trail settings apply to all entries.

SettingEntry 1Entry 2Entry 3
Quantity120 (disabled)
Stop Loss20 ticks20 ticks20 ticks
Profit Target40 ticks60 ticks80 ticks

Control Panel

The GhostResistance Control Panel provides runtime buttons:

ButtonAction
TradeToggle trading on/off (green = active)
Auto suspendPause trading after the next completed trade
Break EvenImmediately move stop loss to break-even on the current position
TrailToggle trailing stop on/off for the current position
CloseCancel pending orders and close the current position

Best Market Conditions

  • Rotational or range-bound sessions with defined support/resistance
  • Price action with frequent stop-runs and wicks beyond key levels
  • Avoid strong trending days where reversals fail more frequently

Source Code

See GhostResistance Source Code for a developer-level walkthrough of the class structure, indicator wiring, signal implementations, and decision tree construction.


Data Export Strategy

The Data Export strategy is a utility that exports indicator data to CSV files. It does not trade — it collects and writes data from up to four MZpack indicators for external analysis, backtesting research, or machine learning pipelines.

Supported Indicators

IndicatorData SourceExport Granularity
mzFootprintLevel 1Bar
mzVolumeProfileLevel 1Bar or Tick
mzBigTradeLevel 1Tick
mzMarketDepthLevel 2Update

Each indicator can be independently enabled or disabled for export.

Footprint Export Values

ValueDescription
Open, Close, High, LowBar OHLC prices
RangeTicks, RangeLevelsBar range in ticks and price levels
DirectionBar direction (up/down)
DurationMsBar duration in milliseconds
Volumes, Bids, Asks, DeltasPrice ladders (per-level data)
TradesNumbersPer-level trades count ladder
TradesNumberTotal trades count in the bar
Volume, BuyVolume, SellVolumeBar total, buy, and sell volumes
Delta, DeltaPercentageBar delta and delta percentage
MinDelta, MaxDeltaIntra-bar delta extremes
DeltaChange, DeltaCumulativeDelta change and session cumulative delta
DeltaRate, DeltaRateHigh, DeltaRateLowDelta rate and its extremes
AbsoluteDeltaAverage, AbsoluteDeltaTotalAbsolute delta statistics
VAH, VAL, POC, POCVolumeBar value area high/low, POC price and volume
BuyPercentage, SellPercentageBuy/sell volume percentages
COTHigh, COTLowCommitment of Traders high/low

Export Settings

SettingDescriptionDefault
HeaderInclude column headers in the CSV fileOn
TimeInclude timestamp columnOn
BatchBatch write mode (writes accumulated data at once)Off
Signed volumePrefix volumes with +/- for buy/sell directionOff
DelimiterColumn separator character;
FileCustom file path (optional)Auto-generated

Output File Location

By default, exported files are saved to:

Documents\NinjaTrader 8\mzpack\strategy\...\Data_Export\data\<instrument>_<id>.csv

Indicator settings are saved to XML and restored automatically on the next run. Values that are not calculated or not supported by the indicator are exported as empty strings or zeros.

note

Enable the relevant indicator features before exporting. For example, enable volume profile POC in the mzVolumeProfile settings to export POC values.

Temporality

Each indicator export can run in one of two temporalities:

ModeDescription
HistoricalExports data from loaded historical bars (requires backtesting mode)
RealtimeExports data as it arrives during live trading

Source Code

See Data Export Source Code and Drawing Objects Export Source Code for developer-level walkthroughs of the export strategy implementations.